Diff manifests with raw string

After WPT moves to "Manifest path trie RFC", we don't have the `paths`
field in manifest anymore.

But, we still have file hash in the `items` field; the simplest way to
diff between manifests is to compare the raw string value of the `items`
field. When we have different manifests, we must have different items
field in the manifest json.
This commit is contained in:
CYBAI 2020-02-20 00:30:00 +09:00
parent 8f9e7166a2
commit 55f0d5ade1

View file

@ -166,10 +166,8 @@ def diff_manifests(logger, manifest_path, old_manifest, new_manifest):
if clean:
# Manifest currently has some list vs tuple inconsistencies that break
# a simple equality comparison.
new_paths = {(key, value[0], value[1])
for (key, value) in iteritems(new_manifest.to_json()["paths"])}
old_paths = {(key, value[0], value[1])
for (key, value) in iteritems(old_manifest.to_json()["paths"])}
old_paths = old_manifest.to_json()['items']
new_paths = new_manifest.to_json()['items']
if old_paths != new_paths:
logger.warning("Manifest %s contains correct tests but file hashes changed." % manifest_path) # noqa
clean = False