tests/run-tests.py
changeset 35018 a18eef03d879
parent 34842 8bce3e51b101
child 35021 d8c2db6167b3
--- a/tests/run-tests.py	Wed Nov 01 17:08:33 2017 +0100
+++ b/tests/run-tests.py	Wed Aug 02 13:27:45 2017 +0900
@@ -2353,6 +2353,12 @@
 
         self._testdir = osenvironb[b'TESTDIR'] = getattr(
             os, 'getcwdb', os.getcwd)()
+        # assume all tests in same folder for now
+        if testdescs:
+            pathname = os.path.dirname(testdescs[0]['path'])
+            if pathname and not osenvironb[b'TESTDIR'].endswith('/'):
+                osenvironb[b'TESTDIR'] += '/'
+            osenvironb[b'TESTDIR'] += pathname
         if self.options.outputdir:
             self._outputdir = canonpath(_bytespath(self.options.outputdir))
         else: