run-tests: move computation of test paths into Test.__init__
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 21:53:15 -0700
changeset 21338 3cd2d2de4060
parent 21337 79930515604f
child 21339 de25e968b4d8
run-tests: move computation of test paths into Test.__init__
tests/run-tests.py
--- a/tests/run-tests.py	Sat Apr 19 21:50:23 2014 -0700
+++ b/tests/run-tests.py	Sat Apr 19 21:53:15 2014 -0700
@@ -551,7 +551,10 @@
     runs cannot be run concurrently.
     """
 
-    def __init__(self, test, path, options, count, refpath, errpath):
+    def __init__(self, testdir, test, options, count, refpath):
+        path = os.path.join(testdir, test)
+        errpath = os.path.join(testdir, '%s.err' % test)
+
         self._test = test
         self._path = path
         self._options = options
@@ -1134,8 +1137,6 @@
             log("\nSkipping %s: %s" % (testpath, msg))
         return 's', test, msg
 
-    testpath = os.path.join(TESTDIR, test)
-    err = os.path.join(TESTDIR, test + ".err")
     lctest = test.lower()
 
     for ext, cls, out in testtypes:
@@ -1146,7 +1147,7 @@
     else:
         return skip("unknown test type")
 
-    t = runner(test, testpath, options, count, ref, err)
+    t = runner(TESTDIR, test, options, count, ref)
     result = t.run()
 
     t.cleanup()