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
