Backed out changeset c96c8279f39b (bug 1346782)

This commit is contained in:
Sebastian Hengst 2017-03-15 19:22:32 +01:00
Родитель 1a05668322
Коммит aa17b19b50
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -237,16 +237,18 @@ def get_manifest(metadata_root, test_path, url_base, run_info):
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)

Просмотреть файл

@ -496,10 +496,10 @@ class TestLoader(object):
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)