From 55f0d5ade1ce18b98e0d7817e16a8673ee6967c5 Mon Sep 17 00:00:00 2001 From: CYBAI Date: Thu, 20 Feb 2020 00:30:00 +0900 Subject: [PATCH] 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. --- tests/wpt/manifestupdate.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/wpt/manifestupdate.py b/tests/wpt/manifestupdate.py index 45840f4aff9e..44fddda60276 100644 --- a/tests/wpt/manifestupdate.py +++ b/tests/wpt/manifestupdate.py @@ -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