From 77d6685ae7f5ce55b23e4f6a90b62dc015555600 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 10 Jul 2020 17:46:59 +0000 Subject: [PATCH] Merge loading and updating manifest states when syncing. --- tools/wptrunner/wptrunner/update/sync.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/tools/wptrunner/wptrunner/update/sync.py b/tools/wptrunner/wptrunner/update/sync.py index 592ddc4311b708..c3da2098d3c55d 100644 --- a/tools/wptrunner/wptrunner/update/sync.py +++ b/tools/wptrunner/wptrunner/update/sync.py @@ -92,24 +92,18 @@ def create(self, state): self.logger.debug("New base commit is %s" % state.sync_commit.sha1) -class LoadManifest(Step): - """Load the test manifest""" +class UpdateManifest(Step): + """Update the manifest to match the tests in the sync tree checkout""" provides = ["manifest_path", "test_manifest"] def create(self, state): from manifest import manifest state.manifest_path = os.path.join(state.metadata_path, "MANIFEST.json") - state.test_manifest = manifest.Manifest(state.sync["path"], "/") - - -class UpdateManifest(Step): - """Update the manifest to match the tests in the sync tree checkout""" - - def create(self, state): - from manifest import manifest, update - update.update(state.sync["path"], state.test_manifest) - manifest.write(state.test_manifest, state.manifest_path) + state.test_manifest = manifest.load_and_update(state.sync["path"], + state.manifest_path, + "/", + write_manifest=True) class CopyWorkTree(Step): @@ -149,7 +143,6 @@ class SyncFromUpstreamRunner(StepRunner): """(Sub)Runner for doing an upstream sync""" steps = [UpdateCheckout, GetSyncTargetCommit, - LoadManifest, UpdateManifest, CopyWorkTree, CreateSyncPatch]