changeset 21338:3cd2d2de4060

run-tests: move computation of test paths into Test.__init__
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 19 Apr 2014 21:53:15 -0700
parents 79930515604f
children de25e968b4d8
files tests/run-tests.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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()