Show More
@@ -356,6 +356,8 b' class Test(object):' | |||||
356 | self._errpath = errpath |
|
356 | self._errpath = errpath | |
357 | self._unittest = unittest |
|
357 | self._unittest = unittest | |
358 |
|
358 | |||
|
359 | self._finished = None | |||
|
360 | ||||
359 | # If we're not in --debug mode and reference output file exists, |
|
361 | # If we're not in --debug mode and reference output file exists, | |
360 | # check test output against it. |
|
362 | # check test output against it. | |
361 | if runner.options.debug: |
|
363 | if runner.options.debug: | |
@@ -379,12 +381,16 b' class Test(object):' | |||||
379 |
|
381 | |||
380 | def setUp(self): |
|
382 | def setUp(self): | |
381 | """Tasks to perform before run().""" |
|
383 | """Tasks to perform before run().""" | |
|
384 | self._finished = False | |||
382 |
|
385 | |||
383 | def run(self): |
|
386 | def run(self): | |
384 | """Run this test instance. |
|
387 | """Run this test instance. | |
385 |
|
388 | |||
386 | This will return a tuple describing the result of the test. |
|
389 | This will return a tuple describing the result of the test. | |
387 | """ |
|
390 | """ | |
|
391 | if not self._unittest: | |||
|
392 | self.setUp() | |||
|
393 | ||||
388 | if not os.path.exists(self._path): |
|
394 | if not os.path.exists(self._path): | |
389 | return self.skip("Doesn't exist") |
|
395 | return self.skip("Doesn't exist") | |
390 |
|
396 | |||
@@ -426,6 +432,7 b' class Test(object):' | |||||
426 | try: |
|
432 | try: | |
427 | ret, out = self._run(testtmp, replacements, env) |
|
433 | ret, out = self._run(testtmp, replacements, env) | |
428 | duration = time.time() - starttime |
|
434 | duration = time.time() - starttime | |
|
435 | self._finished = True | |||
429 | except KeyboardInterrupt: |
|
436 | except KeyboardInterrupt: | |
430 | duration = time.time() - starttime |
|
437 | duration = time.time() - starttime | |
431 | log('INTERRUPTED: %s (after %d seconds)' % (self.name, duration)) |
|
438 | log('INTERRUPTED: %s (after %d seconds)' % (self.name, duration)) |
General Comments 0
You need to be logged in to leave comments.
Login now