Commit 2a96b429 authored by abarth@webkit.org's avatar abarth@webkit.org
Browse files

2010-10-13 Adam Barth <abarth@webkit.org>

        Reviewed by Csaba Osztrogonác.

        webkit-patch build shouldn't need --build to actually build!
        https://bugs.webkit.org/show_bug.cgi?id=47438

        Yeah, requiring --build for the build command is really dumb.  We did
        this originally because the build step is usually optional in other
        commands.  We don't have a good way of reversing the default for an
        option in one command.  This approach is slightly hacky since --build
        still shows up as an option on the help page, but at least it makes
        progress.  Passing --build is harmless, so the EWS bots shouldn't
        explode because of this change.

        * Scripts/webkitpy/tool/bot/commitqueuetask.py:
        * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
        * Scripts/webkitpy/tool/commands/download.py:
        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
        * Scripts/webkitpy/tool/commands/queues_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f3c0bd6c
2010-10-13 Adam Barth <abarth@webkit.org>
Reviewed by Csaba Osztrogonác.
webkit-patch build shouldn't need --build to actually build!
https://bugs.webkit.org/show_bug.cgi?id=47438
Yeah, requiring --build for the build command is really dumb. We did
this originally because the build step is usually optional in other
commands. We don't have a good way of reversing the default for an
option in one command. This approach is slightly hacky since --build
still shows up as an option on the help page, but at least it makes
progress. Passing --build is harmless, so the EWS bots shouldn't
explode because of this change.
* Scripts/webkitpy/tool/bot/commitqueuetask.py:
* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
* Scripts/webkitpy/tool/commands/download.py:
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
* Scripts/webkitpy/tool/commands/queues_unittest.py:
2010-10-13 Sheriff Bot <webkit.review.bot@gmail.com>
 
Unreviewed, rolling out r69638.
......
......@@ -76,7 +76,6 @@ class CommitQueueTask(object):
"build",
"--no-clean",
"--no-update",
"--build",
"--build-style=both",
"--quiet",
],
......@@ -88,7 +87,6 @@ class CommitQueueTask(object):
"build",
"--force-clean",
"--no-update",
"--build",
"--build-style=both",
"--quiet",
],
......
......@@ -68,7 +68,7 @@ class CommitQueueTaskTest(unittest.TestCase):
commit_queue = MockCommitQueue([])
expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
command_passed: success_message='Applied patch' patch='197'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
command_passed: success_message='Built patch' patch='197'
run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']
command_passed: success_message='Passed tests' patch='197'
......@@ -93,9 +93,9 @@ command_failed: failure_message='Patch does not apply' script_error='MOCK apply
])
expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
command_passed: success_message='Applied patch' patch='197'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
command_failed: failure_message='Patch does not build' script_error='MOCK build failure' patch='197'
run_webkit_patch: ['build', '--force-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--force-clean', '--no-update', '--build-style=both', '--quiet']
command_passed: success_message='Able to build without patch' patch='197'
"""
self._run_through_task(commit_queue, expected_stderr, ScriptError)
......@@ -108,9 +108,9 @@ command_passed: success_message='Able to build without patch' patch='197'
])
expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
command_passed: success_message='Applied patch' patch='197'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
command_failed: failure_message='Patch does not build' script_error='MOCK build failure' patch='197'
run_webkit_patch: ['build', '--force-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--force-clean', '--no-update', '--build-style=both', '--quiet']
command_failed: failure_message='Unable to build without patch' script_error='MOCK clean build failure' patch='197'
"""
self._run_through_task(commit_queue, expected_stderr)
......@@ -123,7 +123,7 @@ command_failed: failure_message='Unable to build without patch' script_error='MO
])
expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
command_passed: success_message='Applied patch' patch='197'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
command_passed: success_message='Built patch' patch='197'
run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']
command_failed: failure_message='Patch does not pass tests' script_error='MOCK tests failure' patch='197'
......@@ -143,7 +143,7 @@ command_passed: success_message='Landed patch' patch='197'
])
expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
command_passed: success_message='Applied patch' patch='197'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
command_passed: success_message='Built patch' patch='197'
run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']
command_failed: failure_message='Patch does not pass tests' script_error='MOCK test failure' patch='197'
......@@ -164,7 +164,7 @@ command_passed: success_message='Able to pass tests without patch' patch='197'
])
expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
command_passed: success_message='Applied patch' patch='197'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
command_passed: success_message='Built patch' patch='197'
run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']
command_failed: failure_message='Patch does not pass tests' script_error='MOCK test failure' patch='197'
......@@ -184,7 +184,7 @@ command_failed: failure_message='Unable to pass tests without patch (tree is red
])
expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
command_passed: success_message='Applied patch' patch='197'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
command_passed: success_message='Built patch' patch='197'
run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']
command_passed: success_message='Passed tests' patch='197'
......
......@@ -72,6 +72,9 @@ class Build(AbstractSequencedCommand):
steps.Build,
]
def _prepare_state(self, options, args, tool):
options.build = True
class BuildAndTest(AbstractSequencedCommand):
name = "build-and-test"
......
......@@ -48,7 +48,6 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue):
self.run_webkit_patch([
"build",
self.port.flag(),
"--build",
"--build-style=%s" % self._build_style,
"--force-clean",
"--no-update",
......
......@@ -237,7 +237,7 @@ MOCK: update_status: commit-queue Fail
"next_work_item": "",
"process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
MOCK: update_status: commit-queue Applied patch
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
MOCK: update_status: commit-queue Built patch
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']
MOCK: update_status: commit-queue Passed tests
......@@ -260,7 +260,7 @@ MOCK: update_status: commit-queue Pass
"next_work_item": "",
"process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--force-clean', '--non-interactive', '--quiet', 197]
MOCK: update_status: commit-queue Applied patch
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build', '--build-style=both', '--quiet']
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=both', '--quiet']
MOCK: update_status: commit-queue Built patch
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build-and-test', '--no-clean', '--no-update', '--test', '--quiet', '--non-interactive']
MOCK: update_status: commit-queue Passed tests
......
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