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