Bug 1415692 - Don't enforce runByManifest for `prefs` in manifests on disabled tests. r=ahal draft
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 05 Dec 2017 15:45:21 -0800
changeset 707911 75465954440db52499fe8fb7f891558ad15de21e
parent 707910 0ad6bfce318b4648e43fc58a1a23804dac17beec
child 743062 c9c51941189677219716604e7e968af4da34edbf
push id92246
push usermozilla@noorenberghe.ca
push dateTue, 05 Dec 2017 23:46:23 +0000
reviewersahal
bugs1415692
milestone59.0a1
Bug 1415692 - Don't enforce runByManifest for `prefs` in manifests on disabled tests. r=ahal MozReview-Commit-ID: Fd9laiSVJwa
testing/mochitest/runtests.py
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1496,17 +1496,17 @@ toolbar#nav-bar {
                     'Warning: %s from manifest %s is not a valid test' %
                     (test['name'], test['manifest']))
                 continue
 
             manifest_relpath = os.path.relpath(test['manifest'], manifest_root)
             self.tests_by_manifest[manifest_relpath].append(tp)
             self.prefs_by_manifest[manifest_relpath].add(test.get('prefs'))
 
-            if 'prefs' in test and not options.runByManifest:
+            if 'prefs' in test and not options.runByManifest and 'disabled' not in test:
                 self.log.error("parsing {}: runByManifest mode must be enabled to "
                                "set the `prefs` key".format(manifest_relpath))
                 sys.exit(1)
 
             testob = {'path': tp, 'manifest': manifest_relpath}
             if 'disabled' in test:
                 testob['disabled'] = test['disabled']
             if 'expected' in test: