mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Update web-platform-tests and CSS tests.
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
This commit is contained in:
parent
fb4f421c8b
commit
296fa2512b
21852 changed files with 2080936 additions and 892894 deletions
|
@ -4,7 +4,7 @@ import subprocess
|
|||
import sys
|
||||
import urlparse
|
||||
|
||||
from wptrunner.update.sync import LoadManifest, UpdateCheckout
|
||||
from wptrunner.update.sync import UpdateCheckout
|
||||
from wptrunner.update.tree import get_unique_name
|
||||
from wptrunner.update.base import Step, StepRunner, exit_clean, exit_unclean
|
||||
|
||||
|
@ -82,6 +82,30 @@ class SyncToUpstream(Step):
|
|||
runner = SyncToUpstreamRunner(self.logger, state)
|
||||
runner.run()
|
||||
|
||||
class GetLastSyncData(Step):
|
||||
"""Find the gecko commit at which we last performed a sync with upstream and the upstream
|
||||
commit that was synced."""
|
||||
|
||||
provides = ["sync_data_path", "last_sync_commit", "old_upstream_rev"]
|
||||
|
||||
def create(self, state):
|
||||
self.logger.info("Looking for last sync commit")
|
||||
state.sync_data_path = os.path.join(state.metadata_path, "mozilla-sync")
|
||||
items = {}
|
||||
with open(state.sync_data_path) as f:
|
||||
for line in f.readlines():
|
||||
key, value = [item.strip() for item in line.split(":", 1)]
|
||||
items[key] = value
|
||||
|
||||
state.last_sync_commit = Commit(state.local_tree, items["local"])
|
||||
state.old_upstream_rev = items["upstream"]
|
||||
|
||||
if not state.local_tree.contains_commit(state.last_sync_commit):
|
||||
self.logger.error("Could not find last sync commit %s" % last_sync_sha1)
|
||||
return exit_clean
|
||||
|
||||
self.logger.info("Last sync to web-platform-tests happened in %s" % state.last_sync_commit.sha1)
|
||||
|
||||
|
||||
class CheckoutBranch(Step):
|
||||
"""Create a branch in the sync tree pointing at the last upstream sync commit
|
||||
|
@ -92,31 +116,11 @@ class CheckoutBranch(Step):
|
|||
def create(self, state):
|
||||
self.logger.info("Updating sync tree from %s" % state.sync["remote_url"])
|
||||
state.branch = state.sync_tree.unique_branch_name(
|
||||
"outbound_update_%s" % state.old_manifest.rev)
|
||||
"outbound_update_%s" % state.old_upstream_rev)
|
||||
state.sync_tree.update(state.sync["remote_url"],
|
||||
state.sync["branch"],
|
||||
state.branch)
|
||||
state.sync_tree.checkout(state.old_manifest.rev, state.branch, force=True)
|
||||
|
||||
|
||||
class GetLastSyncCommit(Step):
|
||||
"""Find the gecko commit at which we last performed a sync with upstream."""
|
||||
|
||||
provides = ["last_sync_path", "last_sync_commit"]
|
||||
|
||||
def create(self, state):
|
||||
self.logger.info("Looking for last sync commit")
|
||||
state.last_sync_path = os.path.join(state.metadata_path, "mozilla-sync")
|
||||
with open(state.last_sync_path) as f:
|
||||
last_sync_sha1 = f.read().strip()
|
||||
|
||||
state.last_sync_commit = Commit(state.local_tree, last_sync_sha1)
|
||||
|
||||
if not state.local_tree.contains_commit(state.last_sync_commit):
|
||||
self.logger.error("Could not find last sync commit %s" % last_sync_sha1)
|
||||
return exit_clean
|
||||
|
||||
self.logger.info("Last sync to web-platform-tests happened in %s" % state.last_sync_commit.sha1)
|
||||
state.sync_tree.checkout(state.old_upstream_rev, state.branch, force=True)
|
||||
|
||||
|
||||
class GetBaseCommit(Step):
|
||||
|
@ -283,15 +287,18 @@ class MergeUpstream(Step):
|
|||
return rv
|
||||
state.merge_index += 1
|
||||
|
||||
class UpdateLastSyncCommit(Step):
|
||||
class UpdateLastSyncData(Step):
|
||||
"""Update the gecko commit at which we last performed a sync with upstream."""
|
||||
|
||||
provides = []
|
||||
|
||||
def create(self, state):
|
||||
self.logger.info("Updating last sync commit")
|
||||
with open(state.last_sync_path, "w") as f:
|
||||
f.write(state.local_tree.rev)
|
||||
data = {"local": state.local_tree.rev,
|
||||
"upstream": state.sync_tree.rev}
|
||||
with open(state.sync_data_path, "w") as f:
|
||||
for key, value in data.iteritems():
|
||||
f.write("%s: %s\n" % (key, value))
|
||||
# This gets added to the patch later on
|
||||
|
||||
class MergeLocalBranch(Step):
|
||||
|
@ -364,10 +371,9 @@ class PRDeleteBranch(Step):
|
|||
|
||||
class SyncToUpstreamRunner(StepRunner):
|
||||
"""Runner for syncing local changes to upstream"""
|
||||
steps = [UpdateCheckout,
|
||||
LoadManifest,
|
||||
steps = [GetLastSyncData,
|
||||
UpdateCheckout,
|
||||
CheckoutBranch,
|
||||
GetLastSyncCommit,
|
||||
GetBaseCommit,
|
||||
LoadCommits,
|
||||
SelectCommits,
|
||||
|
@ -375,7 +381,7 @@ class SyncToUpstreamRunner(StepRunner):
|
|||
RebaseCommits,
|
||||
CheckRebase,
|
||||
MergeUpstream,
|
||||
UpdateLastSyncCommit]
|
||||
UpdateLastSyncData]
|
||||
|
||||
|
||||
class PRMergeRunner(StepRunner):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue