changeset 19245:dcb05a1470bd

run-tests: regroup some variable initialization
author Matt Mackall <mpm@selenic.com>
date Fri, 24 May 2013 13:51:20 -0500
parents eee43d763f9f
children 29ddf9d93e35
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri May 24 13:48:25 2013 -0500
+++ b/tests/run-tests.py	Fri May 24 13:51:20 2013 -0500
@@ -832,8 +832,6 @@
 
     global results, resultslock, iolock
 
-    testpath = os.path.join(TESTDIR, test)
-
     def result(l, e):
         resultslock.acquire()
         results[l].append(e)
@@ -879,6 +877,10 @@
             return 'killed by signal %d' % -ret
         return 'returned error code %d' % ret
 
+    testpath = os.path.join(TESTDIR, test)
+    err = os.path.join(TESTDIR, test + ".err")
+    lctest = test.lower()
+
     if not os.path.exists(test):
             skip("doesn't exist")
             return None
@@ -907,10 +909,8 @@
 
     createhgrc(HGRCPATH, options)
 
-    err = os.path.join(TESTDIR, test+".err")
     if os.path.exists(err):
         os.remove(err)       # Remove any previous output files
-    lctest = test.lower()
 
     for ext, func, out in testtypes:
         if lctest.startswith("test-") and lctest.endswith(ext):