Backed out changeset c96c8279f39b (bug 1346782)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 15 Mar 2017 19:22:32 +0100
changeset 347858 17d0869a9155629258459ae91f8b06196f7ef035
parent 347857 6c7615166d644cd907fa8b7ca0c2d0cf3377d7c4
child 347859 4f6130184eeff7747adbabb4c11a5a2af229625e
push id38951
push userkwierso@gmail.com
push dateWed, 15 Mar 2017 21:29:40 +0000
treeherderautoland@0b51e2a9d781 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1346782
milestone55.0a1
backs outc96c8279f39bdcde47852c4a88879663c9e315fc
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
Backed out changeset c96c8279f39b (bug 1346782)
testing/web-platform/harness/wptrunner/manifestexpected.py
testing/web-platform/harness/wptrunner/testloader.py
--- a/testing/web-platform/harness/wptrunner/manifestexpected.py
+++ b/testing/web-platform/harness/wptrunner/manifestexpected.py
@@ -232,23 +232,25 @@ def get_manifest(metadata_root, test_pat
             return static.compile(f,
                                   run_info,
                                   data_cls_getter=data_cls_getter,
                                   test_path=test_path,
                                   url_base=url_base)
     except IOError:
         return None
 
-def get_dir_manifest(path, run_info):
+def get_dir_manifest(metadata_root, path, run_info):
     """Get the ExpectedManifest for a particular test path, or None if there is no
     metadata stored for that test path.
 
-    :param path: Full path to the ini file
+    :param metadata_root: Absolute path to the root of the metadata directory
+    :param path: Path to the ini file relative to the metadata root
     :param run_info: Dictionary of properties of the test run for which the expectation
                      values should be computed.
     """
+    full_path = os.path.join(metadata_root, path)
     try:
-        with open(path) as f:
+        with open(full_path) as f:
             return static.compile(f,
                                   run_info,
                                   data_cls_getter=lambda x,y: DirectoryManifest)
     except IOError:
         return None
--- a/testing/web-platform/harness/wptrunner/testloader.py
+++ b/testing/web-platform/harness/wptrunner/testloader.py
@@ -491,20 +491,20 @@ class TestLoader(object):
             test_metadata = test_metadata.get_test(manifest_test.id)
 
         return wpttest.from_manifest(manifest_test, inherit_metadata, test_metadata)
 
     def load_dir_metadata(self, test_manifest, metadata_path, test_path):
         rv = []
         path_parts = os.path.dirname(test_path).split(os.path.sep)
         for i in xrange(1,len(path_parts) + 1):
-            path = os.path.join(metadata_path, os.path.sep.join(path_parts[:i]), "__dir__.ini")
+            path = os.path.join(os.path.sep.join(path_parts[:i]), "__dir__.ini")
             if path not in self.directory_manifests:
-                self.directory_manifests[path] = manifestexpected.get_dir_manifest(path,
-                                                                                   self.run_info)
+                self.directory_manifests[path] = manifestexpected.get_dir_manifest(
+                    metadata_path, path, self.run_info)
             manifest = self.directory_manifests[path]
             if manifest is not None:
                 rv.append(manifest)
         return rv
 
     def load_metadata(self, test_manifest, metadata_path, test_path):
         inherit_metadata = self.load_dir_metadata(test_manifest, metadata_path, test_path)
         test_metadata = manifestexpected.get_manifest(