Commit 167121ea authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

[WPT import] Add a flag to upload but not submit CL

We used to have only one flag, --auto-update, which controls both
uploading and landing the import CL. This makes testing new setup of the
bot (i.e. LUCI in this case) hard.

This change adds one more flag, --auto-upload, to exercise more steps
(namely uploading and rebaselining), which will be used on the
experimental LUCI builder.

Bug: 790503
Change-Id: I4ce07fc9ddf15a34c9cb25ba4723d250cad26977
Reviewed-on: https://chromium-review.googlesource.com/c/1277587
Commit-Queue: Robert Ma <robertma@chromium.org>
Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599197}
parent 703e2b8a
......@@ -85,6 +85,10 @@ class TestImporter(object):
# Print out the full output when executive.run_command fails.
self.host.executive.error_output_limit = None
if options.auto_update and options.auto_upload:
_log.error('--auto-upload and --auto-update cannot be used together.')
return 1
if not self.checkout_is_okay():
return 1
......@@ -164,7 +168,7 @@ class TestImporter(object):
self._commit_changes(commit_message)
_log.info('Changes imported and committed.')
if not options.auto_update:
if not options.auto_upload and not options.auto_update:
return 0
self._upload_cl()
......@@ -173,6 +177,9 @@ class TestImporter(object):
if not self.update_expectations_for_cl():
return 1
if not options.auto_update:
return 0
if not self.run_commit_queue_for_cl():
return 1
......@@ -276,6 +283,9 @@ class TestImporter(object):
'--ignore-exportable-commits', action='store_true',
help='do not check for exportable commits that would be clobbered')
parser.add_argument('-r', '--revision', help='target wpt revision')
parser.add_argument(
'--auto-upload', action='store_true',
help='upload a CL, update expectations, but do NOT trigger CQ')
parser.add_argument(
'--auto-update', action='store_true',
help='upload a CL, update expectations, and trigger CQ')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment