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

Unified Diff: tools/testing/architecture.py

Issue 8818021: make test.py more reselient to flakyness in xvfb-run + DumpRenderTree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 years 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 | « no previous file | tools/testing/test_case.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/architecture.py
diff --git a/tools/testing/architecture.py b/tools/testing/architecture.py
index ace1fe3ceaa05e91e69b2d6be8662c0050f74d63..96d3bb406161ddeeaf191d79bb0d51f560d0ce44 100755
--- a/tools/testing/architecture.py
+++ b/tools/testing/architecture.py
@@ -119,6 +119,12 @@ DOM_IMPORT_PATTERN = re.compile(r'#import.*(dart:(dom|html)|html\.dart).*\);',
BROWSER_OUTPUT_PASS_PATTERN = re.compile(r'^Content-Type: text/plain\nPASS$',
re.MULTILINE)
+# Pattern for matching flaky errors of browser tests. xvfb-run by default uses
+# DISPLAY=:99, we keep that in the error pattern to avoid matching real
+# errors when DISPLAY is set incorrectly.
+BROWSER_FLAKY_DISPLAY_ERR_PATTERN = re.compile(
+ r'Gtk-WARNING \*\*: cannot open display: :99', re.MULTILINE)
+
# Pattern for checking if the test is a library in itself.
LIBRARY_DEFINITION_PATTERN = re.compile(r'^#library\(.*\);',
re.MULTILINE)
@@ -291,6 +297,12 @@ class BrowserArchitecture(Architecture):
"""Return True if the 'PASS' result string isn't in the output."""
return not BROWSER_OUTPUT_PASS_PATTERN.search(output)
+ def WasFlakyDrt(self, error):
+ """Return whether the error indicates a flaky error from running.
+ DumpRenderTree within xvfb-run.
+ """
+ return BROWSER_FLAKY_DISPLAY_ERR_PATTERN.search(error)
+
def RunTest(self, verbose):
"""Calls GetRunCommand() and executes the returned commandline.
« no previous file with comments | « no previous file | tools/testing/test_case.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698