Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: tools/test.py

Issue 4299: Added message tests. (Closed)
Patch Set: Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mozilla/mozilla.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.py
diff --git a/tools/test.py b/tools/test.py
index 1632895c0d36afe8b5c5f413344f155821a902ec..d8ecb5fb3440476dd52953f5230aa5b36af4b0a9 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -264,10 +264,16 @@ class TestCase(object):
def __init__(self, context, path):
self.path = path
self.context = context
+ self.failed = None
def IsNegative(self):
return False
+ def DidFail(self, output):
+ if self.failed is None:
+ self.failed = self.IsFailureOutput(output)
+ return self.failed
+
def IsFailureOutput(self, output):
return output.exit_code != 0
@@ -296,7 +302,7 @@ class TestOutput(object):
return not outcome in self.test.outcomes
def HasFailed(self):
- execution_failed = self.test.IsFailureOutput(self.output)
+ execution_failed = self.test.DidFail(self.output)
if self.test.IsNegative():
return not execution_failed
else:
@@ -1060,7 +1066,7 @@ def GetSpecialCommandProcessor(value):
return ExpandCommand
-BUILT_IN_TESTS = ['mjsunit', 'cctest']
+BUILT_IN_TESTS = ['mjsunit', 'cctest', 'message']
def GetSuites(test_root):
« no previous file with comments | « test/mozilla/mozilla.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698