Bug 1423771 - Suppress error when no reftests verified; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Wed, 03 Jan 2018 09:29:32 -0700
changeset 449391 1771c4a5c270a0f749dcd715989b4eaf3bcc4cfe
parent 449390 3c5811b083f9d3c4f6a45a17e5d676e9db522551
child 449392 368c043ee6071292f3bd507a6632a52658cad7a2
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1423771
milestone59.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 1423771 - Suppress error when no reftests verified; r=jmaher There are some edge cases in test verification where mozharness requests reftest verification of a non-reftest. In this case, it is best for the reftest harness to figure out that the requested file is not a test, do no work and exit cleanly without complaint.
layout/tools/reftest/reftest.jsm
layout/tools/reftest/runreftest.py
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -362,16 +362,18 @@ function StartTests()
     }
 
     g.noCanvasCache = prefs.getIntPref("reftest.nocache", false);
 
     g.shuffle = prefs.getBoolPref("reftest.shuffle", false);
 
     g.runUntilFailure = prefs.getBoolPref("reftest.runUntilFailure", false);
 
+    g.verify = prefs.getBoolPref("reftest.verify", false);
+
     g.cleanupPendingCrashes = prefs.getBoolPref("reftest.cleanupPendingCrashes", false);
 
     // Check if there are any crash dump files from the startup procedure, before
     // we start running the first test. Otherwise the first test might get
     // blamed for producing a crash dump file when that was not the case.
     CleanUpCrashDumpFiles();
 
     // When we repeat this function is called again, so really only want to set
@@ -474,17 +476,17 @@ function StartTests()
             if (crash_idx == -1) {
                 throw "Can't find the previously crashed test";
             }
             g.urls = g.urls.slice(crash_idx + 1);
         }
 
         g.totalTests = g.urls.length;
 
-        if (!g.totalTests)
+        if (!g.totalTests && !g.verify)
             throw "No tests to run";
 
         g.uriCanvases = {};
         StartCurrentTest();
     } catch (ex) {
         //g.browser.loadURI('data:text/plain,' + ex);
         ++g.testResults.Exception;
         logger.error("EXCEPTION: " + ex);
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -288,16 +288,18 @@ class RefTest(object):
         if options.ignoreWindowSize:
             prefs['reftest.ignoreWindowSize'] = True
         if options.shuffle:
             prefs['reftest.shuffle'] = True
         if options.repeat:
             prefs['reftest.repeat'] = options.repeat
         if options.runUntilFailure:
             prefs['reftest.runUntilFailure'] = True
+        if options.verify:
+            prefs['reftest.verify'] = True
         if options.cleanupCrashes:
             prefs['reftest.cleanupPendingCrashes'] = True
         prefs['reftest.focusFilterMode'] = options.focusFilterMode
         prefs['reftest.logLevel'] = options.log_tbpl_level or 'info'
         prefs['reftest.manifests'] = json.dumps(manifests)
         prefs['reftest.suite'] = options.suite
 
         if startAfter not in (None, self.TEST_SEEN_INITIAL, self.TEST_SEEN_FINAL):