Commit 2dda8c3d authored by machenbach's avatar machenbach Committed by Commit bot

[test] Verbose test runner output on windows.

TBR=jkummerow@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/1156133006

Cr-Commit-Position: refs/heads/master@{#28643}
parent cb07b8ef
......@@ -540,8 +540,14 @@ def Execute(arch, mode, args, options, suites, workspace):
# Predictable mode is slower.
timeout *= 2
# TODO(machenbach): Remove temporary verbose output on windows after
# debugging driver-hung-up on XP.
verbose_output = (
options.verbose or
utils.IsWindows() and options.progress == "verbose"
)
ctx = context.Context(arch, MODES[mode]["execution_mode"], shell_dir,
mode_flags, options.verbose,
mode_flags, verbose_output,
timeout, options.isolates,
options.command_prefix,
options.extra_flags,
......
......@@ -28,6 +28,7 @@
import os
import shutil
import sys
import time
from pool import Pool
......@@ -150,6 +151,7 @@ class Runner(object):
self.indicator.HasRun(test, has_unexpected_output or test.run > 1)
if has_unexpected_output:
# Rerun test failures after the indicator has processed the results.
self._VerbosePrint("Attempting to rerun test after failure.")
self._MaybeRerun(pool, test)
# Update the perf database if the test succeeded.
return not has_unexpected_output
......@@ -241,7 +243,9 @@ class Runner(object):
if update_perf:
self._RunPerfSafe(lambda: self.perfdata.UpdatePerfData(test))
finally:
self._VerbosePrint("Closing process pool.")
pool.terminate()
self._VerbosePrint("Closing database connection.")
self._RunPerfSafe(lambda: self.perf_data_manager.close())
if self.perf_failures:
# Nuke perf data in case of failures. This might not work on windows as
......@@ -254,6 +258,11 @@ class Runner(object):
# Make sure that any allocations were printed in predictable mode.
assert not self.context.predictable or self.printed_allocations
def _VerbosePrint(self, text):
if self.context.verbose:
print text
sys.stdout.flush()
def GetCommand(self, test):
d8testflag = []
shell = test.suite.shell()
......
......@@ -130,6 +130,7 @@ class VerboseProgressIndicator(SimpleProgressIndicator):
else:
outcome = 'pass'
print 'Done running %s: %s' % (test.GetLabel(), outcome)
sys.stdout.flush()
def Heartbeat(self):
print 'Still working...'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment