summaryrefslogtreecommitdiff
path: root/deps/v8/tools/testrunner/testproc/progress.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/tools/testrunner/testproc/progress.py')
-rw-r--r--deps/v8/tools/testrunner/testproc/progress.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py
index edc88668b7..6957cdc423 100644
--- a/deps/v8/tools/testrunner/testproc/progress.py
+++ b/deps/v8/tools/testrunner/testproc/progress.py
@@ -57,9 +57,16 @@ class ResultsTracker(base.TestProcObserver):
class ProgressIndicator(base.TestProcObserver):
+ def __init__(self):
+ super(base.TestProcObserver, self).__init__()
+ self.options = None
+
def finished(self):
pass
+ def configure(self, options):
+ self.options = options
+
class SimpleProgressIndicator(ProgressIndicator):
def __init__(self):
@@ -114,8 +121,7 @@ class VerboseProgressIndicator(SimpleProgressIndicator):
sys.stdout.flush()
self._last_printed_time = time.time()
- def _on_result_for(self, test, result):
- super(VerboseProgressIndicator, self)._on_result_for(test, result)
+ def _message(self, test, result):
# TODO(majeski): Support for dummy/grouped results
if result.has_unexpected_output:
if result.output.HasCrashed():
@@ -124,9 +130,12 @@ class VerboseProgressIndicator(SimpleProgressIndicator):
outcome = 'FAIL'
else:
outcome = 'pass'
+ return 'Done running %s %s: %s' % (
+ test, test.variant or 'default', outcome)
- self._print('Done running %s %s: %s' % (
- test, test.variant or 'default', outcome))
+ def _on_result_for(self, test, result):
+ super(VerboseProgressIndicator, self)._on_result_for(test, result)
+ self._print(self._message(test, result))
# TODO(machenbach): Remove this platform specific hack and implement a proper
# feedback channel from the workers, providing which tests are currently run.
@@ -155,6 +164,14 @@ class VerboseProgressIndicator(SimpleProgressIndicator):
self._print_processes_linux()
+class CIProgressIndicator(VerboseProgressIndicator):
+ def _on_result_for(self, test, result):
+ super(VerboseProgressIndicator, self)._on_result_for(test, result)
+ if self.options.ci_test_completion:
+ with open(self.options.ci_test_completion, "a") as f:
+ f.write(self._message(test, result) + "\n")
+
+
class DotsProgressIndicator(SimpleProgressIndicator):
def __init__(self):
super(DotsProgressIndicator, self).__init__()