run-tests: assign testdir in TestRunner
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Apr 2014 10:00:59 -0700
changeset 21371 a10ba7870c2d
parent 21370 97475f27bebe
child 21372 3a44787e50e2
run-tests: assign testdir in TestRunner
tests/run-tests.py
--- a/tests/run-tests.py	Sun Apr 20 09:59:01 2014 -0700
+++ b/tests/run-tests.py	Sun Apr 20 10:00:59 2014 -0700
@@ -1019,6 +1019,8 @@
         return self._run(tests)
 
     def _run(self, tests):
+        self.testdir = os.environ['TESTDIR'] = os.getcwd()
+
         if 'PYTHONHASHSEED' not in os.environ:
             # use a random python hash seed all the time
             # we do the randomness ourself to know what seed is used
@@ -1461,8 +1463,6 @@
             return val
         tests.sort(key=sortkey)
 
-    runner.testdir = os.environ['TESTDIR'] = os.getcwd()
-
     return runner.run(tests)
 
 if __name__ == '__main__':