Show More
@@ -339,7 +339,8 b' class Test(unittest.TestCase):' | |||||
339 | SKIPPED_STATUS = 80 |
|
339 | SKIPPED_STATUS = 80 | |
340 |
|
340 | |||
341 | def __init__(self, options, path, count, tmpdir, abort, keeptmpdir=False, |
|
341 | def __init__(self, options, path, count, tmpdir, abort, keeptmpdir=False, | |
342 |
debug=False, nodiff=False, diffviewer=None |
|
342 | debug=False, nodiff=False, diffviewer=None, | |
|
343 | interactive=False): | |||
343 | """Create a test from parameters. |
|
344 | """Create a test from parameters. | |
344 |
|
345 | |||
345 | options are parsed command line options that control test execution. |
|
346 | options are parsed command line options that control test execution. | |
@@ -363,6 +364,8 b' class Test(unittest.TestCase):' | |||||
363 |
|
364 | |||
364 | diffviewer is the program that should be used to display diffs. Only |
|
365 | diffviewer is the program that should be used to display diffs. Only | |
365 | used when output changes. |
|
366 | used when output changes. | |
|
367 | ||||
|
368 | interactive controls whether the test will run interactively. | |||
366 | """ |
|
369 | """ | |
367 |
|
370 | |||
368 | self.path = path |
|
371 | self.path = path | |
@@ -378,6 +381,7 b' class Test(unittest.TestCase):' | |||||
378 | self._debug = debug |
|
381 | self._debug = debug | |
379 | self._nodiff = nodiff |
|
382 | self._nodiff = nodiff | |
380 | self._diffviewer = diffviewer |
|
383 | self._diffviewer = diffviewer | |
|
384 | self._interactive = interactive | |||
381 | self._daemonpids = [] |
|
385 | self._daemonpids = [] | |
382 |
|
386 | |||
383 | self._finished = None |
|
387 | self._finished = None | |
@@ -645,7 +649,7 b' class Test(unittest.TestCase):' | |||||
645 | if not self._nodiff: |
|
649 | if not self._nodiff: | |
646 | log("\n%s: %s %s" % (warned and 'Warning' or 'ERROR', self.name, |
|
650 | log("\n%s: %s %s" % (warned and 'Warning' or 'ERROR', self.name, | |
647 | msg)) |
|
651 | msg)) | |
648 |
if (not ret and self._ |
|
652 | if (not ret and self._interactive and | |
649 | os.path.exists(self.errpath)): |
|
653 | os.path.exists(self.errpath)): | |
650 | iolock.acquire() |
|
654 | iolock.acquire() | |
651 | print 'Accept this change? [n] ', |
|
655 | print 'Accept this change? [n] ', | |
@@ -1503,7 +1507,8 b' class TestRunner(object):' | |||||
1503 | keeptmpdir=self.options.keep_tmpdir, |
|
1507 | keeptmpdir=self.options.keep_tmpdir, | |
1504 | debug=self.options.debug, |
|
1508 | debug=self.options.debug, | |
1505 | nodiff = self.options.nodiff, |
|
1509 | nodiff = self.options.nodiff, | |
1506 |
diffviewer=self.options.view |
|
1510 | diffviewer=self.options.view, | |
|
1511 | interactive=self.options.interactive) | |||
1507 |
|
1512 | |||
1508 | def _cleanup(self): |
|
1513 | def _cleanup(self): | |
1509 | """Clean up state from this test invocation.""" |
|
1514 | """Clean up state from this test invocation.""" |
General Comments 0
You need to be logged in to leave comments.
Login now