Stop using deprecated manifest loading APIs.

This commit is contained in:
Josh Matthews 2019-03-20 10:12:46 -04:00
parent 3a46bf651a
commit fa0194fe23

View file

@ -6,6 +6,7 @@ import argparse
import imp import imp
import os import os
import sys import sys
import tempfile
from collections import defaultdict from collections import defaultdict
from mozlog.structured import commandline from mozlog.structured import commandline
@ -77,10 +78,28 @@ def _check_clean(logger, test_paths):
for url_base, paths in test_paths.iteritems(): for url_base, paths in test_paths.iteritems():
tests_path = paths["tests_path"] tests_path = paths["tests_path"]
manifest_path = os.path.join(paths["metadata_path"], "MANIFEST.json") manifest_path = os.path.join(paths["metadata_path"], "MANIFEST.json")
old_manifest = manifest.manifest.load(tests_path, manifest_path)
new_manifest = manifest.manifest.Manifest.from_json(tests_path, old_manifest = manifest.manifest.load_and_update(tests_path,
old_manifest.to_json()) manifest_path,
manifest.update.update(tests_path, new_manifest, working_copy=True) url_base,
working_copy=False,
update=False,
write_manifest=False,)
# Even if no cache is specified, one will be used automatically by the
# VCS integration. Create a brand new cache every time to ensure that
# the VCS integration always thinks that any file modifications in the
# working directory are new and interesting.
cache_root = tempfile.mkdtemp()
new_manifest = manifest.manifest.load_and_update(tests_path,
manifest_path,
url_base,
working_copy=True,
update=True,
cache_root=cache_root,
write_manifest=False,
allow_cached=False)
manifests_by_path[manifest_path] = (old_manifest, new_manifest) manifests_by_path[manifest_path] = (old_manifest, new_manifest)
for manifest_path, (old_manifest, new_manifest) in manifests_by_path.iteritems(): for manifest_path, (old_manifest, new_manifest) in manifests_by_path.iteritems():