Bug 1530008 - make reftest-analyzer.xhtml work with local WPT output r=dbaron
authorSam Sneddon <me@gsnedders.com>
Tue, 05 Mar 2019 10:03:52 +0000
changeset 520233 a351f6e4fb9ca04267ef9e5e15d4d7a0e682ac9e
parent 520232 adfb56717e82c848a88e8c8fdb4746b966cdca29
child 520234 4bb1dd0270b6cf251823b865184d1dc0f3250eb6
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1530008
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530008 - make reftest-analyzer.xhtml work with local WPT output r=dbaron Differential Revision: https://phabricator.services.mozilla.com/D21688
layout/tools/reftest/reftest-analyzer.xhtml
--- a/layout/tools/reftest/reftest-analyzer.xhtml
+++ b/layout/tools/reftest/reftest-analyzer.xhtml
@@ -290,16 +290,26 @@ 12:01:09     INFO - REFTEST TEST-END | a
       "log": `[task 2018-12-29T04:29:48.800Z] REFTEST a == b
 [task 2018-12-29T04:29:48.984Z] REFTEST a2 == b2
 [task 2018-12-29T04:29:49.053Z] REFTEST TEST-UNEXPECTED-FAIL | a2 == b2 | image comparison, max difference: 255, number of differing pixels: 3128
 [task 2018-12-29T04:29:49.053Z] REFTEST   IMAGE 1 (TEST): data:image/png;
 [task 2018-12-29T04:29:49.053Z] REFTEST   IMAGE 2 (REFERENCE): data:image/png;
 [task 2018-12-29T04:29:49.053Z] REFTEST TEST-END | a2 == b2`,
       "expected": { "pass": 0, "unexpected": 1, "random": 0, "skip": 0 },
     },
+    { "name": "wpt reftests (Linux local; Bug 1530008)",
+      "log": `SUITE-START | Running 1 tests
+TEST-START | /css/css-backgrounds/border-image-6.html
+TEST-UNEXPECTED-FAIL | /css/css-backgrounds/border-image-6.html | Testing http://web-platform.test:8000/css/css-backgrounds/border-image-6.html == http://web-platform.test:8000/css/css-backgrounds/border-image-6-ref.html
+REFTEST   IMAGE 1 (TEST): data:image/png;base64,
+REFTEST   IMAGE 2 (REFERENCE): data:image/png;base64,
+TEST-INFO took 425ms
+SUITE-END | took 2s`,
+      "expected": { "pass": 0, "unexpected": 1, "random": 0, "skip": 0 },
+    },
   ];
 
   var current_test = 0;
 
   // Override the build_viewer function invoked at the end of process_log to
   // actually just check the results of parsing.
   build_viewer = function() {
     var expected = testcases[current_test].expected;
@@ -345,19 +355,18 @@ function process_log(contents) {
     var match = line.match(/^.*?(?:REFTEST\s+)(.*)$/);
     if (!match) {
       // WPT reftests don't always have the "REFTEST" prefix but do have
       // mozharness prefixing. Trying to match both prefixes optionally with a
       // single regex either makes an unreadable mess or matches everything so
       // we do them separately.
       match = line.match(/^(?:.*? (?:INFO|ERROR) -\s+)(.*)$/);
     }
-    if (!match)
-      continue;
-    line = match[1];
+    if (match)
+      line = match[1];
     match = line.match(/^(TEST-PASS|TEST-UNEXPECTED-PASS|TEST-FAIL|TEST-KNOWN-FAIL|TEST-UNEXPECTED-FAIL|TEST-DEBUG-INFO)(\(EXPECTED RANDOM\)|) \| ([^\|]+)(?: \|(.*)|$)/);
     if (match) {
       var state = match[1];
       var random = match[2];
       var url = match[3];
       var extra = match[4];
       gTestItems.push(
         {