diff --git a/layout/tools/reftest/clean-reftest-output.pl b/layout/tools/reftest/clean-reftest-output.pl index def0c3bea3c1..736ed334529c 100755 --- a/layout/tools/reftest/clean-reftest-output.pl +++ b/layout/tools/reftest/clean-reftest-output.pl @@ -56,7 +56,7 @@ while (<>) { next unless /REFTEST/; chomp; chop if /\r$/; - s,(PASS|FAIL)([^:]*):( \(!=\))? (.*),\1\2:\3 \4,; + s,(TEST-)([^\|]*) \| ([^\|]*) \|(.*),\1\2: \3\4,; s,(IMAGE[^:]*): (data:.*),\1,; print; print "\n"; diff --git a/layout/tools/reftest/reftest-analyzer.xhtml b/layout/tools/reftest/reftest-analyzer.xhtml index a9674d8accba..9133fa0641c6 100644 --- a/layout/tools/reftest/reftest-analyzer.xhtml +++ b/layout/tools/reftest/reftest-analyzer.xhtml @@ -141,17 +141,18 @@ function process_log(contents) { if (!match) continue; line = match[1]; - match = line.match(/^(PASS|UNEXPECTED PASS|KNOWN FAIL|UNEXPECTED FAIL)( \(RESULT EXPECTED TO BE RANDOM\)| \(SKIP\)|): (.*)/); + match = line.match(/^(TEST-PASS|TEST-UNEXPECTED-PASS|TEST-KNOWN-FAIL|TEST-UNEXPECTED-FAIL)(\(EXPECTED RANDOM\)|) \| ([^\|]+) \|(.*)/); if (match) { var state = match[1]; - var extra = match[2]; + var random = match[2]; var url = match[3]; + var extra = match[4]; gTestItems.push( { pass: !state.match(/FAIL$/), // only one of the following three should ever be true - unexpected: !!state.match(/^UNEXPECTED/), - random: (extra == " (RESULT EXPECTED TO BE RANDOM)"), + unexpected: !!state.match(/^TEST-UNEXPECTED/), + random: (random == "(EXPECTED RANDOM)"), skip: (extra == " (SKIP)"), url: url, images: [] diff --git a/layout/tools/reftest/reftest-to-html.pl b/layout/tools/reftest/reftest-to-html.pl index c3ebe17201da..a196dcc1b2c6 100755 --- a/layout/tools/reftest/reftest-to-html.pl +++ b/layout/tools/reftest/reftest-to-html.pl @@ -98,15 +98,15 @@ while (<>) { s/^REFTEST *//; my $randomresult = 0; - if (/RESULT EXPECTED TO BE RANDOM/) { - s/\(RESULT EXPECTED TO BE RANDOM\) //; + if (/EXPECTED RANDOM/) { + s/\(EXPECTED RANDOM\)//; $randomresult = 1; } - if (/^PASS(.*)$/) { + if (/^TEST-PASS \| (.*)$/) { my $class = $randomresult ? "PASSRANDOM" : "PASS"; print '' . do_html($1) . "\n"; - } elsif (/^UNEXPECTED (....): (.*)$/) { + } elsif (/^TEST-UNEXPECTED-(....) \| (.*)$/) { if ($randomresult) { die "Error on line $l: UNEXPECTED with test marked random?!"; } @@ -133,7 +133,7 @@ while (<>) { } print "\n"; - } elsif (/^KNOWN FAIL(.*$)/) { + } elsif (/^TEST-KNOWN-FAIL \| (.*$)/) { my $class = $randomresult ? "XFAILRANDOM" : "XFAIL"; print '' . do_html($1) . "\n"; } else { diff --git a/layout/tools/reftest/reftest.js b/layout/tools/reftest/reftest.js index 50aaf1ab3622..0a124ee7f045 100644 --- a/layout/tools/reftest/reftest.js +++ b/layout/tools/reftest/reftest.js @@ -110,7 +110,7 @@ function OnRefTestLoad() StartCurrentTest(); } catch (ex) { //gBrowser.loadURI('data:text/plain,' + ex); - dump("REFTEST EXCEPTION: " + ex + "\n"); + dump("REFTEST TEST-FAIL | | EXCEPTION: " + ex + "\n"); DoneTests(); } } @@ -281,7 +281,7 @@ function StartCurrentTest() { // make sure we don't run tests that are expected to kill the browser while (gURLs.length > 0 && gURLs[0].expected == EXPECTED_DEATH) { - dump("REFTEST KNOWN FAIL (SKIP): " + gURLs[0].url1.spec + "\n"); + dump("REFTEST TEST-KNOWN-FAIL | " + gURLs[0].url1.spec + " | (SKIP)\n"); gURLs.shift(); } @@ -396,7 +396,7 @@ function DocumentLoaded() clearTimeout(gFailureTimeout); if (gURLs[0].expected == EXPECTED_LOAD) { - dump("REFTEST PASS (LOAD ONLY): " + gURLs[0].prettyPath + "\n"); + dump("REFTEST TEST-PASS | " + gURLs[0].prettyPath + "| (LOAD ONLY)\n"); gURLs.shift(); StartCurrentTest(); return; @@ -449,19 +449,19 @@ function DocumentLoaded() var expected = gURLs[0].expected; var outputs = {}; - const randomMsg = " (RESULT EXPECTED TO BE RANDOM)"; - outputs[EXPECTED_PASS] = {true: "PASS", - false: "UNEXPECTED FAIL"}; - outputs[EXPECTED_FAIL] = {true: "UNEXPECTED PASS", - false: "KNOWN FAIL"}; - outputs[EXPECTED_RANDOM] = {true: "PASS" + randomMsg, - false: "KNOWN FAIL" + randomMsg}; + const randomMsg = "(EXPECTED RANDOM)"; + outputs[EXPECTED_PASS] = {true: "TEST-PASS", + false: "TEST-UNEXPECTED-FAIL"}; + outputs[EXPECTED_FAIL] = {true: "TEST-UNEXPECTED-PASS", + false: "TEST-KNOWN-FAIL"}; + outputs[EXPECTED_RANDOM] = {true: "TEST-PASS" + randomMsg, + false: "TEST-KNOWN-FAIL" + randomMsg}; - var result = "REFTEST " + outputs[expected][test_passed] + ": "; + var result = "REFTEST " + outputs[expected][test_passed] + " | "; + result += gURLs[0].prettyPath + " | "; // the URL being tested if (!gURLs[0].equal) { result += "(!=) "; } - result += gURLs[0].prettyPath; // the URL being tested dump(result + "\n"); if (!test_passed && expected == EXPECTED_PASS || test_passed && expected == EXPECTED_FAIL) { @@ -484,8 +484,8 @@ function DocumentLoaded() function LoadFailed() { - dump("REFTEST UNEXPECTED FAIL (LOADING): " + - gURLs[0]["url" + gState].spec + "\n"); + dump("REFTEST TEST-UNEXPECTED-FAIL | " + + gURLs[0]["url" + gState].spec + "| Failed to load\n"); gURLs.shift(); StartCurrentTest(); }