Bug 1484225 - Verify web-platform tests in the mozilla sub-directory also; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Mon, 27 Aug 2018 07:19:01 -0600
changeset 488623 99a5217b0171fc8cf57b3d1fc3a6c2905128d04f
parent 488622 b9122e49c7ea6d5e47c9c7d5ca2a4939e64947aa
child 488624 9e979fcf44ddcba566b49df5eb0cb8f80f4861c1
push id9734
push usershindli@mozilla.com
push dateThu, 30 Aug 2018 12:18:07 +0000
treeherdermozilla-beta@71c71ab3afae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1484225
milestone63.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 1484225 - Verify web-platform tests in the mozilla sub-directory also; r=jmaher
testing/mozharness/mozharness/mozilla/testing/per_test_base.py
--- a/testing/mozharness/mozharness/mozilla/testing/per_test_base.py
+++ b/testing/mozharness/mozharness/mozilla/testing/per_test_base.py
@@ -160,39 +160,43 @@ class SingleTestMixin(FetchesMixin):
         # the localpaths.py to do the path manipulation, which we load,
         # providing the __file__ variable so it can resolve the relative
         # paths correctly.
         paths_file = os.path.join(dirs['abs_wpttest_dir'],
                                   "tests", "tools", "localpaths.py")
         execfile(paths_file, {"__file__": paths_file})
         import manifest as wptmanifest
         tests_root = os.path.join(dirs['abs_wpttest_dir'], "tests")
-        man_path = os.path.join(dirs['abs_wpttest_dir'], "meta", "MANIFEST.json")
-        man = wptmanifest.manifest.load(tests_root, man_path)
-        self.info("Per-test run updated with manifest %s" % man_path)
+
+        for extra in ("", "mozilla"):
+            base_path = os.path.join(dirs['abs_wpttest_dir'], extra)
+            man_path = os.path.join(base_path, "meta", "MANIFEST.json")
+            man = wptmanifest.manifest.load(tests_root, man_path)
+            self.info("Per-test run updated with manifest %s" % man_path)
 
-        repo_tests_path = os.path.join("testing", "web-platform", "tests")
-        tests_path = os.path.join("tests", "web-platform", "tests")
-        for (type, path, test) in man:
-            if type not in ["testharness", "reftest", "wdspec"]:
-                continue
-            repo_path = os.path.join(repo_tests_path, path)
-            # manifest paths use os.sep (like backslash on Windows) but
-            # automation-relevance uses posixpath.sep
-            repo_path = repo_path.replace(os.sep, posixpath.sep)
-            if repo_path in changed_files:
-                self.info("Per-test run found web-platform test '%s', type %s" % (path, type))
-                suite_files = self.suites.get(type)
-                if not suite_files:
-                    suite_files = []
-                test_path = os.path.join(tests_path, path)
-                suite_files.append(test_path)
-                self.suites[type] = suite_files
-                self._map_test_path_to_source(test_path, repo_path)
-                changed_files.remove(repo_path)
+            repo_tests_path = os.path.join("testing", "web-platform", extra, "tests")
+            tests_path = os.path.join("tests", "web-platform", extra, "tests")
+            for (type, path, test) in man:
+                if type not in ["testharness", "reftest", "wdspec"]:
+                    continue
+                repo_path = os.path.join(repo_tests_path, path)
+                # manifest paths use os.sep (like backslash on Windows) but
+                # automation-relevance uses posixpath.sep
+                repo_path = repo_path.replace(os.sep, posixpath.sep)
+                if repo_path in changed_files:
+                    self.info("Per-test run found web-platform test '%s', type %s" % (path, type))
+                    suite_files = self.suites.get(type)
+                    if not suite_files:
+                        suite_files = []
+                    test_path = os.path.join(tests_path, path)
+                    suite_files.append(test_path)
+                    self.suites[type] = suite_files
+                    self._map_test_path_to_source(test_path, repo_path)
+                    changed_files.remove(repo_path)
+
         if os.environ.get('MOZHARNESS_TEST_PATHS', None) is not None:
             for file in changed_files:
                 self.fatal("Per-test run could not find requested web-platform test '%s'" %
                            file)
 
     def find_modified_tests(self):
         """
            For each file modified on this push, determine if the modified file