summaryrefslogtreecommitdiff
path: root/deps/v8/tools/testrunner
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/tools/testrunner')
-rw-r--r--deps/v8/tools/testrunner/local/execution.py5
-rw-r--r--deps/v8/tools/testrunner/local/old_statusfile.py2
-rw-r--r--deps/v8/tools/testrunner/local/progress.py20
-rw-r--r--deps/v8/tools/testrunner/network/endpoint.py4
-rw-r--r--deps/v8/tools/testrunner/network/network_execution.py5
5 files changed, 19 insertions, 17 deletions
diff --git a/deps/v8/tools/testrunner/local/execution.py b/deps/v8/tools/testrunner/local/execution.py
index 0f52616d97..4453c08451 100644
--- a/deps/v8/tools/testrunner/local/execution.py
+++ b/deps/v8/tools/testrunner/local/execution.py
@@ -138,14 +138,15 @@ class Runner(object):
self.indicator.AboutToRun(test)
test.output = result[1]
test.duration = result[2]
- if test.suite.HasUnexpectedOutput(test):
+ has_unexpected_output = test.suite.HasUnexpectedOutput(test)
+ if has_unexpected_output:
self.failed.append(test)
if test.output.HasCrashed():
self.crashed += 1
else:
self.succeeded += 1
self.remaining -= 1
- self.indicator.HasRun(test)
+ self.indicator.HasRun(test, has_unexpected_output)
except KeyboardInterrupt:
pool.terminate()
pool.join()
diff --git a/deps/v8/tools/testrunner/local/old_statusfile.py b/deps/v8/tools/testrunner/local/old_statusfile.py
index a16941b83b..a9a62036ec 100644
--- a/deps/v8/tools/testrunner/local/old_statusfile.py
+++ b/deps/v8/tools/testrunner/local/old_statusfile.py
@@ -386,7 +386,7 @@ class ConvertNotation(object):
self.init = True
def CloseGlobal(self):
- if not self.init: return
+ if not self.init: self.OpenGlobal()
print >> self.out, "]"
self.init = False
diff --git a/deps/v8/tools/testrunner/local/progress.py b/deps/v8/tools/testrunner/local/progress.py
index c13c0eb54e..a663be23eb 100644
--- a/deps/v8/tools/testrunner/local/progress.py
+++ b/deps/v8/tools/testrunner/local/progress.py
@@ -57,7 +57,7 @@ class ProgressIndicator(object):
def AboutToRun(self, test):
pass
- def HasRun(self, test):
+ def HasRun(self, test, has_unexpected_output):
pass
def PrintFailureHeader(self, test):
@@ -111,8 +111,8 @@ class VerboseProgressIndicator(SimpleProgressIndicator):
print 'Starting %s...' % test.GetLabel()
sys.stdout.flush()
- def HasRun(self, test):
- if test.suite.HasUnexpectedOutput(test):
+ def HasRun(self, test, has_unexpected_output):
+ if has_unexpected_output:
if test.output.HasCrashed():
outcome = 'CRASH'
else:
@@ -124,11 +124,11 @@ class VerboseProgressIndicator(SimpleProgressIndicator):
class DotsProgressIndicator(SimpleProgressIndicator):
- def HasRun(self, test):
+ def HasRun(self, test, has_unexpected_output):
total = self.runner.succeeded + len(self.runner.failed)
if (total > 1) and (total % 50 == 1):
sys.stdout.write('\n')
- if test.suite.HasUnexpectedOutput(test):
+ if has_unexpected_output:
if test.output.HasCrashed():
sys.stdout.write('C')
sys.stdout.flush()
@@ -159,8 +159,8 @@ class CompactProgressIndicator(ProgressIndicator):
def AboutToRun(self, test):
self.PrintProgress(test.GetLabel())
- def HasRun(self, test):
- if test.suite.HasUnexpectedOutput(test):
+ def HasRun(self, test, has_unexpected_output):
+ if has_unexpected_output:
self.ClearLine(self.last_status_length)
self.PrintFailureHeader(test)
stdout = test.output.stdout.strip()
@@ -255,10 +255,10 @@ class JUnitTestProgressIndicator(ProgressIndicator):
def AboutToRun(self, test):
self.progress_indicator.AboutToRun(test)
- def HasRun(self, test):
- self.progress_indicator.HasRun(test)
+ def HasRun(self, test, has_unexpected_output):
+ self.progress_indicator.HasRun(test, has_unexpected_output)
fail_text = ""
- if test.suite.HasUnexpectedOutput(test):
+ if has_unexpected_output:
stdout = test.output.stdout.strip()
if len(stdout):
fail_text += "stdout:\n%s\n" % stdout
diff --git a/deps/v8/tools/testrunner/network/endpoint.py b/deps/v8/tools/testrunner/network/endpoint.py
index 5dc2b9f902..d0950cf5a6 100644
--- a/deps/v8/tools/testrunner/network/endpoint.py
+++ b/deps/v8/tools/testrunner/network/endpoint.py
@@ -50,7 +50,7 @@ class EndpointProgress(progress.ProgressIndicator):
self.senderthread = threading.Thread(target=self._SenderThread)
self.senderthread.start()
- def HasRun(self, test):
+ def HasRun(self, test, has_unexpected_output):
# The runners that call this have a lock anyway, so this is safe.
self.results_queue.append(test)
@@ -119,6 +119,6 @@ def Execute(workspace, ctx, tests, sock, server):
else:
message = "%s" % e
compression.Send([[-1, message]], sock)
- progress_indicator.HasRun(None) # Sentinel to signal the end.
+ progress_indicator.HasRun(None, None) # Sentinel to signal the end.
progress_indicator.sender_lock.acquire() # Released when sending is done.
progress_indicator.sender_lock.release()
diff --git a/deps/v8/tools/testrunner/network/network_execution.py b/deps/v8/tools/testrunner/network/network_execution.py
index ddb59e60b7..0f53a6bb64 100644
--- a/deps/v8/tools/testrunner/network/network_execution.py
+++ b/deps/v8/tools/testrunner/network/network_execution.py
@@ -204,14 +204,15 @@ class NetworkedRunner(execution.Runner):
self.context.arch, self.context.mode],
self.local_socket)
self.indicator.AboutToRun(test)
- if test.suite.HasUnexpectedOutput(test):
+ has_unexpected_output = test.suite.HasUnexpectedOutput(test)
+ if has_unexpected_output:
self.failed.append(test)
if test.output.HasCrashed():
self.crashed += 1
else:
self.succeeded += 1
self.remaining -= 1
- self.indicator.HasRun(test)
+ self.indicator.HasRun(test, has_unexpected_output)
rec.Advance()
peer.runtime = time.time() - start_time
except KeyboardInterrupt: