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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/check_stability.py

Issue 2477133002: Import wpt@306326cfe973b6c7019c50879ad03b02825c7539 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 4 years, 1 month 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
Index: third_party/WebKit/LayoutTests/imported/wpt/check_stability.py
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/check_stability.py b/third_party/WebKit/LayoutTests/imported/wpt/check_stability.py
index 2c5ad269f3f1a9a1a33bb5c307bbff96b018be62..e2ee9661bb9a17f25e443a2d2abe6aa31d5a0182 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/check_stability.py
+++ b/third_party/WebKit/LayoutTests/imported/wpt/check_stability.py
@@ -402,6 +402,14 @@ def process_results(log, iterations):
return results, inconsistent
+def markdown_adjust(s):
+ s = s.replace('\t', u'\\t')
+ s = s.replace('\n', u'\\n')
+ s = s.replace('\r', u'\\r')
+ s = s.replace('`', u'\\`')
+ return s
+
+
def table(headings, data, log):
cols = range(len(headings))
assert all(len(item) == len(cols) for item in data)
@@ -420,7 +428,7 @@ def table(headings, data, log):
def write_inconsistent(inconsistent, iterations):
logger.error("## Unstable results ##\n")
- strings = [(test, subtest if subtest else "", err_string(results, iterations))
+ strings = [("`%s`" % markdown_adjust(test), ("`%s`" % markdown_adjust(subtest)) if subtest else "", err_string(results, iterations))
for test, subtest, results in inconsistent]
table(["Test", "Subtest", "Results"], strings, logger.error)
@@ -443,7 +451,7 @@ def write_results(results, iterations, comment_pr):
logger.info("### %s ###" % test)
parent = test_results.pop(None)
strings = [("", err_string(parent, iterations))]
- strings.extend(((subtest if subtest else "", err_string(results, iterations))
+ strings.extend(((("`%s`" % markdown_adjust(subtest)) if subtest else "", err_string(results, iterations))
for subtest, results in test_results.iteritems()))
table(["Subtest", "Results"], strings, logger.info)

Powered by Google App Engine
This is Rietveld 408576698