Skip to content

Commit

Permalink
Merge loading and updating manifest states when syncing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm authored and servo-wpt-sync committed Jul 10, 2020
1 parent f419e6a commit 77d6685
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions tools/wptrunner/wptrunner/update/sync.py
Expand Up @@ -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):
Expand Down Expand Up @@ -149,7 +143,6 @@ class SyncFromUpstreamRunner(StepRunner):
"""(Sub)Runner for doing an upstream sync"""
steps = [UpdateCheckout,
GetSyncTargetCommit,
LoadManifest,
UpdateManifest,
CopyWorkTree,
CreateSyncPatch]

0 comments on commit 77d6685

Please sign in to comment.