Skip to content

Commit

Permalink
Diff manifests with raw string
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CYBAI committed Feb 19, 2020
1 parent 8f9e716 commit 55f0d5a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/wpt/manifestupdate.py
Expand Up @@ -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
Expand Down

0 comments on commit 55f0d5a

Please sign in to comment.