Show More
@@ -2062,11 +2062,11 b' class TestRunner(object):' | |||
|
2062 | 2062 | self.options = options |
|
2063 | 2063 | |
|
2064 | 2064 | self._checktools() |
|
2065 | tests = self.findtests(args) | |
|
2065 | testdescs = self.findtests(args) | |
|
2066 | 2066 | if options.profile_runner: |
|
2067 | 2067 | import statprof |
|
2068 | 2068 | statprof.start() |
|
2069 | result = self._run(tests) | |
|
2069 | result = self._run(testdescs) | |
|
2070 | 2070 | if options.profile_runner: |
|
2071 | 2071 | statprof.stop() |
|
2072 | 2072 | statprof.display() |
@@ -2075,9 +2075,9 b' class TestRunner(object):' | |||
|
2075 | 2075 | finally: |
|
2076 | 2076 | os.umask(oldmask) |
|
2077 | 2077 | |
|
2078 | def _run(self, tests): | |
|
2078 | def _run(self, testdescs): | |
|
2079 | 2079 | if self.options.random: |
|
2080 | random.shuffle(tests) | |
|
2080 | random.shuffle(testdescs) | |
|
2081 | 2081 | else: |
|
2082 | 2082 | # keywords for slow tests |
|
2083 | 2083 | slow = {b'svn': 10, |
@@ -2113,7 +2113,7 b' class TestRunner(object):' | |||
|
2113 | 2113 | val /= 10.0 |
|
2114 | 2114 | perf[f] = val / 1000.0 |
|
2115 | 2115 | return perf[f] |
|
2116 | tests.sort(key=sortkey) | |
|
2116 | testdescs.sort(key=sortkey) | |
|
2117 | 2117 | |
|
2118 | 2118 | self._testdir = osenvironb[b'TESTDIR'] = getattr( |
|
2119 | 2119 | os, 'getcwdb', os.getcwd)() |
@@ -2243,7 +2243,7 b' class TestRunner(object):' | |||
|
2243 | 2243 | vlog("# Using", IMPL_PATH, osenvironb[IMPL_PATH]) |
|
2244 | 2244 | |
|
2245 | 2245 | try: |
|
2246 | return self._runtests(tests) or 0 | |
|
2246 | return self._runtests(testdescs) or 0 | |
|
2247 | 2247 | finally: |
|
2248 | 2248 | time.sleep(.1) |
|
2249 | 2249 | self._cleanup() |
@@ -2267,7 +2267,7 b' class TestRunner(object):' | |||
|
2267 | 2267 | if os.path.basename(t).startswith(b'test-') |
|
2268 | 2268 | and (t.endswith(b'.py') or t.endswith(b'.t'))] |
|
2269 | 2269 | |
|
2270 | def _runtests(self, tests): | |
|
2270 | def _runtests(self, testdescs): | |
|
2271 | 2271 | def _reloadtest(test, i): |
|
2272 | 2272 | # convert a test back to its description dict |
|
2273 | 2273 | desc = {'path': test.path} |
@@ -2284,16 +2284,16 b' class TestRunner(object):' | |||
|
2284 | 2284 | self._installchg() |
|
2285 | 2285 | |
|
2286 | 2286 | if self.options.restart: |
|
2287 | orig = list(tests) | |
|
2288 | while tests: | |
|
2289 | if os.path.exists(tests[0]['path'] + ".err"): | |
|
2287 | orig = list(testdescs) | |
|
2288 | while testdescs: | |
|
2289 | if os.path.exists(testdescs[0]['path'] + ".err"): | |
|
2290 | 2290 | break |
|
2291 | tests.pop(0) | |
|
2292 | if not tests: | |
|
2291 | testdescs.pop(0) | |
|
2292 | if not testdescs: | |
|
2293 | 2293 | print("running all tests") |
|
2294 | tests = orig | |
|
2294 | testdescs = orig | |
|
2295 | 2295 | |
|
2296 |
tests = [self._gettest( |
|
|
2296 | tests = [self._gettest(d, i) for i, d in enumerate(testdescs)] | |
|
2297 | 2297 | |
|
2298 | 2298 | failed = False |
|
2299 | 2299 | warned = False |
@@ -2351,13 +2351,13 b' class TestRunner(object):' | |||
|
2351 | 2351 | self._ports[count] = port |
|
2352 | 2352 | return port |
|
2353 | 2353 | |
|
2354 | def _gettest(self, test, count): | |
|
2354 | def _gettest(self, testdesc, count): | |
|
2355 | 2355 | """Obtain a Test by looking at its filename. |
|
2356 | 2356 | |
|
2357 | 2357 | Returns a Test instance. The Test may not be runnable if it doesn't |
|
2358 | 2358 | map to a known type. |
|
2359 | 2359 | """ |
|
2360 | path = test['path'] | |
|
2360 | path = testdesc['path'] | |
|
2361 | 2361 | lctest = path.lower() |
|
2362 | 2362 | testcls = Test |
|
2363 | 2363 |
General Comments 0
You need to be logged in to leave comments.
Login now