From b46b873e77db399fa266836db91d1c3efc6b33d2 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 13 Dec 2018 09:29:04 +0100 Subject: [PATCH 1/2] Taskcluster: make wptrunner use "non-interactive formatting" Fixes https://github.com/servo/servo/issues/22438 --- etc/taskcluster/decision_task.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index dd1fbd06fea..aa76e03492c 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -336,17 +336,22 @@ def wpt_chunk(release_build_task, total_chunks, this_chunk): task.name += " + extra" task.extra["treeherder"]["symbol"] += "+" task.with_script(""" - time ./mach test-wpt-failure - time ./mach test-wpt --release --binary-arg=--multiprocess --processes 24 \ + ./mach test-wpt-failure + ./mach test-wpt --release --binary-arg=--multiprocess --processes 24 \ --log-raw test-wpt-mp.log \ --log-errorsummary wpt-mp-errorsummary.log \ - eventsource + eventsource \ + | cat time ./mach test-wpt --release --product=servodriver --headless \ tests/wpt/mozilla/tests/mozilla/DOMParser.html \ tests/wpt/mozilla/tests/css/per_glyph_font_fallback_a.html \ tests/wpt/mozilla/tests/css/img_simple.html \ - tests/wpt/mozilla/tests/mozilla/secure.https.html + tests/wpt/mozilla/tests/mozilla/secure.https.html \ + | cat """) + # `test-wpt` is piped into `cat` so that stdout is not a TTY + # and wptrunner does not use "interactive mode" formatting: + # https://github.com/servo/servo/issues/22438 task.with_script(""" ./mach test-wpt \ --release \ @@ -355,7 +360,8 @@ def wpt_chunk(release_build_task, total_chunks, this_chunk): --this-chunk "$THIS_CHUNK" \ --log-raw test-wpt.log \ --log-errorsummary wpt-errorsummary.log \ - --always-succeed + --always-succeed \ + | cat ./mach filter-intermittents\ wpt-errorsummary.log \ --log-intermittents intermittents.log \ From 60130eee8365b0bb9831ee728f534edcc518f281 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 13 Dec 2018 09:30:51 +0100 Subject: [PATCH 2/2] Write indented JSON in ./mach filter_intermittents --- python/servo/testing_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index c1f2ef0c65a..85a1a66eff2 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -571,7 +571,7 @@ class MachCommands(CommandBase): if log_intermittents: with open(log_intermittents, "w") as intermittents_file: for intermittent in intermittents: - json.dump(intermittent, intermittents_file) + json.dump(intermittent, intermittents_file, indent=4) print("\n", end='', file=intermittents_file) if len(actual_failures) == 0: @@ -579,7 +579,7 @@ class MachCommands(CommandBase): output = open(log_filteredsummary, "w") if log_filteredsummary else sys.stdout for failure in actual_failures: - json.dump(failure, output) + json.dump(failure, output, indent=4) print("\n", end='', file=output) if output is not sys.stdout: