diff tests/run-tests.py @ 35120:fc0f3ed071fc

run-tests: outputdir also has to be changed if $TESTDIR is not $PWD Following a18eef03d879, running run-tests.py from outside tests/ would lead to the creation of .testtimes and test-*.t.err in $PWD instead of $TESTDIR. This patch fixes that and updates the relevant test.
author Matthieu Laneuville <matthieu.laneuville@octobus.net>
date Sat, 18 Nov 2017 16:12:00 +0900
parents 1ac4c0887de4
children 6d5718e39657
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Nov 20 21:59:00 2017 +0800
+++ b/tests/run-tests.py	Sat Nov 18 16:12:00 2017 +0900
@@ -2373,6 +2373,8 @@
             self._outputdir = canonpath(_bytespath(self.options.outputdir))
         else:
             self._outputdir = self._testdir
+            if testdescs and pathname:
+                self._outputdir = os.path.join(self._outputdir, pathname)
 
         if 'PYTHONHASHSEED' not in os.environ:
             # use a random python hash seed all the time