File: run_tests.patch

package info (click to toggle)
magma 2.9.0%2Bds-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 83,212 kB
  • sloc: cpp: 709,115; fortran: 121,916; ansic: 32,343; python: 25,603; f90: 15,208; makefile: 942; xml: 253; csh: 232; sh: 203; perl: 104
file content (41 lines) | stat: -rw-r--r-- 1,392 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Description: make sure the upstream test runner can correctly find the test binaries
Forwarded: no need. debian specific.
Index: magma/testing/run_tests.py
===================================================================
--- magma.orig/testing/run_tests.py
+++ magma/testing/run_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 #
 # MAGMA (version 2.9.0) --
 # Univ. of Tennessee, Knoxville
@@ -214,6 +214,7 @@ import os
 import re
 import sys
 import time
+import glob
 
 import subprocess
 from subprocess import PIPE, STDOUT
@@ -1739,12 +1740,19 @@ for test in tests:
 		if (not re.match( 'testing_', cmdp )):
 			continue
 
+		# debian-specific: the testing executables are in /usr/lib/libmagma-test/testing
+		if os.path.exists(os.path.join('/usr/lib/libmagma-test/testing', cmdp)):
+			cmdp = os.path.join('/usr/lib/libmagma-test/testing', cmdp)
+		elif glob.glob('/usr/lib/*/libmagma-rocm-test'):
+			deb_specific_dir = glob.glob('/usr/lib/*/libmagma-rocm-test')[0]
+			cmdp = os.path.join(deb_specific_dir, 'testing', cmdp)
+
 		disabled = (cmdp[0] == '#')
 		if (disabled):
 			cmdp = cmdp[1:]
 
 		# command to run
-		cmd_args = './' + cmdp +' '+ options +' '+ global_options + sizes
+		cmd_args = cmdp +' '+ options +' '+ global_options + sizes
 		cmd_args = re.sub( '  +', ' ', cmd_args )  # compress spaces
 
 		# command to print on console, lacks sizes