Remove use of deprecated logging from webkitpy.common and webkitpy.layout_tests
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2012 21:32:06 +0000 (21:32 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2012 21:32:06 +0000 (21:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103408

Reviewed by Dirk Pranke.

Remove the use of the deprecated log and error methods by replacing them with
logging through Python's logging.Logger objects.

This patch covers such changes in webkitpy.common and webkitpy.layout_tests and also
updates any affected unit test.

* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLogEntry._parse_entry):
* Scripts/webkitpy/common/checkout/checkout.py:
* Scripts/webkitpy/common/checkout/checkout_unittest.py:
(CheckoutTest.test_apply_patch):
* Scripts/webkitpy/common/checkout/deps_mock.py:
(MockDEPS.write_variable):
* Scripts/webkitpy/common/checkout/scm/detection.py:
(SCMDetector.default_scm):
* Scripts/webkitpy/common/checkout/scm/detection_unittest.py:
(SCMDetectorTest.test_detect_scm_system):
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git._check_git_architecture):
(Git._commit_on_branch):
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.ensure_clean_working_directory):
(SCM.ensure_no_local_commits):
(SCM.will.commit_locally_with_message):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.apply_reverse_diff):
* Scripts/webkitpy/common/net/bugzilla/attachment.py:
(Attachment._validate_flag_value):
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla._fetch_bug_page):
(Bugzilla.bug_id_for_attachment_id):
(Bugzilla.authenticate):
(Bugzilla._commit_queue_flag):
(Bugzilla.add_attachment_to_bug):
(Bugzilla.add_patch_to_bug):
(Bugzilla.create_bug):
(Bugzilla.clear_attachment_flags):
(Bugzilla.set_flag_on_attachment):
(Bugzilla.obsolete_attachment):
(Bugzilla.add_cc_to_bug):
(Bugzilla.post_comment_to_bug):
(Bugzilla.close_bug_as_fixed):
(Bugzilla.reassign_bug):
(reopen_bug):
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzilla.create_bug):
(MockBugzilla.reassign_bug):
(MockBugzilla.set_flag_on_attachment):
(MockBugzilla.post_comment_to_bug):
(MockBugzilla.add_attachment_to_bug):
(MockBugzilla.add_patch_to_bug):
(MockBugzilla.reopen_bug):
* Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
(test_add_cc_to_bug):
(_assert_reopen):
(test_reopen_bug):
* Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
(MockBuilder.force_build):
* Scripts/webkitpy/common/net/credentials.py:
(Credentials._run_security_tool):
* Scripts/webkitpy/common/net/credentials_unittest.py:
(_assert_security_call):
* Scripts/webkitpy/common/net/irc/irc_mock.py:
(MockIRC.post):
(MockIRC.disconnect):
* Scripts/webkitpy/common/net/irc/ircproxy.py:
(IRCProxy.__init__):
(IRCProxy.disconnect):
* Scripts/webkitpy/common/net/irc/ircproxy_unittest.py:
(IRCProxyTest.test_trivial):
* Scripts/webkitpy/common/net/layouttestresults.py:
(ORWTResultsHTMLParser._failures_from_fail_row):
* Scripts/webkitpy/common/net/layouttestresults_unittest.py:
(test_failures_from_fail_row):
* Scripts/webkitpy/common/net/networktransaction.py:
* Scripts/webkitpy/common/net/resultsjsonparser.py:
(JSONTestResult._tokenize):
(JSONTestResult._failure_types_from_actual_result):
* Scripts/webkitpy/common/net/statusserver.py:
(StatusServer.update_status):
(StatusServer.update_svn_revision):
* Scripts/webkitpy/common/net/statusserver_mock.py:
(MockStatusServer.release_work_item):
(MockStatusServer.update_work_items):
(MockStatusServer.submit_to_ews):
(MockStatusServer.update_status):
* Scripts/webkitpy/common/net/unittestresults.py:
(UnitTestResults.results_from_string):
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.running_pids):
(MockExecutive.run_and_throw_if_fail):
(MockExecutive.run_command):
(MockExecutive.popen):
* Scripts/webkitpy/common/system/user_mock.py:
(MockUser.confirm):
(MockUser.open_url):
* Scripts/webkitpy/common/system/workspace_unittest.py:
(WorkspaceTest.test_create_zip):
(WorkspaceTest.test_create_zip_exception):
* Scripts/webkitpy/common/watchlist/watchlist_mock.py:
(MockWatchList.determine_cc_and_messages):
* Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
(ChromiumWinTest.test_setup_environ_for_server_register_cygwin):
* Scripts/webkitpy/layout_tests/port/efl_unittest.py:
(EflPortTest.test_show_results_html_file):
* Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
(GtkPortTest.test_show_results_html_file):
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(test_show_results_html_file):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
(test_build_driver):
* Scripts/webkitpy/layout_tests/port/qt_unittest.py:
(QtPortTest.test_show_results_html_file):
* Scripts/webkitpy/layout_tests/port/win_unittest.py:
(WinPortTest.test_show_results_html_file):
* Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
(XvfbDriverTest.assertDriverStartSuccessful):
(XvfbDriverTest.test_start_no_pixel_tests):
(XvfbDriverTest.test_start_pixel_tests):
(XvfbDriverTest.test_start_arbitrary_worker_number):
(XvfbDriverTest.test_start_next_worker):
(XvfbDriverTest.test_stop):
* Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py:
(TestLayoutTestApacheHttpd.test_start_cmd):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_run_test_pause_before_testing):
(test_run_memory_test):
(_test_run_with_json_output):
(test_run_respects_no_results):
(test_run_generates_and_show_results_page):
(test_run_respects_no_show_results):
* Scripts/webkitpy/tool/bot/feeders_unittest.py:
(FeedersTest.test_commit_queue_feeder):
* Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
(FlakyTestReporterTest.test_create_bug_for_flaky_test):
(test_report_flaky_tests_creating_bug):
* Scripts/webkitpy/tool/bot/irc_command_unittest.py:
(IRCCommandTest.test_rollout_updates_working_copy):
* Scripts/webkitpy/tool/bot/ircbot_unittest.py:
(IRCBotTest.test_exception_during_command):
(IRCBotTest.test_hi):
(IRCBotTest.test_help):
(IRCBotTest.test_restart):
(IRCBotTest.test_rollout):
(IRCBotTest.test_revert):
(IRCBotTest.test_roll_chromium_deps):
(IRCBotTest.test_roll_chromium_deps_to_lkgr):
(IRCBotTest.test_multi_rollout):
(IRCBotTest.test_rollout_with_r_in_svn_revision):
(IRCBotTest.test_multi_rollout_with_r_in_svn_revision):
(IRCBotTest.test_rollout_bananas):
(IRCBotTest.test_rollout_invalidate_revision):
(IRCBotTest.test_rollout_invalidate_reason):
(test_multi_rollout_invalidate_reason):
(test_rollout_no_reason):
(test_multi_rollout_no_reason):
* Scripts/webkitpy/tool/bot/sheriff_unittest.py:
(SheriffTest.test_post_blame_comment_on_bug):
* Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
(ApplyWatchListLocalTest.test_args_parsing):
(test_args_parsing_with_bug):
* Scripts/webkitpy/tool/commands/download_unittest.py:
(test_land_cowboy):
(test_check_style):
(test_create_rollout):
(test_create_rollout_resolved):
(test_rollout):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(AbstractEarlyWarningSystemTest.test_failing_tests_message):
(EarlyWarningSytemTest._default_expected_logs):
(EarlyWarningSytemTest._test_builder_ews):
(EarlyWarningSytemTest._test_testing_ews):
* Scripts/webkitpy/tool/commands/openbugs_unittest.py:
(OpenBugsTest.test_args_parsing):
* Scripts/webkitpy/tool/commands/queries_unittest.py:
(QueryCommandsTest.test_bugs_to_commit):
(QueryCommandsTest.test_patches_in_commit_queue):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(FeederQueueTest.test_feeder_queue):
(AbstractPatchQueueTest.test_next_patch):
(AbstractPatchQueueTest.test_upload_results_archive_for_patch):
(CommitQueueTest.test_commit_queue):
(test_commit_queue_failure):
(test_commit_queue_failure_with_failing_tests):
(test_rollout):
(test_rollout_lands):
(test_auto_retry):
(test_manual_reject_during_processing):
(test_report_flaky_tests):
(StyleQueueTest.test_style_queue_with_style_exception):
(test_style_queue_with_watch_list_exception):
* Scripts/webkitpy/tool/commands/queuestest.py:
(QueuesTest._default_begin_work_queue_logs):
* Scripts/webkitpy/tool/commands/roll_unittest.py:
(RollCommandsTest.test_update_chromium_deps):
* Scripts/webkitpy/tool/commands/upload_unittest.py:
(UploadCommandsTest.test_assign_to_committer):
(test_post):
(test_attach_to_bug):
(test_attach_to_bug_no_description_or_comment):
(test_land_safely):
(test_prepare):
(test_upload):
(test_mark_bug_fixed):
* Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
(ApplyWatchListTest.test_apply_watch_list_local):
* Scripts/webkitpy/tool/steps/commit_unittest.py:
(CommitTest._test_check_test_expectations):
* Scripts/webkitpy/tool/steps/runtests_unittest.py:
(RunTestsTest.test_webkit_run_unit_tests):
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest._assert_step_output_with_bug):
(StepsTest._assert_post_diff_output_for_bug):
(StepsTest.test_post_diff):
(StepsTest.test_post_diff_for_commit):
(StepsTest.test_ensure_bug_is_open_and_assigned):
(StepsTest.test_runtests_args):
* Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py:
(SuggestReviewersTest.test_basic):
* Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py:
(ValidateChangeLogsTest._assert_start_line_produces_output):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

61 files changed:
Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/changelog.py
Tools/Scripts/webkitpy/common/checkout/checkout.py
Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
Tools/Scripts/webkitpy/common/checkout/deps_mock.py
Tools/Scripts/webkitpy/common/checkout/scm/detection.py
Tools/Scripts/webkitpy/common/checkout/scm/detection_unittest.py
Tools/Scripts/webkitpy/common/checkout/scm/git.py
Tools/Scripts/webkitpy/common/checkout/scm/scm.py
Tools/Scripts/webkitpy/common/checkout/scm/svn.py
Tools/Scripts/webkitpy/common/net/bugzilla/attachment.py
Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py
Tools/Scripts/webkitpy/common/net/credentials.py
Tools/Scripts/webkitpy/common/net/credentials_unittest.py
Tools/Scripts/webkitpy/common/net/irc/irc_mock.py
Tools/Scripts/webkitpy/common/net/irc/ircproxy.py
Tools/Scripts/webkitpy/common/net/irc/ircproxy_unittest.py
Tools/Scripts/webkitpy/common/net/layouttestresults.py
Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
Tools/Scripts/webkitpy/common/net/networktransaction.py
Tools/Scripts/webkitpy/common/net/resultsjsonparser.py
Tools/Scripts/webkitpy/common/net/statusserver.py
Tools/Scripts/webkitpy/common/net/statusserver_mock.py
Tools/Scripts/webkitpy/common/net/unittestresults.py
Tools/Scripts/webkitpy/common/system/executive_mock.py
Tools/Scripts/webkitpy/common/system/user_mock.py
Tools/Scripts/webkitpy/common/system/workspace_unittest.py
Tools/Scripts/webkitpy/common/watchlist/watchlist_mock.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py
Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py
Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py
Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py
Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py
Tools/Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py
Tools/Scripts/webkitpy/tool/commands/download_unittest.py
Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
Tools/Scripts/webkitpy/tool/commands/openbugs_unittest.py
Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
Tools/Scripts/webkitpy/tool/commands/queuestest.py
Tools/Scripts/webkitpy/tool/commands/roll_unittest.py
Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py
Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
Tools/Scripts/webkitpy/tool/steps/steps_unittest.py
Tools/Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py
Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py

index 450052d..0f407f4 100644 (file)
@@ -1,3 +1,232 @@
+2012-11-27  Zan Dobersek  <zandobersek@gmail.com>
+
+        Remove use of deprecated logging from webkitpy.common and webkitpy.layout_tests
+        https://bugs.webkit.org/show_bug.cgi?id=103408
+
+        Reviewed by Dirk Pranke.
+
+        Remove the use of the deprecated log and error methods by replacing them with
+        logging through Python's logging.Logger objects.
+
+        This patch covers such changes in webkitpy.common and webkitpy.layout_tests and also
+        updates any affected unit test.
+
+        * Scripts/webkitpy/common/checkout/changelog.py:
+        (ChangeLogEntry._parse_entry):
+        * Scripts/webkitpy/common/checkout/checkout.py:
+        * Scripts/webkitpy/common/checkout/checkout_unittest.py:
+        (CheckoutTest.test_apply_patch):
+        * Scripts/webkitpy/common/checkout/deps_mock.py:
+        (MockDEPS.write_variable):
+        * Scripts/webkitpy/common/checkout/scm/detection.py:
+        (SCMDetector.default_scm):
+        * Scripts/webkitpy/common/checkout/scm/detection_unittest.py:
+        (SCMDetectorTest.test_detect_scm_system):
+        * Scripts/webkitpy/common/checkout/scm/git.py:
+        (Git._check_git_architecture):
+        (Git._commit_on_branch):
+        * Scripts/webkitpy/common/checkout/scm/scm.py:
+        (SCM.ensure_clean_working_directory):
+        (SCM.ensure_no_local_commits):
+        (SCM.will.commit_locally_with_message):
+        * Scripts/webkitpy/common/checkout/scm/svn.py:
+        (SVN.apply_reverse_diff):
+        * Scripts/webkitpy/common/net/bugzilla/attachment.py:
+        (Attachment._validate_flag_value):
+        * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+        (Bugzilla._fetch_bug_page):
+        (Bugzilla.bug_id_for_attachment_id):
+        (Bugzilla.authenticate):
+        (Bugzilla._commit_queue_flag):
+        (Bugzilla.add_attachment_to_bug):
+        (Bugzilla.add_patch_to_bug):
+        (Bugzilla.create_bug):
+        (Bugzilla.clear_attachment_flags):
+        (Bugzilla.set_flag_on_attachment):
+        (Bugzilla.obsolete_attachment):
+        (Bugzilla.add_cc_to_bug):
+        (Bugzilla.post_comment_to_bug):
+        (Bugzilla.close_bug_as_fixed):
+        (Bugzilla.reassign_bug):
+        (reopen_bug):
+        * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
+        (MockBugzilla.create_bug):
+        (MockBugzilla.reassign_bug):
+        (MockBugzilla.set_flag_on_attachment):
+        (MockBugzilla.post_comment_to_bug):
+        (MockBugzilla.add_attachment_to_bug):
+        (MockBugzilla.add_patch_to_bug):
+        (MockBugzilla.reopen_bug):
+        * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+        (test_add_cc_to_bug):
+        (_assert_reopen):
+        (test_reopen_bug):
+        * Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
+        (MockBuilder.force_build):
+        * Scripts/webkitpy/common/net/credentials.py:
+        (Credentials._run_security_tool):
+        * Scripts/webkitpy/common/net/credentials_unittest.py:
+        (_assert_security_call):
+        * Scripts/webkitpy/common/net/irc/irc_mock.py:
+        (MockIRC.post):
+        (MockIRC.disconnect):
+        * Scripts/webkitpy/common/net/irc/ircproxy.py:
+        (IRCProxy.__init__):
+        (IRCProxy.disconnect):
+        * Scripts/webkitpy/common/net/irc/ircproxy_unittest.py:
+        (IRCProxyTest.test_trivial):
+        * Scripts/webkitpy/common/net/layouttestresults.py:
+        (ORWTResultsHTMLParser._failures_from_fail_row):
+        * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+        (test_failures_from_fail_row):
+        * Scripts/webkitpy/common/net/networktransaction.py:
+        * Scripts/webkitpy/common/net/resultsjsonparser.py:
+        (JSONTestResult._tokenize):
+        (JSONTestResult._failure_types_from_actual_result):
+        * Scripts/webkitpy/common/net/statusserver.py:
+        (StatusServer.update_status):
+        (StatusServer.update_svn_revision):
+        * Scripts/webkitpy/common/net/statusserver_mock.py:
+        (MockStatusServer.release_work_item):
+        (MockStatusServer.update_work_items):
+        (MockStatusServer.submit_to_ews):
+        (MockStatusServer.update_status):
+        * Scripts/webkitpy/common/net/unittestresults.py:
+        (UnitTestResults.results_from_string):
+        * Scripts/webkitpy/common/system/executive_mock.py:
+        (MockExecutive.running_pids):
+        (MockExecutive.run_and_throw_if_fail):
+        (MockExecutive.run_command):
+        (MockExecutive.popen):
+        * Scripts/webkitpy/common/system/user_mock.py:
+        (MockUser.confirm):
+        (MockUser.open_url):
+        * Scripts/webkitpy/common/system/workspace_unittest.py:
+        (WorkspaceTest.test_create_zip):
+        (WorkspaceTest.test_create_zip_exception):
+        * Scripts/webkitpy/common/watchlist/watchlist_mock.py:
+        (MockWatchList.determine_cc_and_messages):
+        * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+        (ChromiumWinTest.test_setup_environ_for_server_register_cygwin):
+        * Scripts/webkitpy/layout_tests/port/efl_unittest.py:
+        (EflPortTest.test_show_results_html_file):
+        * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+        (GtkPortTest.test_show_results_html_file):
+        * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+        (test_show_results_html_file):
+        * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+        (test_build_driver):
+        * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+        (QtPortTest.test_show_results_html_file):
+        * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+        (WinPortTest.test_show_results_html_file):
+        * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
+        (XvfbDriverTest.assertDriverStartSuccessful):
+        (XvfbDriverTest.test_start_no_pixel_tests):
+        (XvfbDriverTest.test_start_pixel_tests):
+        (XvfbDriverTest.test_start_arbitrary_worker_number):
+        (XvfbDriverTest.test_start_next_worker):
+        (XvfbDriverTest.test_stop):
+        * Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py:
+        (TestLayoutTestApacheHttpd.test_start_cmd):
+        * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+        (test_run_test_pause_before_testing):
+        (test_run_memory_test):
+        (_test_run_with_json_output):
+        (test_run_respects_no_results):
+        (test_run_generates_and_show_results_page):
+        (test_run_respects_no_show_results):
+        * Scripts/webkitpy/tool/bot/feeders_unittest.py:
+        (FeedersTest.test_commit_queue_feeder):
+        * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+        (FlakyTestReporterTest.test_create_bug_for_flaky_test):
+        (test_report_flaky_tests_creating_bug):
+        * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+        (IRCCommandTest.test_rollout_updates_working_copy):
+        * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+        (IRCBotTest.test_exception_during_command):
+        (IRCBotTest.test_hi):
+        (IRCBotTest.test_help):
+        (IRCBotTest.test_restart):
+        (IRCBotTest.test_rollout):
+        (IRCBotTest.test_revert):
+        (IRCBotTest.test_roll_chromium_deps):
+        (IRCBotTest.test_roll_chromium_deps_to_lkgr):
+        (IRCBotTest.test_multi_rollout):
+        (IRCBotTest.test_rollout_with_r_in_svn_revision):
+        (IRCBotTest.test_multi_rollout_with_r_in_svn_revision):
+        (IRCBotTest.test_rollout_bananas):
+        (IRCBotTest.test_rollout_invalidate_revision):
+        (IRCBotTest.test_rollout_invalidate_reason):
+        (test_multi_rollout_invalidate_reason):
+        (test_rollout_no_reason):
+        (test_multi_rollout_no_reason):
+        * Scripts/webkitpy/tool/bot/sheriff_unittest.py:
+        (SheriffTest.test_post_blame_comment_on_bug):
+        * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
+        (ApplyWatchListLocalTest.test_args_parsing):
+        (test_args_parsing_with_bug):
+        * Scripts/webkitpy/tool/commands/download_unittest.py:
+        (test_land_cowboy):
+        (test_check_style):
+        (test_create_rollout):
+        (test_create_rollout_resolved):
+        (test_rollout):
+        * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+        (AbstractEarlyWarningSystemTest.test_failing_tests_message):
+        (EarlyWarningSytemTest._default_expected_logs):
+        (EarlyWarningSytemTest._test_builder_ews):
+        (EarlyWarningSytemTest._test_testing_ews):
+        * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
+        (OpenBugsTest.test_args_parsing):
+        * Scripts/webkitpy/tool/commands/queries_unittest.py:
+        (QueryCommandsTest.test_bugs_to_commit):
+        (QueryCommandsTest.test_patches_in_commit_queue):
+        * Scripts/webkitpy/tool/commands/queues_unittest.py:
+        (FeederQueueTest.test_feeder_queue):
+        (AbstractPatchQueueTest.test_next_patch):
+        (AbstractPatchQueueTest.test_upload_results_archive_for_patch):
+        (CommitQueueTest.test_commit_queue):
+        (test_commit_queue_failure):
+        (test_commit_queue_failure_with_failing_tests):
+        (test_rollout):
+        (test_rollout_lands):
+        (test_auto_retry):
+        (test_manual_reject_during_processing):
+        (test_report_flaky_tests):
+        (StyleQueueTest.test_style_queue_with_style_exception):
+        (test_style_queue_with_watch_list_exception):
+        * Scripts/webkitpy/tool/commands/queuestest.py:
+        (QueuesTest._default_begin_work_queue_logs):
+        * Scripts/webkitpy/tool/commands/roll_unittest.py:
+        (RollCommandsTest.test_update_chromium_deps):
+        * Scripts/webkitpy/tool/commands/upload_unittest.py:
+        (UploadCommandsTest.test_assign_to_committer):
+        (test_post):
+        (test_attach_to_bug):
+        (test_attach_to_bug_no_description_or_comment):
+        (test_land_safely):
+        (test_prepare):
+        (test_upload):
+        (test_mark_bug_fixed):
+        * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
+        (ApplyWatchListTest.test_apply_watch_list_local):
+        * Scripts/webkitpy/tool/steps/commit_unittest.py:
+        (CommitTest._test_check_test_expectations):
+        * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+        (RunTestsTest.test_webkit_run_unit_tests):
+        * Scripts/webkitpy/tool/steps/steps_unittest.py:
+        (StepsTest._assert_step_output_with_bug):
+        (StepsTest._assert_post_diff_output_for_bug):
+        (StepsTest.test_post_diff):
+        (StepsTest.test_post_diff_for_commit):
+        (StepsTest.test_ensure_bug_is_open_and_assigned):
+        (StepsTest.test_runtests_args):
+        * Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py:
+        (SuggestReviewersTest.test_basic):
+        * Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py:
+        (ValidateChangeLogsTest._assert_start_line_produces_output):
+
 2012-11-27  Pratik Solanki  <psolanki@apple.com>
 
         objc/objc-runtime.h does not exist on all PLATFORM(MAC)
index ae7b71f..c5cf42c 100644 (file)
 
 import codecs
 import fileinput # inplace file editing for set_reviewer_in_changelog
+import logging
 import re
 import textwrap
 
 from webkitpy.common.config.committers import CommitterList
 from webkitpy.common.config.committers import Account
 import webkitpy.common.config.urls as config_urls
-from webkitpy.common.system.deprecated_logging import log
+
+_log = logging.getLogger(__name__)
 
 
 # FIXME: parse_bug_id_from_changelog should not be a free function.
@@ -162,7 +164,7 @@ class ChangeLogEntry(object):
     def _parse_entry(self):
         match = re.match(self.date_line_regexp, self._contents, re.MULTILINE)
         if not match:
-            log("WARNING: Creating invalid ChangeLogEntry:\n%s" % self._contents)
+            _log.warning("Creating invalid ChangeLogEntry:\n%s" % self._contents)
 
         # FIXME: group("name") does not seem to be Unicode?  Probably due to self._contents not being unicode.
         self._author_text = match.group("authors") if match else None
index 8f45024..fb686f4 100644 (file)
@@ -35,7 +35,6 @@ from webkitpy.common.checkout.scm import CommitMessage
 from webkitpy.common.checkout.deps import DEPS
 from webkitpy.common.memoized import memoized
 from webkitpy.common.system.executive import ScriptError
-from webkitpy.common.system.deprecated_logging import log
 
 
 # This class represents the WebKit-specific parts of the checkout (like ChangeLogs).
index e9c2cdd..a3b47c9 100644 (file)
@@ -259,5 +259,5 @@ class CheckoutTest(unittest.TestCase):
         mock_patch = Mock()
         mock_patch.contents = lambda: "foo"
         mock_patch.reviewer = lambda: None
-        expected_stderr = "MOCK run_command: ['svn-apply', '--force'], cwd=/mock-checkout, input=foo\n"
-        OutputCapture().assert_outputs(self, checkout.apply_patch, [mock_patch], expected_stderr=expected_stderr)
+        expected_logs = "MOCK run_command: ['svn-apply', '--force'], cwd=/mock-checkout, input=foo\n"
+        OutputCapture().assert_outputs(self, checkout.apply_patch, [mock_patch], expected_logs=expected_logs)
index cb57e8b..423deba 100644 (file)
@@ -26,8 +26,9 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import logging
 
-from webkitpy.common.system.deprecated_logging import log
+_log = logging.getLogger(__name__)
 
 
 class MockDEPS(object):
@@ -35,4 +36,4 @@ class MockDEPS(object):
         return 6564
 
     def write_variable(self, name, value):
-        log("MOCK: MockDEPS.write_variable(%s, %s)" % (name, value))
+        _log.info("MOCK: MockDEPS.write_variable(%s, %s)" % (name, value))
index 44bc926..e635b40 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import logging
+
 from webkitpy.common.system.filesystem import FileSystem
 from webkitpy.common.system.executive import Executive
 
-from webkitpy.common.system.deprecated_logging import log
-
 from .svn import SVN
 from .git import Git
 
+_log = logging.getLogger(__name__)
+
 
 class SCMDetector(object):
     def __init__(self, filesystem, executive):
@@ -55,7 +57,7 @@ class SCMDetector(object):
             script_directory = self._filesystem.dirname(self._filesystem.path_to_module(self.__module__))
             scm_system = self.detect_scm_system(script_directory, patch_directories)
             if scm_system:
-                log("The current directory (%s) is not a WebKit checkout, using %s" % (cwd, scm_system.checkout_root))
+                _log.info("The current directory (%s) is not a WebKit checkout, using %s" % (cwd, scm_system.checkout_root))
             else:
                 raise Exception("FATAL: Failed to determine the SCM system for either %s or %s" % (cwd, script_directory))
         return scm_system
index ecd9125..1d74848 100644 (file)
@@ -42,7 +42,7 @@ class SCMDetectorTest(unittest.TestCase):
         executive = MockExecutive(should_log=True)
         detector = SCMDetector(filesystem, executive)
 
-        expected_stderr = "MOCK run_command: ['svn', 'info'], cwd=/\nMOCK run_command: ['git', 'rev-parse', '--is-inside-work-tree'], cwd=/\n"
-        scm = OutputCapture().assert_outputs(self, detector.detect_scm_system, ["/"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK run_command: ['svn', 'info'], cwd=/\nMOCK run_command: ['git', 'rev-parse', '--is-inside-work-tree'], cwd=/\n"
+        scm = OutputCapture().assert_outputs(self, detector.detect_scm_system, ["/"], expected_logs=expected_logs)
         self.assertEqual(scm, None)
         # FIXME: This should make a synthetic tree and test SVN and Git detection in that tree.
index f688238..6313256 100644 (file)
@@ -32,14 +32,12 @@ import os
 import re
 
 from webkitpy.common.memoized import memoized
-from webkitpy.common.system.deprecated_logging import log
 from webkitpy.common.system.executive import Executive, ScriptError
 
 from .commitmessage import CommitMessage
 from .scm import AuthenticationError, SCM, commit_error_handler
 from .svn import SVN, SVNRepository
 
-
 _log = logging.getLogger(__name__)
 
 
@@ -96,7 +94,7 @@ class Git(SCM, SVNRepository):
             return
 
         webkit_dev_thread_url = "https://lists.webkit.org/pipermail/webkit-dev/2010-December/015287.html"
-        log("Warning: This machine is 64-bit, but the git binary (%s) does not support 64-bit.\nInstall a 64-bit git for better performance, see:\n%s\n" % (git_path, webkit_dev_thread_url))
+        _log.warning("This machine is 64-bit, but the git binary (%s) does not support 64-bit.\nInstall a 64-bit git for better performance, see:\n%s\n" % (git_path, webkit_dev_thread_url))
 
     def _run_git(self, command_args, **kwargs):
         full_command_args = [self.executable_name] + command_args
@@ -403,7 +401,7 @@ class Git(SCM, SVNRepository):
             self._run_git(['commit', '-m', message])
             output = self.push_local_commits_to_server(username=username, password=password)
         except Exception, e:
-            log("COMMIT FAILED: " + str(e))
+            _log.warning("COMMIT FAILED: " + str(e))
             output = "Commit failed."
             commit_succeeded = False
         finally:
index ee63b71..7d6e180 100644 (file)
 
 import logging
 import re
+import sys
 
-from webkitpy.common.system.deprecated_logging import error, log
 from webkitpy.common.system.executive import Executive, ScriptError
 from webkitpy.common.system.filesystem import FileSystem
 
+_log = logging.getLogger(__name__)
+
 
 class CheckoutNeedsUpdate(ScriptError):
     def __init__(self, script_args, exit_code, output, cwd):
@@ -94,7 +96,7 @@ class SCM:
         if not force_clean:
             print self.run(self.status_command(), error_handler=Executive.ignore_error, cwd=self.checkout_root)
             raise ScriptError(message="Working directory has modifications, pass --force-clean or --no-clean to continue.")
-        log("Cleaning working directory")
+        _log.info("Cleaning working directory")
         self.clean_working_directory()
 
     def ensure_no_local_commits(self, force):
@@ -104,7 +106,8 @@ class SCM:
         if not len(commits):
             return
         if not force:
-            error("Working directory has local commits, pass --force-clean to continue.")
+            _log.error("Working directory has local commits, pass --force-clean to continue.")
+            sys.exit(1)
         self.discard_local_commits()
 
     def run_status_and_extract_filenames(self, status_command, status_regexp):
@@ -238,7 +241,8 @@ class SCM:
         SCM._subclass_must_implement()
 
     def commit_locally_with_message(self, message):
-        error("Your source control manager does not support local commits.")
+        _log.error("Your source control manager does not support local commits.")
+        sys.exit(1)
 
     def discard_local_commits(self):
         pass
index 112be05..1323b70 100644 (file)
@@ -35,12 +35,10 @@ import sys
 import tempfile
 
 from webkitpy.common.memoized import memoized
-from webkitpy.common.system.deprecated_logging import log
 from webkitpy.common.system.executive import Executive, ScriptError
 
 from .scm import AuthenticationError, SCM, commit_error_handler
 
-
 _log = logging.getLogger(__name__)
 
 
@@ -311,8 +309,8 @@ class SVN(SCM, SVNRepository):
     def apply_reverse_diff(self, revision):
         # '-c -revision' applies the inverse diff of 'revision'
         svn_merge_args = ['merge', '--non-interactive', '-c', '-%s' % revision, self._repository_url()]
-        log("WARNING: svn merge has been known to take more than 10 minutes to complete.  It is recommended you use git for rollouts.")
-        log("Running 'svn %s'" % " ".join(svn_merge_args))
+        _log.warning("svn merge has been known to take more than 10 minutes to complete.  It is recommended you use git for rollouts.")
+        _log.debug("Running 'svn %s'" % " ".join(svn_merge_args))
         # FIXME: Should this use cwd=self.checkout_root?
         self._run_svn(svn_merge_args)
 
index 6e10d65..c749a15 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import logging
+
 from webkitpy.common.memoized import memoized
-from webkitpy.common.system.deprecated_logging import log
+
+_log = logging.getLogger(__name__)
 
 
 class Attachment(object):
@@ -102,7 +105,7 @@ class Attachment(object):
                             "%s_by_email" % flag)(email)
         if committer:
             return committer
-        log("Warning, attachment %s on bug %s has invalid %s (%s)" % (
+        _log.warning("Warning, attachment %s on bug %s has invalid %s (%s)" % (
                  self._attachment_dictionary['id'],
                  self._attachment_dictionary['bug_id'], flag, email))
 
index 651e1b3..957f04d 100644 (file)
@@ -30,6 +30,7 @@
 #
 # WebKit's Python module for interacting with Bugzilla
 
+import logging
 import mimetypes
 import re
 import StringIO
@@ -41,13 +42,14 @@ from datetime import datetime # used in timestamp()
 from .attachment import Attachment
 from .bug import Bug
 
-from webkitpy.common.system.deprecated_logging import log
 from webkitpy.common.config import committers
 import webkitpy.common.config.urls as config_urls
 from webkitpy.common.net.credentials import Credentials
 from webkitpy.common.system.user import User
 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, BeautifulStoneSoup, SoupStrainer
 
+_log = logging.getLogger(__name__)
+
 
 class EditUsersParser(object):
     def __init__(self):
@@ -435,7 +437,7 @@ class Bugzilla(object):
 
     def _fetch_bug_page(self, bug_id):
         bug_url = self.bug_url_for_bug_id(bug_id, xml=True)
-        log("Fetching: %s" % bug_url)
+        _log.info("Fetching: %s" % bug_url)
         return self.browser.open(bug_url)
 
     def fetch_bug_dictionary(self, bug_id):
@@ -472,7 +474,7 @@ class Bugzilla(object):
         self.authenticate()
 
         attachment_url = self.attachment_url_for_id(attachment_id, 'edit')
-        log("Fetching: %s" % attachment_url)
+        _log.info("Fetching: %s" % attachment_url)
         page = self.browser.open(attachment_url)
         return self._parse_bug_id_from_attachment_page(page)
 
@@ -503,7 +505,7 @@ class Bugzilla(object):
             attempts += 1
             username, password = credentials.read_credentials()
 
-            log("Logging in as %s..." % username)
+            _log.info("Logging in as %s..." % username)
             self.browser.open(config_urls.bug_server_url +
                               "index.cgi?GoAheadAndLogIn=1")
             self.browser.select_form(name="login")
@@ -519,7 +521,7 @@ class Bugzilla(object):
                 errorMessage = "Bugzilla login failed: %s" % match.group(1)
                 # raise an exception only if this was the last attempt
                 if attempts < 5:
-                    log(errorMessage)
+                    _log.error(errorMessage)
                 else:
                     raise Exception(errorMessage)
             else:
@@ -532,10 +534,10 @@ class Bugzilla(object):
             user = self.committers.account_by_email(self.username)
             mark_for_commit_queue = True
             if not user:
-                log("Your Bugzilla login is not listed in committers.py. Uploading with cq? instead of cq+")
+                _log.warning("Your Bugzilla login is not listed in committers.py. Uploading with cq? instead of cq+")
                 mark_for_landing = False
             elif not user.can_commit:
-                log("You're not a committer yet or haven't updated committers.py yet. Uploading with cq? instead of cq+")
+                _log.warning("You're not a committer yet or haven't updated committers.py yet. Uploading with cq? instead of cq+")
                 mark_for_landing = False
 
         if mark_for_landing:
@@ -585,14 +587,14 @@ class Bugzilla(object):
 
     def add_attachment_to_bug(self, bug_id, file_or_string, description, filename=None, comment_text=None, mimetype=None):
         self.authenticate()
-        log('Adding attachment "%s" to %s' % (description, self.bug_url_for_bug_id(bug_id)))
+        _log.info('Adding attachment "%s" to %s' % (description, self.bug_url_for_bug_id(bug_id)))
         self.browser.open(self.add_attachment_url(bug_id))
         self.browser.select_form(name="entryform")
         file_object = self._file_object_for_upload(file_or_string)
         filename = filename or self._filename_for_upload(file_object, bug_id)
         self._fill_attachment_form(description, file_object, filename=filename, mimetype=mimetype)
         if comment_text:
-            log(comment_text)
+            _log.info(comment_text)
             self.browser['comment'] = comment_text
         self.browser.submit()
 
@@ -607,7 +609,7 @@ class Bugzilla(object):
                          mark_for_commit_queue=False,
                          mark_for_landing=False):
         self.authenticate()
-        log('Adding patch "%s" to %s' % (description, self.bug_url_for_bug_id(bug_id)))
+        _log.info('Adding patch "%s" to %s' % (description, self.bug_url_for_bug_id(bug_id)))
 
         self.browser.open(self.add_attachment_url(bug_id))
         self.browser.select_form(name="entryform")
@@ -621,7 +623,7 @@ class Bugzilla(object):
                                    is_patch=True,
                                    filename=filename)
         if comment_text:
-            log(comment_text)
+            _log.info(comment_text)
             self.browser['comment'] = comment_text
         self.browser.submit()
 
@@ -658,7 +660,7 @@ class Bugzilla(object):
                    mark_for_commit_queue=False):
         self.authenticate()
 
-        log('Creating bug with title "%s"' % bug_title)
+        _log.info('Creating bug with title "%s"' % bug_title)
         self.browser.open(config_urls.bug_server_url + "enter_bug.cgi?product=WebKit")
         self.browser.select_form(name="Create")
         component_items = self.browser.find_control('component').items
@@ -694,8 +696,8 @@ class Bugzilla(object):
         response = self.browser.submit()
 
         bug_id = self._check_create_bug_response(response.read())
-        log("Bug %s created." % bug_id)
-        log("%sshow_bug.cgi?id=%s" % (config_urls.bug_server_url, bug_id))
+        _log.info("Bug %s created." % bug_id)
+        _log.info("%sshow_bug.cgi?id=%s" % (config_urls.bug_server_url, bug_id))
         return bug_id
 
     def _find_select_element_for_flag(self, flag_name):
@@ -714,7 +716,7 @@ class Bugzilla(object):
         comment_text = "Clearing flags on attachment: %s" % attachment_id
         if additional_comment_text:
             comment_text += "\n\n%s" % additional_comment_text
-        log(comment_text)
+        _log.info(comment_text)
 
         self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
         self.browser.select_form(nr=1)
@@ -737,7 +739,7 @@ class Bugzilla(object):
         # FIXME: additional_comment_text seems useless and should be merged into comment-text.
         if additional_comment_text:
             comment_text += "\n\n%s" % additional_comment_text
-        log(comment_text)
+        _log.info(comment_text)
 
         self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
         self.browser.select_form(nr=1)
@@ -754,7 +756,7 @@ class Bugzilla(object):
     def obsolete_attachment(self, attachment_id, comment_text=None):
         self.authenticate()
 
-        log("Obsoleting attachment: %s" % attachment_id)
+        _log.info("Obsoleting attachment: %s" % attachment_id)
         self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
         self.browser.select_form(nr=1)
         self.browser.find_control('isobsolete').items[0].selected = True
@@ -762,7 +764,7 @@ class Bugzilla(object):
         self._find_select_element_for_flag('review').value = ("X",)
         self._find_select_element_for_flag('commit-queue').value = ("X",)
         if comment_text:
-            log(comment_text)
+            _log.info(comment_text)
             # Bugzilla has two textareas named 'comment', one is somehow
             # hidden.  We want the first.
             self.browser.set_value(comment_text, name='comment', nr=0)
@@ -771,7 +773,7 @@ class Bugzilla(object):
     def add_cc_to_bug(self, bug_id, email_address_list):
         self.authenticate()
 
-        log("Adding %s to the CC list for bug %s" % (email_address_list, bug_id))
+        _log.info("Adding %s to the CC list for bug %s" % (email_address_list, bug_id))
         self.browser.open(self.bug_url_for_bug_id(bug_id))
         self.browser.select_form(name="changeform")
         self.browser["newcc"] = ", ".join(email_address_list)
@@ -780,7 +782,7 @@ class Bugzilla(object):
     def post_comment_to_bug(self, bug_id, comment_text, cc=None):
         self.authenticate()
 
-        log("Adding comment to bug %s" % bug_id)
+        _log.info("Adding comment to bug %s" % bug_id)
         self.browser.open(self.bug_url_for_bug_id(bug_id))
         self.browser.select_form(name="changeform")
         self.browser["comment"] = comment_text
@@ -791,7 +793,7 @@ class Bugzilla(object):
     def close_bug_as_fixed(self, bug_id, comment_text=None):
         self.authenticate()
 
-        log("Closing bug %s as fixed" % bug_id)
+        _log.info("Closing bug %s as fixed" % bug_id)
         self.browser.open(self.bug_url_for_bug_id(bug_id))
         self.browser.select_form(name="changeform")
         if comment_text:
@@ -809,12 +811,12 @@ class Bugzilla(object):
         if not assignee:
             assignee = self.username
 
-        log("Assigning bug %s to %s" % (bug_id, assignee))
+        _log.info("Assigning bug %s to %s" % (bug_id, assignee))
         self.browser.open(self.bug_url_for_bug_id(bug_id))
         self.browser.select_form(name="changeform")
 
         if not self._has_control(self.browser, "assigned_to"):
-            log("""Failed to assign bug to you (can't find assigned_to) control.
+            _log.warning("""Failed to assign bug to you (can't find assigned_to) control.
 Do you have EditBugs privileges at bugs.webkit.org?
 https://bugs.webkit.org/userprefs.cgi?tab=permissions
 
@@ -823,7 +825,7 @@ for someone to add EditBugs to your bugs.webkit.org account.""")
             return
 
         if comment_text:
-            log(comment_text)
+            _log.info(comment_text)
             self.browser["comment"] = comment_text
         self.browser["assigned_to"] = assignee
         self.browser.submit()
@@ -831,10 +833,10 @@ for someone to add EditBugs to your bugs.webkit.org account.""")
     def reopen_bug(self, bug_id, comment_text):
         self.authenticate()
 
-        log("Re-opening bug %s" % bug_id)
+        _log.info("Re-opening bug %s" % bug_id)
         # Bugzilla requires a comment when re-opening a bug, so we know it will
         # never be None.
-        log(comment_text)
+        _log.info(comment_text)
         self.browser.open(self.bug_url_for_bug_id(bug_id))
         self.browser.select_form(name="changeform")
         bug_status = self.browser.find_control("bug_status", type="select")
@@ -851,6 +853,6 @@ for someone to add EditBugs to your bugs.webkit.org account.""")
         else:
             # FIXME: This logic is slightly backwards.  We won't print this
             # message if the bug is already open with state "UNCONFIRMED".
-            log("Did not reopen bug %s, it appears to already be open with status %s." % (bug_id, bug_status.value))
+            _log.info("Did not reopen bug %s, it appears to already be open with status %s." % (bug_id, bug_status.value))
         self.browser['comment'] = comment_text
         self.browser.submit()
index 71b080c..473a9fa 100644 (file)
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import datetime
+import logging
 
 from .bug import Bug
 from .attachment import Attachment
 from webkitpy.common.config.committers import CommitterList, Reviewer
 
-from webkitpy.common.system.deprecated_logging import log
+_log = logging.getLogger(__name__)
 
 
 def _id_to_object_dictionary(*objects):
@@ -328,15 +329,15 @@ class MockBugzilla(object):
                    blocked=None,
                    mark_for_review=False,
                    mark_for_commit_queue=False):
-        log("MOCK create_bug")
-        log("bug_title: %s" % bug_title)
-        log("bug_description: %s" % bug_description)
+        _log.info("MOCK create_bug")
+        _log.info("bug_title: %s" % bug_title)
+        _log.info("bug_description: %s" % bug_description)
         if component:
-            log("component: %s" % component)
+            _log.info("component: %s" % component)
         if cc:
-            log("cc: %s" % cc)
+            _log.info("cc: %s" % cc)
         if blocked:
-            log("blocked: %s" % blocked)
+            _log.info("blocked: %s" % blocked)
         return 60001
 
     def quips(self):
@@ -374,11 +375,11 @@ class MockBugzilla(object):
         return "%s/%s%s" % (self.bug_server_url, attachment_id, action_param)
 
     def reassign_bug(self, bug_id, assignee=None, comment_text=None):
-        log("MOCK reassign_bug: bug_id=%s, assignee=%s" % (bug_id, assignee))
+        _log.info("MOCK reassign_bug: bug_id=%s, assignee=%s" % (bug_id, assignee))
         if comment_text:
-            log("-- Begin comment --")
-            log(comment_text)
-            log("-- End comment --")
+            _log.info("-- Begin comment --")
+            _log.info(comment_text)
+            _log.info("-- End comment --")
 
     def set_flag_on_attachment(self,
                                attachment_id,
@@ -386,20 +387,20 @@ class MockBugzilla(object):
                                flag_value,
                                comment_text=None,
                                additional_comment_text=None):
-        log("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s' and additional comment '%s'" % (
-            flag_name, flag_value, attachment_id, comment_text, additional_comment_text))
+        _log.info("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s' and additional comment '%s'" % (
+                  flag_name, flag_value, attachment_id, comment_text, additional_comment_text))
 
     def post_comment_to_bug(self, bug_id, comment_text, cc=None):
-        log("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % (
-            bug_id, cc, comment_text))
+        _log.info("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % (
+                  bug_id, cc, comment_text))
 
     def add_attachment_to_bug(self, bug_id, file_or_string, description, filename=None, comment_text=None, mimetype=None):
-        log("MOCK add_attachment_to_bug: bug_id=%s, description=%s filename=%s mimetype=%s" %
-            (bug_id, description, filename, mimetype))
+        _log.info("MOCK add_attachment_to_bug: bug_id=%s, description=%s filename=%s mimetype=%s" %
+                  (bug_id, description, filename, mimetype))
         if comment_text:
-            log("-- Begin comment --")
-            log(comment_text)
-            log("-- End comment --")
+            _log.info("-- Begin comment --")
+            _log.info(comment_text)
+            _log.info("-- End comment --")
 
     def add_patch_to_bug(self,
                          bug_id,
@@ -409,12 +410,12 @@ class MockBugzilla(object):
                          mark_for_review=False,
                          mark_for_commit_queue=False,
                          mark_for_landing=False):
-        log("MOCK add_patch_to_bug: bug_id=%s, description=%s, mark_for_review=%s, mark_for_commit_queue=%s, mark_for_landing=%s" %
-            (bug_id, description, mark_for_review, mark_for_commit_queue, mark_for_landing))
+        _log.info("MOCK add_patch_to_bug: bug_id=%s, description=%s, mark_for_review=%s, mark_for_commit_queue=%s, mark_for_landing=%s" %
+                  (bug_id, description, mark_for_review, mark_for_commit_queue, mark_for_landing))
         if comment_text:
-            log("-- Begin comment --")
-            log(comment_text)
-            log("-- End comment --")
+            _log.info("-- Begin comment --")
+            _log.info(comment_text)
+            _log.info("-- End comment --")
 
     def add_cc_to_bug(self, bug_id, ccs):
         pass
@@ -423,7 +424,7 @@ class MockBugzilla(object):
         pass
 
     def reopen_bug(self, bug_id, message):
-        log("MOCK reopen_bug %s with comment '%s'" % (bug_id, message))
+        _log.info("MOCK reopen_bug %s with comment '%s'" % (bug_id, message))
 
     def close_bug_as_fixed(self, bug_id, message):
         pass
index 538d39e..90e4c83 100644 (file)
@@ -250,8 +250,8 @@ Ignore this bug.  Just for testing failure modes of webkit-patch and the commit-
         bugzilla = Bugzilla()
         bugzilla.browser = MockBrowser()
         bugzilla.authenticate = lambda: None
-        expected_stderr = "Adding ['adam@example.com'] to the CC list for bug 42\n"
-        OutputCapture().assert_outputs(self, bugzilla.add_cc_to_bug, [42, ["adam@example.com"]], expected_stderr=expected_stderr)
+        expected_logs = "Adding ['adam@example.com'] to the CC list for bug 42\n"
+        OutputCapture().assert_outputs(self, bugzilla.add_cc_to_bug, [42, ["adam@example.com"]], expected_logs=expected_logs)
 
     def _mock_control_item(self, name):
         mock_item = Mock()
@@ -264,23 +264,23 @@ Ignore this bug.  Just for testing failure modes of webkit-patch and the commit-
         mock_control.value = [item_names[selected_index]] if item_names else None
         return lambda name, type: mock_control
 
-    def _assert_reopen(self, item_names=None, selected_index=None, extra_stderr=None):
+    def _assert_reopen(self, item_names=None, selected_index=None, extra_logs=None):
         bugzilla = Bugzilla()
         bugzilla.browser = MockBrowser()
         bugzilla.authenticate = lambda: None
 
         mock_find_control = self._mock_find_control(item_names, selected_index)
         bugzilla.browser.find_control = mock_find_control
-        expected_stderr = "Re-opening bug 42\n['comment']\n"
-        if extra_stderr:
-            expected_stderr += extra_stderr
-        OutputCapture().assert_outputs(self, bugzilla.reopen_bug, [42, ["comment"]], expected_stderr=expected_stderr)
+        expected_logs = "Re-opening bug 42\n['comment']\n"
+        if extra_logs:
+            expected_logs += extra_logs
+        OutputCapture().assert_outputs(self, bugzilla.reopen_bug, [42, ["comment"]], expected_logs=expected_logs)
 
     def test_reopen_bug(self):
         self._assert_reopen(item_names=["REOPENED", "RESOLVED", "CLOSED"], selected_index=1)
         self._assert_reopen(item_names=["UNCONFIRMED", "RESOLVED", "CLOSED"], selected_index=1)
-        extra_stderr = "Did not reopen bug 42, it appears to already be open with status ['NEW'].\n"
-        self._assert_reopen(item_names=["NEW", "RESOLVED"], selected_index=0, extra_stderr=extra_stderr)
+        extra_logs = "Did not reopen bug 42, it appears to already be open with status ['NEW'].\n"
+        self._assert_reopen(item_names=["NEW", "RESOLVED"], selected_index=0, extra_logs=extra_logs)
 
     def test_file_object_for_upload(self):
         bugzilla = Bugzilla()
index f5b6042..d20bdb7 100644 (file)
@@ -26,7 +26,9 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-from webkitpy.common.system.deprecated_logging import log
+import logging
+
+_log = logging.getLogger(__name__)
 
 
 class MockBuild(object):
@@ -55,7 +57,7 @@ class MockBuilder(object):
         return self.accumulated_results_url()
 
     def force_build(self, username, comments):
-        log("MOCK: force_build: name=%s, username=%s, comments=%s" % (
+        _log.info("MOCK: force_build: name=%s, username=%s, comments=%s" % (
             self._name, username, comments))
 
 
index 21aeaea..7038b7e 100644 (file)
@@ -29,6 +29,7 @@
 #
 # Python module for reading stored web credentials from the OS.
 
+import logging
 import os
 import platform
 import re
@@ -36,7 +37,6 @@ import re
 from webkitpy.common.checkout.scm import Git
 from webkitpy.common.system.executive import Executive, ScriptError
 from webkitpy.common.system.user import User
-from webkitpy.common.system.deprecated_logging import log
 
 try:
     # Use keyring, a cross platform keyring interface, as a fallback:
@@ -45,6 +45,8 @@ try:
 except ImportError:
     keyring = None
 
+_log = logging.getLogger(__name__)
+
 
 class Credentials(object):
     _environ_prefix = "webkit_bugzilla_"
@@ -98,15 +100,15 @@ class Credentials(object):
         if username:
             security_command += ["-a", username]
 
-        log("Reading Keychain for %s account and password.  "
-            "Click \"Allow\" to continue..." % self.host)
+        _log.info("Reading Keychain for %s account and password.  "
+                  "Click \"Allow\" to continue..." % self.host)
         try:
             return self.executive.run_command(security_command)
         except ScriptError:
             # Failed to either find a keychain entry or somekind of OS-related
             # error occured (for instance, couldn't find the /usr/sbin/security
             # command).
-            log("Could not find a keychain entry for %s." % self.host)
+            _log.error("Could not find a keychain entry for %s." % self.host)
             return None
 
     def _credentials_from_keychain(self, username=None):
index 15682f3..3659d69 100644 (file)
@@ -116,8 +116,8 @@ password: "SECRETSAUCE"
         executive_mock = Mock()
         credentials = MockedCredentials("example.com", executive=executive_mock)
 
-        expected_stderr = "Reading Keychain for example.com account and password.  Click \"Allow\" to continue...\n"
-        OutputCapture().assert_outputs(self, credentials._run_security_tool, [username], expected_stderr=expected_stderr)
+        expected_logs = "Reading Keychain for example.com account and password.  Click \"Allow\" to continue...\n"
+        OutputCapture().assert_outputs(self, credentials._run_security_tool, [username], expected_logs=expected_logs)
 
         security_args = ["/usr/bin/security", "find-internet-password", "-g", "-s", "example.com"]
         if username:
index 734be06..b2ae071 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-from webkitpy.common.system.deprecated_logging import log
+import logging
+
+_log = logging.getLogger(__name__)
 
 
 class MockIRC(object):
     def post(self, message):
-        log("MOCK: irc.post: %s" % message)
+        _log.info("MOCK: irc.post: %s" % message)
 
     def disconnect(self):
-        log("MOCK: irc.disconnect")
+        _log.info("MOCK: irc.disconnect")
index 13348b4..521f6f7 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import logging
 import threading
 
 from webkitpy.common.net.irc.ircbot import IRCBot
 from webkitpy.common.thread.threadedmessagequeue import ThreadedMessageQueue
-from webkitpy.common.system.deprecated_logging import log
+
+_log = logging.getLogger(__name__)
 
 
 class _IRCThread(threading.Thread):
@@ -48,7 +50,7 @@ class _IRCThread(threading.Thread):
 
 class IRCProxy(object):
     def __init__(self, irc_delegate, irc_bot=IRCBot):
-        log("Connecting to IRC")
+        _log.info("Connecting to IRC")
         self._message_queue = ThreadedMessageQueue()
         self._child_thread = _IRCThread(self._message_queue, irc_delegate, irc_bot)
         self._child_thread.start()
@@ -57,6 +59,6 @@ class IRCProxy(object):
         self._message_queue.post(message)
 
     def disconnect(self):
-        log("Disconnecting from IRC...")
+        _log.info("Disconnecting from IRC...")
         self._message_queue.stop()
         self._child_thread.join()
index b44ce40..bce9d85 100644 (file)
@@ -39,5 +39,5 @@ class IRCProxyTest(unittest.TestCase):
             proxy.post("hello")
             proxy.disconnect()
 
-        expected_stderr = "Connecting to IRC\nDisconnecting from IRC...\n"
-        OutputCapture().assert_outputs(self, fun, expected_stderr=expected_stderr)
+        expected_logs = "Connecting to IRC\nDisconnecting from IRC...\n"
+        OutputCapture().assert_outputs(self, fun, expected_logs=expected_logs)
index f0d807e..74322c7 100644 (file)
 # A module for parsing results.html files generated by old-run-webkit-tests
 # This class is one big hack and only needs to exist until we transition to new-run-webkit-tests.
 
+import logging
+
 from webkitpy.common.net.resultsjsonparser import ResultsJSONParser
-from webkitpy.common.system.deprecated_logging import log
 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, SoupStrainer
 from webkitpy.layout_tests.models import test_results
 from webkitpy.layout_tests.models import test_failures
 
+_log = logging.getLogger(__name__)
+
 
 # FIXME: This should be unified with all the layout test results code in the layout_tests package
 # This doesn't belong in common.net, but we don't have a better place for it yet.
@@ -78,7 +81,7 @@ class ORWTResultsHTMLParser(object):
             elif anchor_text in ["expected", "actual", "diff", "pretty diff"]:
                 failures.add(test_failures.FailureTextMismatch())
             else:
-                log("Unhandled link text in results.html parsing: %s.  Please file a bug against webkitpy." % anchor_text)
+                _log.warning("Unhandled link text in results.html parsing: %s.  Please file a bug against webkitpy." % anchor_text)
         # FIXME: Its possible the row contained no links due to ORWT brokeness.
         # We should probably assume some type of failure anyway.
         return failures
index 462a88c..4131bdf 100644 (file)
@@ -122,8 +122,8 @@ class ORWTResultsHTMLParserTest(unittest.TestCase):
         self.assertEqual(type(sorted(failures)[0]), test_failures.FailureImageHashMismatch)
 
         row = BeautifulSoup("<tr><td><a>test.hml</a><a>foo</a></td></tr>")
-        expected_stderr = "Unhandled link text in results.html parsing: foo.  Please file a bug against webkitpy.\n"
-        OutputCapture().assert_outputs(self, ORWTResultsHTMLParser._failures_from_fail_row, [row], expected_stderr=expected_stderr)
+        expected_logs = "Unhandled link text in results.html parsing: foo.  Please file a bug against webkitpy.\n"
+        OutputCapture().assert_outputs(self, ORWTResultsHTMLParser._failures_from_fail_row, [row], expected_logs=expected_logs)
 
 
 class LayoutTestResultsTest(unittest.TestCase):
index 03b1432..60acaab 100644 (file)
@@ -30,9 +30,6 @@ import logging
 import time
 import urllib2
 
-from webkitpy.common.system.deprecated_logging import log
-
-
 _log = logging.getLogger(__name__)
 
 
index 42ce56a..1a2a70f 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-
 import json
+import logging
 
 from webkitpy.common.memoized import memoized
-from webkitpy.common.system.deprecated_logging import log
 # FIXME: common should never import from new-run-webkit-tests, one of these files needs to move.
 from webkitpy.layout_tests.layout_package import json_results_generator
 from webkitpy.layout_tests.models import test_expectations, test_results, test_failures
 from webkitpy.layout_tests.models.test_expectations import TestExpectations
 
+_log = logging.getLogger(__name__)
+
 
 # These are helper functions for navigating the results json structure.
 def for_each_test(tree, handler, prefix=''):
@@ -83,7 +84,7 @@ class JSONTestResult(object):
     def _tokenize(self, results_string):
         tokens = map(TestExpectations.expectation_from_string, results_string.split(' '))
         if None in tokens:
-            log("Unrecognized result in %s" % results_string)
+            _log.warning("Unrecognized result in %s" % results_string)
         return set(tokens)
 
     @memoized
@@ -123,7 +124,7 @@ class JSONTestResult(object):
         elif actual == test_expectations.MISSING:
             return [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
         else:
-            log("Failed to handle: %s" % self._result_dict['actual'])
+            _log.warning("Failed to handle: %s" % self._result_dict['actual'])
             return []
 
     def _failures(self):
index 2bda1ce..99850f5 100644 (file)
@@ -29,7 +29,6 @@
 # This the client designed to talk to Tools/QueueStatusServer.
 
 from webkitpy.common.net.networktransaction import NetworkTransaction
-from webkitpy.common.system.deprecated_logging import log
 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
 
 import logging
@@ -145,11 +144,11 @@ class StatusServer:
         return NetworkTransaction().run(lambda: self._post_work_items_to_server(queue_name, work_items))
 
     def update_status(self, queue_name, status, patch=None, results_file=None):
-        log(status)
+        _log.info(status)
         return NetworkTransaction().run(lambda: self._post_status_to_server(queue_name, status, patch, results_file))
 
     def update_svn_revision(self, svn_revision_number, broken_bot):
-        log("SVN revision: %s broke %s" % (svn_revision_number, broken_bot))
+        _log.info("SVN revision: %s broke %s" % (svn_revision_number, broken_bot))
         return NetworkTransaction().run(lambda: self._post_svn_revision_to_server(svn_revision_number, broken_bot))
 
     def _fetch_url(self, url):
index 69d1ae8..22fa12f 100644 (file)
@@ -26,7 +26,9 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-from webkitpy.common.system.deprecated_logging import log
+import logging
+
+_log = logging.getLogger(__name__)
 
 
 class MockStatusServer(object):
@@ -48,17 +50,17 @@ class MockStatusServer(object):
         return self._work_items.pop(0)
 
     def release_work_item(self, queue_name, patch):
-        log("MOCK: release_work_item: %s %s" % (queue_name, patch.id()))
+        _log.info("MOCK: release_work_item: %s %s" % (queue_name, patch.id()))
 
     def update_work_items(self, queue_name, work_items):
         self._work_items = work_items
-        log("MOCK: update_work_items: %s %s" % (queue_name, work_items))
+        _log.info("MOCK: update_work_items: %s %s" % (queue_name, work_items))
 
     def submit_to_ews(self, patch_id):
-        log("MOCK: submit_to_ews: %s" % (patch_id))
+        _log.info("MOCK: submit_to_ews: %s" % (patch_id))
 
     def update_status(self, queue_name, status, patch=None, results_file=None):
-        log("MOCK: update_status: %s %s" % (queue_name, status))
+        _log.info("MOCK: update_status: %s %s" % (queue_name, status))
         return 187
 
     def update_svn_revision(self, svn_revision, broken_bot):
index bb82b05..b616c09 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import logging
 import xml.dom.minidom
 
-from webkitpy.common.system.deprecated_logging import log
+_log = logging.getLogger(__name__)
 
 
 class UnitTestResults(object):
@@ -46,5 +47,5 @@ class UnitTestResults(object):
                     failures.append("%s.%s" % (classname, testname))
             return failures
         except xml.parsers.expat.ExpatError, e:
-            log("XML error %s parsing unit test output" % str(e))
+            _log.error("XML error %s parsing unit test output" % str(e))
             return None
index 47eddea..a83f5b2 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import logging
 import os
 import StringIO
 
-from webkitpy.common.system.deprecated_logging import log
 from webkitpy.common.system.executive import ScriptError
 
+_log = logging.getLogger(__name__)
+
 
 class MockProcess(object):
     def __init__(self, stdout='MOCK STDOUT\n', stderr=''):
@@ -71,7 +73,7 @@ class MockExecutive(object):
             if process_name_filter(process_name):
                 running_pids.append(process_pid)
 
-        log("MOCK running_pids: %s" % running_pids)
+        _log.info("MOCK running_pids: %s" % running_pids)
         return running_pids
 
     def run_and_throw_if_fail(self, args, quiet=False, cwd=None, env=None):
@@ -79,7 +81,7 @@ class MockExecutive(object):
             env_string = ""
             if env:
                 env_string = ", env=%s" % env
-            log("MOCK run_and_throw_if_fail: %s, cwd=%s%s" % (args, cwd, env_string))
+            _log.info("MOCK run_and_throw_if_fail: %s, cwd=%s%s" % (args, cwd, env_string))
         if self._should_throw_when_run.intersection(args):
             raise ScriptError("Exception for %s" % args, output="MOCK command output")
         return "MOCK output of child process"
@@ -104,7 +106,7 @@ class MockExecutive(object):
             input_string = ""
             if input:
                 input_string = ", input=%s" % input
-            log("MOCK run_command: %s, cwd=%s%s%s" % (args, cwd, env_string, input_string))
+            _log.info("MOCK run_command: %s, cwd=%s%s%s" % (args, cwd, env_string, input_string))
         output = "MOCK output of child process"
         if self._should_throw:
             raise ScriptError("MOCK ScriptError", output=output)
@@ -128,7 +130,7 @@ class MockExecutive(object):
             env_string = ""
             if env:
                 env_string = ", env=%s" % env
-            log("MOCK popen: %s%s%s" % (args, cwd_string, env_string))
+            _log.info("MOCK popen: %s%s%s" % (args, cwd_string, env_string))
         if not self._proc:
             self._proc = MockProcess()
         return self._proc
index 16f79a0..d17ea9a 100644 (file)
@@ -26,7 +26,9 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-from webkitpy.common.system.deprecated_logging import log
+import logging
+
+_log = logging.getLogger(__name__)
 
 
 class MockUser(object):
@@ -52,7 +54,7 @@ class MockUser(object):
         pass
 
     def confirm(self, message=None, default='y'):
-        log(message)
+        _log.info(message)
         return default == 'y'
 
     def can_open_url(self):
@@ -61,6 +63,6 @@ class MockUser(object):
     def open_url(self, url):
         self.opened_urls.append(url)
         if url.startswith("file://"):
-            log("MOCK: user.open_url: file://...")
+            _log.info("MOCK: user.open_url: file://...")
             return
-        log("MOCK: user.open_url: %s" % url)
+        _log.info("MOCK: user.open_url: %s" % url)
index 49094ac..eca386a 100644 (file)
@@ -50,18 +50,23 @@ class WorkspaceTest(unittest.TestCase):
 
     def test_create_zip(self):
         workspace = Workspace(None, MockExecutive(should_log=True))
-        expected_stderr = "MOCK run_command: ['zip', '-9', '-r', '/zip/path', '.'], cwd=/source/path\n"
+        expected_logs = "MOCK run_command: ['zip', '-9', '-r', '/zip/path', '.'], cwd=/source/path\n"
         class MockZipFile(object):
             def __init__(self, path):
                 self.filename = path
-        archive = OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path", MockZipFile], expected_stderr=expected_stderr)
+        archive = OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path", MockZipFile], expected_logs=expected_logs)
         self.assertEqual(archive.filename, "/zip/path")
 
     def test_create_zip_exception(self):
         workspace = Workspace(None, MockExecutive(should_log=True, should_throw=True))
-        expected_stderr = "MOCK run_command: ['zip', '-9', '-r', '/zip/path', '.'], cwd=/source/path\n"
+        expected_logs = """MOCK run_command: ['zip', '-9', '-r', '/zip/path', '.'], cwd=/source/path
+Workspace.create_zip failed:
+MOCK ScriptError
+
+MOCK output of child process
+"""
         class MockZipFile(object):
             def __init__(self, path):
                 self.filename = path
-        archive = OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path", MockZipFile], expected_stderr=expected_stderr)
+        archive = OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path", MockZipFile], expected_logs=expected_logs)
         self.assertEqual(archive, None)
index 2fd2f88..cbbf071 100644 (file)
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-from webkitpy.common.system.deprecated_logging import log
+import logging
+
+_log = logging.getLogger(__name__)
 
 
 class MockWatchList(object):
     def determine_cc_and_messages(self, diff):
-        log("MockWatchList: determine_cc_and_messages")
+        _log.info("MockWatchList: determine_cc_and_messages")
         return {'cc_list': ['abarth@webkit.org', 'eric@webkit.org', 'levin@chromium.org'], 'messages': ['Message1.', 'Message2.'], }
index 1c0ddc1..a84b5ee 100644 (file)
@@ -64,9 +64,9 @@ class ChromiumWinTest(chromium_port_testcase.ChromiumPortTestCase):
     def test_setup_environ_for_server_register_cygwin(self):
         port = self.make_port(options=MockOptions(register_cygwin=True, results_directory='/'))
         port._executive = MockExecutive(should_log=True)
-        expected_stderr = "MOCK run_command: ['/mock-checkout/Source/WebKit/chromium/third_party/cygwin/setup_mount.bat'], cwd=None\n"
+        expected_logs = "MOCK run_command: ['/mock-checkout/Source/WebKit/chromium/third_party/cygwin/setup_mount.bat'], cwd=None\n"
         output = outputcapture.OutputCapture()
-        output.assert_outputs(self, port.setup_environ_for_server, expected_stderr=expected_stderr)
+        output.assert_outputs(self, port.setup_environ_for_server, expected_logs=expected_logs)
 
     def assert_name(self, port_name, os_version_string, expected):
         port = self.make_port(port_name=port_name, os_version=os_version_string)
index d9851b3..1ac687b 100644 (file)
@@ -39,5 +39,5 @@ class EflPortTest(port_testcase.PortTestCase):
     def test_show_results_html_file(self):
         port = self.make_port()
         port._executive = MockExecutive(should_log=True)
-        expected_stderr = "MOCK run_command: ['Tools/Scripts/run-launcher', '--release', '--efl', 'file://test.html'], cwd=/mock-checkout\n"
-        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK run_command: ['Tools/Scripts/run-launcher', '--release', '--efl', 'file://test.html'], cwd=/mock-checkout\n"
+        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_logs=expected_logs)
index 6f5fae6..7002495 100644 (file)
@@ -46,8 +46,8 @@ class GtkPortTest(port_testcase.PortTestCase):
     def test_show_results_html_file(self):
         port = self.make_port()
         port._executive = MockExecutive(should_log=True)
-        expected_stderr = "MOCK run_command: ['Tools/Scripts/run-launcher', '--release', '--gtk', 'file://test.html'], cwd=/mock-checkout\n"
-        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK run_command: ['Tools/Scripts/run-launcher', '--release', '--gtk', 'file://test.html'], cwd=/mock-checkout\n"
+        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_logs=expected_logs)
 
     def test_default_timeout_ms(self):
         self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
index 5112014..831fbf7 100644 (file)
@@ -139,8 +139,8 @@ java/
         port = self.make_port()
         # Delay setting a should_log executive to avoid logging from MacPort.__init__.
         port._executive = MockExecutive(should_log=True)
-        expected_stderr = "MOCK popen: ['Tools/Scripts/run-safari', '--release', '--no-saved-state', '-NSOpen', 'test.html'], cwd=/mock-checkout\n"
-        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK popen: ['Tools/Scripts/run-safari', '--release', '--no-saved-state', '-NSOpen', 'test.html'], cwd=/mock-checkout\n"
+        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_logs=expected_logs)
 
     def test_operating_system(self):
         self.assertEqual('mac', self.make_port().operating_system())
index e7cd76c..8ea108b 100755 (executable)
@@ -535,28 +535,33 @@ class PortTestCase(unittest.TestCase):
         # Delay setting _executive to avoid logging during construction
         port._executive = MockExecutive(should_log=True)
         port._options = MockOptions(configuration="Release")  # This should not be necessary, but I think TestWebKitPort is actually reading from disk (and thus detects the current configuration).
-        expected_stderr = "MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\n"
-        self.assertTrue(output.assert_outputs(self, port._build_driver, expected_stderr=expected_stderr, expected_logs=''))
+        expected_logs = "MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\n"
+        self.assertTrue(output.assert_outputs(self, port._build_driver, expected_logs=expected_logs))
 
         # Make sure when passed --webkit-test-runner we build the right tool.
         port._options = MockOptions(webkit_test_runner=True, configuration="Release")
-        expected_stderr = "MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\nMOCK run_command: ['Tools/Scripts/build-webkittestrunner', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\n"
-        self.assertTrue(output.assert_outputs(self, port._build_driver, expected_stderr=expected_stderr, expected_logs=''))
+        expected_logs = "MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\nMOCK run_command: ['Tools/Scripts/build-webkittestrunner', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\n"
+        self.assertTrue(output.assert_outputs(self, port._build_driver, expected_logs=expected_logs))
 
         # Make sure we show the build log when --verbose is passed, which we simulate by setting the logging level to DEBUG.
         output.set_log_level(logging.DEBUG)
         port._options = MockOptions(configuration="Release")
-        expected_stderr = "MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\n"
-        expected_logs = "Output of ['Tools/Scripts/build-dumprendertree', '--release']:\nMOCK output of child process\n"
-        self.assertTrue(output.assert_outputs(self, port._build_driver, expected_stderr=expected_stderr, expected_logs=expected_logs))
+        expected_logs = """MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}
+Output of ['Tools/Scripts/build-dumprendertree', '--release']:
+MOCK output of child process
+"""
+        self.assertTrue(output.assert_outputs(self, port._build_driver, expected_logs=expected_logs))
         output.set_log_level(logging.INFO)
 
         # Make sure that failure to build returns False.
         port._executive = MockExecutive(should_log=True, should_throw=True)
         # Because WK2 currently has to build both webkittestrunner and DRT, if DRT fails, that's the only one it tries.
-        expected_stderr = "MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}\n"
-        expected_logs = "MOCK ScriptError\n\nMOCK output of child process\n"
-        self.assertFalse(output.assert_outputs(self, port._build_driver, expected_stderr=expected_stderr, expected_logs=expected_logs))
+        expected_logs = """MOCK run_command: ['Tools/Scripts/build-dumprendertree', '--release'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}
+MOCK ScriptError
+
+MOCK output of child process
+"""
+        self.assertFalse(output.assert_outputs(self, port._build_driver, expected_logs=expected_logs))
 
     def _assert_config_file_for_platform(self, port, platform, config_file):
         self.assertEqual(port._apache_config_file_name_for_platform(platform), config_file)
index 4a558f8..d6ef8d8 100644 (file)
@@ -104,8 +104,8 @@ class QtPortTest(port_testcase.PortTestCase):
     def test_show_results_html_file(self):
         port = self.make_port()
         port._executive = MockExecutive(should_log=True)
-        expected_stderr = "MOCK run_command: ['Tools/Scripts/run-launcher', '--release', '--qt', 'file://test.html'], cwd=/mock-checkout\n"
-        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK run_command: ['Tools/Scripts/run-launcher', '--release', '--qt', 'file://test.html'], cwd=/mock-checkout\n"
+        OutputCapture().assert_outputs(self, port.show_results_html_file, ["test.html"], expected_logs=expected_logs)
 
     def test_setup_environ_for_server(self):
         port = self.make_port()
index 668685f..9def724 100644 (file)
@@ -51,11 +51,11 @@ class WinPortTest(port_testcase.PortTestCase):
         capture = OutputCapture()
         capture.capture_output()
         port.show_results_html_file('test.html')
-        _, stderr, _ = capture.restore_output()
+        _, _, logs = capture.restore_output()
         # We can't know for sure what path will be produced by cygpath, but we can assert about
         # everything else.
-        self.assertTrue(stderr.startswith("MOCK run_command: ['Tools/Scripts/run-safari', '--release', '"))
-        self.assertTrue(stderr.endswith("test.html'], cwd=/mock-checkout\n"))
+        self.assertTrue(logs.startswith("MOCK run_command: ['Tools/Scripts/run-safari', '--release', '"))
+        self.assertTrue(logs.endswith("test.html'], cwd=/mock-checkout\n"))
 
     def _assert_search_path(self, expected_search_paths, version, use_webkit2=False):
         port = self.make_port(port_name='win', os_version=version, options=MockOptions(webkit_test_runner=use_webkit2))
index 3671310..241b37c 100644 (file)
@@ -26,9 +26,9 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import logging
 import unittest
 
-from webkitpy.common.system.deprecated_logging import log
 from webkitpy.common.system.filesystem_mock import MockFileSystem
 from webkitpy.common.system.executive_mock import MockExecutive2
 from webkitpy.common.system.outputcapture import OutputCapture
@@ -38,6 +38,8 @@ from webkitpy.layout_tests.port.server_process_mock import MockServerProcess
 from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
 from webkitpy.tool.mocktool import MockOptions
 
+_log = logging.getLogger(__name__)
+
 
 class XvfbDriverTest(unittest.TestCase):
     def make_driver(self, worker_number=0, xorg_running=False, executive=None):
@@ -57,27 +59,27 @@ class XvfbDriverTest(unittest.TestCase):
         # intend to test the behavior of XvfbDriver.stop.
         driver._xvfb_process = None
 
-    def assertDriverStartSuccessful(self, driver, expected_stderr, expected_display, pixel_tests=False):
-        OutputCapture().assert_outputs(self, driver.start, [pixel_tests, []], expected_stderr=expected_stderr)
+    def assertDriverStartSuccessful(self, driver, expected_logs, expected_display, pixel_tests=False):
+        OutputCapture().assert_outputs(self, driver.start, [pixel_tests, []], expected_logs=expected_logs)
         self.assertTrue(driver._server_process.started)
         self.assertEqual(driver._server_process.env["DISPLAY"], expected_display)
 
     def test_start_no_pixel_tests(self):
         driver = self.make_driver()
-        expected_stderr = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
-        self.assertDriverStartSuccessful(driver, expected_stderr=expected_stderr, expected_display=":0")
+        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0")
         self.cleanup_driver(driver)
 
     def test_start_pixel_tests(self):
         driver = self.make_driver()
-        expected_stderr = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
-        self.assertDriverStartSuccessful(driver, expected_stderr=expected_stderr, expected_display=":0", pixel_tests=True)
+        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
         self.cleanup_driver(driver)
 
     def test_start_arbitrary_worker_number(self):
         driver = self.make_driver(worker_number=17)
-        expected_stderr = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
-        self.assertDriverStartSuccessful(driver, expected_stderr=expected_stderr, expected_display=":0", pixel_tests=True)
+        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
         self.cleanup_driver(driver)
 
     def disabled_test_next_free_display(self):
@@ -105,19 +107,19 @@ class XvfbDriverTest(unittest.TestCase):
     def test_start_next_worker(self):
         driver = self.make_driver()
         driver._next_free_display = lambda: 0
-        expected_stderr = "MOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
-        self.assertDriverStartSuccessful(driver, expected_stderr=expected_stderr, expected_display=":0", pixel_tests=True)
+        expected_logs = "MOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
         self.cleanup_driver(driver)
         driver = self.make_driver()
         driver._next_free_display = lambda: 3
-        expected_stderr = "MOCK popen: ['Xvfb', ':3', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
-        self.assertDriverStartSuccessful(driver, expected_stderr=expected_stderr, expected_display=":3", pixel_tests=True)
+        expected_logs = "MOCK popen: ['Xvfb', ':3', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
+        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":3", pixel_tests=True)
         self.cleanup_driver(driver)
 
     def test_stop(self):
         filesystem = MockFileSystem(files={'/tmp/.X42-lock': '1234\n'})
         port = Port(host=MockSystemHost(log_executive=True, filesystem=filesystem), options=MockOptions(configuration='Release'))
-        port._executive.kill_process = lambda x: log("MOCK kill_process pid: " + str(x))
+        port._executive.kill_process = lambda x: _log.info("MOCK kill_process pid: " + str(x))
         driver = XvfbDriver(port, worker_number=0, pixel_tests=True)
 
         class FakeXvfbProcess(object):
@@ -126,8 +128,8 @@ class XvfbDriverTest(unittest.TestCase):
         driver._xvfb_process = FakeXvfbProcess()
         driver._lock_file = '/tmp/.X42-lock'
 
-        expected_stderr = "MOCK kill_process pid: 1234\n"
-        OutputCapture().assert_outputs(self, driver.stop, [], expected_stderr=expected_stderr)
+        expected_logs = "MOCK kill_process pid: 1234\n"
+        OutputCapture().assert_outputs(self, driver.stop, [], expected_logs=expected_logs)
 
         self.assertEqual(driver._xvfb_process, None)
         self.assertFalse(port._filesystem.exists(driver._lock_file))
index 34ab97b..f3ca6a1 100644 (file)
@@ -63,8 +63,8 @@ class TestLayoutTestApacheHttpd(unittest.TestCase):
             server.start()
             server.stop()
         finally:
-            out, err, logs = oc.restore_output()
-        self.assertTrue("StartServers 4" in err)
-        self.assertTrue("MinSpareServers 4" in err)
-        self.assertTrue("MaxSpareServers 4" in err)
+            _, _, logs = oc.restore_output()
+        self.assertTrue("StartServers 4" in logs)
+        self.assertTrue("MinSpareServers 4" in logs)
+        self.assertTrue("MaxSpareServers 4" in logs)
         self.assertTrue(host.filesystem.exists("/mock/output_dir/httpd.conf"))
index 62e7353..16a0559 100755 (executable)
@@ -242,9 +242,8 @@ max 548000 bytes
             self.assertEqual(TestDriverWithStartCount.start_count, 1)
         finally:
             stdout, stderr, log = output.restore_output()
-        self.assertEqual(stderr, "Ready to run test?\n")
         self.assertEqual(self.normalizeFinishedTime(log),
-            "Running inspector/pass.html (1 of 1)\nRESULT group_name: test_name= 42 ms\nFinished: 0.1 s\n\n")
+            "Ready to run test?\nRunning inspector/pass.html (1 of 1)\nRESULT group_name: test_name= 42 ms\nFinished: 0.1 s\n\n")
 
     def test_run_test_set_for_parser_tests(self):
         runner, port = self.create_runner()
@@ -289,14 +288,16 @@ max 548000 bytes
             'RESULT Parser: memory-test: Malloc= 532000.0 bytes',
             'median= 529000.0 bytes, stdev= 13000.0 bytes, min= 511000.0 bytes, max= 548000.0 bytes',
             'Finished: 0.1 s',
-            '', '']))
+            '',
+            'MOCK: user.open_url: file://...',
+            '']))
         results = runner.load_output_json()[0]['results']
         values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
         self.assertEqual(results['Parser/memory-test'], {'min': 1080.0, 'max': 1120.0, 'median': 1101.0, 'stdev': 11.0, 'avg': 1100.0, 'unit': 'ms', 'values': values})
         self.assertEqual(results['Parser/memory-test:JSHeap'], {'min': 811000.0, 'max': 848000.0, 'median': 829000.0, 'stdev': 15000.0, 'avg': 832000.0, 'unit': 'bytes', 'values': values})
         self.assertEqual(results['Parser/memory-test:Malloc'], {'min': 511000.0, 'max': 548000.0, 'median': 529000.0, 'stdev': 13000.0, 'avg': 532000.0, 'unit': 'bytes', 'values': values})
 
-    def _test_run_with_json_output(self, runner, filesystem, upload_suceeds=False, expected_exit_code=0):
+    def _test_run_with_json_output(self, runner, filesystem, upload_suceeds=False, results_shown=True, expected_exit_code=0):
         filesystem.write_text_file(runner._base_path + '/inspector/pass.html', 'some content')
         filesystem.write_text_file(runner._base_path + '/Bindings/event-target-wrapper.html', 'some content')
 
@@ -318,18 +319,19 @@ max 548000 bytes
             stdout, stderr, logs = output_capture.restore_output()
 
         if not expected_exit_code:
-            self.assertEqual(self.normalizeFinishedTime(logs),
-                '\n'.join(['Running 2 tests',
-                'Running Bindings/event-target-wrapper.html (1 of 2)',
-                'RESULT Bindings: event-target-wrapper= 1489.05 ms',
-                'median= 1487.0 ms, stdev= 14.46 ms, min= 1471.0 ms, max= 1510.0 ms',
-                'Finished: 0.1 s',
-                '',
-                'Running inspector/pass.html (2 of 2)',
-                'RESULT group_name: test_name= 42 ms',
-                'Finished: 0.1 s',
-                '',
-                '']))
+            expected_logs = '\n'.join(['Running 2 tests',
+                                       'Running Bindings/event-target-wrapper.html (1 of 2)',
+                                       'RESULT Bindings: event-target-wrapper= 1489.05 ms',
+                                       'median= 1487.0 ms, stdev= 14.46 ms, min= 1471.0 ms, max= 1510.0 ms',
+                                       'Finished: 0.1 s',
+                                       '',
+                                       'Running inspector/pass.html (2 of 2)',
+                                       'RESULT group_name: test_name= 42 ms',
+                                       'Finished: 0.1 s',
+                                       '', ''])
+            if results_shown:
+                expected_logs += 'MOCK: user.open_url: file://...\n'
+            self.assertEqual(self.normalizeFinishedTime(logs), expected_logs)
 
         self.assertEqual(uploaded[0], upload_suceeds)
 
@@ -373,7 +375,7 @@ max 548000 bytes
     def test_run_respects_no_results(self):
         runner, port = self.create_runner(args=['--output-json-path=/mock-checkout/output.json',
             '--test-results-server=some.host', '--no-results'])
-        self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=False)
+        self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=False, results_shown=False)
         self.assertFalse(port.host.filesystem.isfile('/mock-checkout/output.json'))
 
     def test_run_generates_json_by_default(self):
@@ -428,7 +430,7 @@ max 548000 bytes
         page_shown = []
         port.show_results_html_file = lambda path: page_shown.append(path)
         filesystem = port.host.filesystem
-        self._test_run_with_json_output(runner, filesystem)
+        self._test_run_with_json_output(runner, filesystem, results_shown=False)
 
         expected_entry = {"timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
             "webkit-revision": "5678", "branch": "webkit-trunk"}
@@ -441,7 +443,7 @@ max 548000 bytes
             '<script>%s</script>END' % json_output)
         self.assertEqual(page_shown[0], '/mock-checkout/output.html')
 
-        self._test_run_with_json_output(runner, filesystem)
+        self._test_run_with_json_output(runner, filesystem, results_shown=False)
         json_output = port.host.filesystem.read_text_file('/mock-checkout/output.json')
         self.assertEqual(json.loads(json_output), [expected_entry, expected_entry])
         self.assertEqual(filesystem.read_text_file('/mock-checkout/output.html'),
@@ -454,14 +456,14 @@ max 548000 bytes
         runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json'])
         page_shown = []
         port.show_results_html_file = show_results_html_file
-        self._test_run_with_json_output(runner, port.host.filesystem)
+        self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False)
         self.assertEqual(page_shown[0], '/mock-checkout/output.html')
 
         runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
             '--no-show-results'])
         page_shown = []
         port.show_results_html_file = show_results_html_file
-        self._test_run_with_json_output(runner, port.host.filesystem)
+        self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False)
         self.assertEqual(page_shown, [])
 
     def test_run_with_bad_output_json(self):
index f0e82b2..9d0b714 100644 (file)
@@ -38,7 +38,7 @@ from webkitpy.tool.mocktool import MockTool
 class FeedersTest(unittest.TestCase):
     def test_commit_queue_feeder(self):
         feeder = CommitQueueFeeder(MockTool())
-        expected_stderr = u"""Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
+        expected_logs = """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
 Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
 MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.
 
@@ -46,9 +46,9 @@ MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Reje
 
 - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your committer rights.'
 MOCK: update_work_items: commit-queue [10005, 10000]
+Feeding commit-queue items [10005, 10000]
 """
-        expected_logs = "Feeding commit-queue items [10005, 10000]\n"
-        OutputCapture().assert_outputs(self, feeder.feed, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        OutputCapture().assert_outputs(self, feeder.feed, expected_logs=expected_logs)
 
     def _mock_attachment(self, is_rollout, attach_date):
         attachment = Mock()
index eeb06c3..48c5112 100644 (file)
@@ -70,7 +70,7 @@ class FlakyTestReporterTest(unittest.TestCase):
 
     def test_create_bug_for_flaky_test(self):
         reporter = FlakyTestReporter(MockTool(), 'dummy-queue')
-        expected_stderr = """MOCK create_bug
+        expected_logs = """MOCK create_bug
 bug_title: Flaky Test: foo/bar.html
 bug_description: This is an automatically generated bug from the dummy-queue.
 foo/bar.html has been flaky on the dummy-queue.
@@ -90,7 +90,7 @@ component: Tools / Tests
 cc: test@test.com
 blocked: 50856
 """
-        OutputCapture().assert_outputs(self, reporter._create_bug_for_flaky_test, ['foo/bar.html', ['test@test.com'], 'FLAKE_MESSAGE'], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, reporter._create_bug_for_flaky_test, ['foo/bar.html', ['test@test.com'], 'FLAKE_MESSAGE'], expected_logs=expected_logs)
 
     def test_follow_duplicate_chain(self):
         tool = MockTool()
@@ -105,7 +105,8 @@ blocked: 50856
         reporter = FlakyTestReporter(tool, 'dummy-queue')
         reporter._lookup_bug_for_flaky_test = lambda bug_id: None
         patch = tool.bugs.fetch_attachment(10000)
-        expected_stderr = """MOCK create_bug
+        expected_logs = """Bug does not already exist for foo/bar.html, creating.
+MOCK create_bug
 bug_title: Flaky Test: foo/bar.html
 bug_description: This is an automatically generated bug from the dummy-queue.
 foo/bar.html has been flaky on the dummy-queue.
@@ -144,7 +145,7 @@ The dummy-queue is continuing to process your patch.
             def namelist(self):
                 return ['foo/bar-diffs.txt']
 
-        OutputCapture().assert_outputs(self, reporter.report_flaky_tests, [patch, test_results, MockZipFile()], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, reporter.report_flaky_tests, [patch, test_results, MockZipFile()], expected_logs=expected_logs)
 
     def test_optional_author_string(self):
         reporter = FlakyTestReporter(MockTool(), 'dummy-queue')
index 4abee66..e307e6e 100644 (file)
@@ -86,8 +86,8 @@ class IRCCommandTest(unittest.TestCase):
         rollout = Rollout()
         tool = MockTool()
         tool.executive = MockExecutive(should_log=True)
-        expected_stderr = "MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout\n"
-        OutputCapture().assert_outputs(self, rollout._update_working_copy, [tool], expected_stderr=expected_stderr)
+        expected_logs = "MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout\n"
+        OutputCapture().assert_outputs(self, rollout._update_working_copy, [tool], expected_logs=expected_logs)
 
     def test_rollout(self):
         rollout = Rollout()
index ce9a76b..f96b7b6 100644 (file)
@@ -71,8 +71,8 @@ class IRCBotTest(unittest.TestCase):
                 raise Exception("mock_exception")
 
         bot._parse_command_and_args = lambda request: (CommandWithException, [])
-        expected_stderr = 'MOCK: irc.post: Exception executing command: mock_exception\n'
-        OutputCapture().assert_outputs(self, bot.process_message, args=["mock_nick", "ignored message"], expected_stderr=expected_stderr)
+        expected_logs = 'MOCK: irc.post: Exception executing command: mock_exception\n'
+        OutputCapture().assert_outputs(self, bot.process_message, args=["mock_nick", "ignored message"], expected_logs=expected_logs)
 
         class CommandWithException(object):
             def execute(self, nick, args, tool, sheriff):
@@ -84,80 +84,80 @@ class IRCBotTest(unittest.TestCase):
 
     def test_hi(self):
         random.seed(23324)
-        expected_stderr = 'MOCK: irc.post: "Only you can prevent forest fires." -- Smokey the Bear\n'
-        OutputCapture().assert_outputs(self, run, args=["hi"], expected_stderr=expected_stderr)
+        expected_logs = 'MOCK: irc.post: "Only you can prevent forest fires." -- Smokey the Bear\n'
+        OutputCapture().assert_outputs(self, run, args=["hi"], expected_logs=expected_logs)
 
     def test_help(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Available commands: create-bug, help, hi, restart, roll-chromium-deps, rollout, whois\n"
-        OutputCapture().assert_outputs(self, run, args=["help"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Available commands: create-bug, help, hi, restart, roll-chromium-deps, rollout, whois\n"
+        OutputCapture().assert_outputs(self, run, args=["help"], expected_logs=expected_logs)
 
     def test_restart(self):
-        expected_stderr = "MOCK: irc.post: Restarting...\n"
-        OutputCapture().assert_outputs(self, run, args=["restart"], expected_stderr=expected_stderr, expected_exception=TerminateQueue)
+        expected_logs = "MOCK: irc.post: Restarting...\n"
+        OutputCapture().assert_outputs(self, run, args=["restart"], expected_logs=expected_logs, expected_exception=TerminateQueue)
 
     def test_rollout(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
-        OutputCapture().assert_outputs(self, run, args=["rollout 21654 This patch broke the world"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
+        OutputCapture().assert_outputs(self, run, args=["rollout 21654 This patch broke the world"], expected_logs=expected_logs)
 
     def test_revert(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
-        OutputCapture().assert_outputs(self, run, args=["revert 21654 This patch broke the world"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
+        OutputCapture().assert_outputs(self, run, args=["revert 21654 This patch broke the world"], expected_logs=expected_logs)
 
     def test_roll_chromium_deps(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to r21654\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
-        OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps 21654"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to r21654\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
+        OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps 21654"], expected_logs=expected_logs)
 
     def test_roll_chromium_deps_to_lkgr(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to last-known good revision\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
-        OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to last-known good revision\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
+        OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps"], expected_logs=expected_logs)
 
     def test_multi_rollout(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
-        OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 21656 This 21654 patch broke the world"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
+        OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 21656 This 21654 patch broke the world"], expected_logs=expected_logs)
 
     def test_rollout_with_r_in_svn_revision(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
-        OutputCapture().assert_outputs(self, run, args=["rollout r21654 This patch broke the world"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
+        OutputCapture().assert_outputs(self, run, args=["rollout r21654 This patch broke the world"], expected_logs=expected_logs)
 
     def test_multi_rollout_with_r_in_svn_revision(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
-        OutputCapture().assert_outputs(self, run, args=["rollout r21654 21655 r21656 This r21654 patch broke the world"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
+        OutputCapture().assert_outputs(self, run, args=["rollout r21654 21655 r21656 This r21654 patch broke the world"], expected_logs=expected_logs)
 
     def test_rollout_bananas(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
-        OutputCapture().assert_outputs(self, run, args=["rollout bananas"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
+        OutputCapture().assert_outputs(self, run, args=["rollout bananas"], expected_logs=expected_logs)
 
     def test_rollout_invalidate_revision(self):
         # When folks pass junk arguments, we should just spit the usage back at them.
-        expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
+        expected_logs = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
         OutputCapture().assert_outputs(self, run,
                                        args=["rollout --component=Tools 21654"],
-                                       expected_stderr=expected_stderr)
+                                       expected_logs=expected_logs)
 
     def test_rollout_invalidate_reason(self):
         # FIXME: I'm slightly confused as to why this doesn't return the USAGE message.
-        expected_stderr = """MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...
+        expected_logs = """MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...
 MOCK: irc.post: mock_nick, abarth, darin, eseidel: Failed to create rollout patch:
 MOCK: irc.post: The rollout reason may not begin with - (\"-bad (Requested by mock_nick on #webkit).\").
 """
         OutputCapture().assert_outputs(self, run,
                                        args=["rollout 21654 -bad"],
-                                       expected_stderr=expected_stderr)
+                                       expected_logs=expected_logs)
 
     def test_multi_rollout_invalidate_reason(self):
-        expected_stderr = """MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...
+        expected_logs = """MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...
 MOCK: irc.post: mock_nick, abarth, darin, eseidel: Failed to create rollout patch:
 MOCK: irc.post: The rollout reason may not begin with - (\"-bad (Requested by mock_nick on #webkit).\").
 """
         OutputCapture().assert_outputs(self, run,
                                        args=["rollout "
                                              "21654 21655 r21656 -bad"],
-                                       expected_stderr=expected_stderr)
+                                       expected_logs=expected_logs)
 
     def test_rollout_no_reason(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
-        OutputCapture().assert_outputs(self, run, args=["rollout 21654"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
+        OutputCapture().assert_outputs(self, run, args=["rollout 21654"], expected_logs=expected_logs)
 
     def test_multi_rollout_no_reason(self):
-        expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
-        OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 r21656"], expected_stderr=expected_stderr)
+        expected_logs = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
+        OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 r21656"], expected_logs=expected_logs)
index 3ff5082..02fc036 100644 (file)
@@ -65,7 +65,7 @@ class SheriffTest(unittest.TestCase):
             sheriff.post_blame_comment_on_bug(commit_info, builders, ["mock-test-1"])
             sheriff.post_blame_comment_on_bug(commit_info, builders, ["mock-test-1", "mock-test-2"])
 
-        expected_stderr = u"""MOCK bug comment: bug_id=1234, cc=['watcher@example.com']
+        expected_logs = u"""MOCK bug comment: bug_id=1234, cc=['watcher@example.com']
 --- Begin comment ---
 http://trac.webkit.org/changeset/4321 might have broken Foo and Bar
 --- End comment ---
@@ -86,4 +86,4 @@ mock-test-2
 --- End comment ---
 
 """
-        OutputCapture().assert_outputs(self, run, expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, run, expected_logs=expected_logs)
index 91818d1..e88a86f 100644 (file)
@@ -33,18 +33,23 @@ from webkitpy.tool.commands.applywatchlistlocal import ApplyWatchListLocal
 
 class ApplyWatchListLocalTest(CommandsTest):
     def test_args_parsing(self):
-        expected_stderr = 'MockWatchList: determine_cc_and_messages\n'
-        self.assert_execute_outputs(ApplyWatchListLocal(), [''], expected_stderr=expected_stderr)
+        expected_logs = """MockWatchList: determine_cc_and_messages
+No bug was updated because no id was given.
+Result of watchlist: cc "abarth@webkit.org, eric@webkit.org, levin@chromium.org" messages "Message1.
+
+Message2."
+"""
+        self.assert_execute_outputs(ApplyWatchListLocal(), [''], expected_logs=expected_logs)
 
     def test_args_parsing_with_bug(self):
-        expected_stderr = """MockWatchList: determine_cc_and_messages
+        expected_logs = """MockWatchList: determine_cc_and_messages
 MOCK bug comment: bug_id=50002, cc=set(['eric@webkit.org', 'levin@chromium.org', 'abarth@webkit.org'])
 --- Begin comment ---
 Message1.
 
 Message2.
 --- End comment ---\n\n"""
-        self.assert_execute_outputs(ApplyWatchListLocal(), ['50002'], expected_stderr=expected_stderr)
+        self.assert_execute_outputs(ApplyWatchListLocal(), ['50002'], expected_logs=expected_logs)
 
     def test_args_parsing_with_two_bugs(self):
         self._assertRaisesRegexp(Exception, 'Too many arguments given: 1234 5678', self.assert_execute_outputs, ApplyWatchListLocal(), ['1234', '5678'])
index bae9927..14bf2ce 100644 (file)
@@ -123,18 +123,17 @@ Running run-webkit-tests
         self.assert_execute_outputs(ApplyFromBug(), [50000], options=options, expected_logs=expected_logs)
 
     def test_apply_watch_list(self):
-        expected_stderr = """MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout
-MockWatchList: determine_cc_and_messages
-"""
         expected_logs = """Processing 1 patch from 1 bug.
 Updating working directory
+MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout
 Processing patch 10000 from bug 50000.
+MockWatchList: determine_cc_and_messages
 No bug was updated because no id was given.
 Result of watchlist: cc "abarth@webkit.org, eric@webkit.org, levin@chromium.org" messages "Message1.
 
 Message2."
 """
-        self.assert_execute_outputs(ApplyWatchList(), [10000], options=self._default_options(), expected_stderr=expected_stderr, expected_logs=expected_logs, tool=MockTool(log_executive=True))
+        self.assert_execute_outputs(ApplyWatchList(), [10000], options=self._default_options(), expected_logs=expected_logs, tool=MockTool(log_executive=True))
 
     def test_land(self):
         expected_logs = """Building WebKit
@@ -155,30 +154,29 @@ Updating bug 50000
         self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
 
     def test_land_cowboy(self):
-        expected_stderr = """MOCK run_and_throw_if_fail: ['mock-prepare-ChangeLog', '--email=MOCK email', '--merge-base=None', 'MockFile1'], cwd=/mock-checkout
+        expected_logs = """MOCK run_and_throw_if_fail: ['mock-prepare-ChangeLog', '--email=MOCK email', '--merge-base=None', 'MockFile1'], cwd=/mock-checkout
 MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1', '--filter', '-changelog'], cwd=/mock-checkout
 MOCK run_command: ['ruby', '-I', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch/prettify.rb'], cwd=None, input=Patch1
 MOCK: user.open_url: file://...
 Was that diff correct?
+Building WebKit
 MOCK run_and_throw_if_fail: ['mock-build-webkit'], cwd=/mock-checkout, env={'LC_ALL': 'C', 'MOCK_ENVIRON_COPY': '1'}
-MOCK run_and_throw_if_fail: ['mock-test-webkitpy'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['mock-test-webkitperl'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--quiet'], cwd=/mock-checkout
-"""
-        expected_logs = """Building WebKit
 Running Python unit tests
+MOCK run_and_throw_if_fail: ['mock-test-webkitpy'], cwd=/mock-checkout
 Running Perl unit tests
+MOCK run_and_throw_if_fail: ['mock-test-webkitperl'], cwd=/mock-checkout
 Running JavaScriptCore tests
+MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
 Running WebKit unit tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests'], cwd=/mock-checkout
 Running run-webkit-tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--quiet'], cwd=/mock-checkout
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 No bug id provided.
 """
         mock_tool = MockTool(log_executive=True)
-        self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_stderr=expected_stderr, tool=mock_tool)
+        self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
 
     def test_land_red_builders(self):
         expected_logs = """Building WebKit
@@ -195,11 +193,13 @@ Updating bug 50000
         self.assert_execute_outputs(Land(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
 
     def test_check_style(self):
-        expected_stderr = """MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout
+        expected_logs = """Processing 1 patch from 1 bug.
+Updating working directory
+MOCK run_and_throw_if_fail: ['mock-update-webkit'], cwd=/mock-checkout
+Processing patch 10000 from bug 50000.
 MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1'], cwd=/mock-checkout
 """
-        expected_logs = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 10000 from bug 50000.\n"
-        self.assert_execute_outputs(CheckStyle(), [10000], options=self._default_options(), expected_stderr=expected_stderr, expected_logs=expected_logs, tool=MockTool(log_executive=True))
+        self.assert_execute_outputs(CheckStyle(), [10000], options=self._default_options(), expected_logs=expected_logs, tool=MockTool(log_executive=True))
 
     def test_build_attachment(self):
         expected_logs = "Processing 1 patch from 1 bug.\nUpdating working directory\nProcessing patch 10000 from bug 50000.\nBuilding WebKit\n"
@@ -280,7 +280,9 @@ Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more
         self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_logs=expected_logs)
 
     def test_create_rollout(self):
-        expected_stderr = """MOCK create_bug
+        expected_logs = """Preparing rollout for bug 50000.
+Updating working directory
+MOCK create_bug
 bug_title: REGRESSION(r852): Reason
 bug_description: http://trac.webkit.org/changeset/852 broke the build:
 Reason
@@ -298,12 +300,13 @@ If you would like to land the rollout faster, you can use the following command:
 where ATTACHMENT_ID is the ID of this attachment.
 -- End comment --
 """
-        expected_logs = "Preparing rollout for bug 50000.\nUpdating working directory\n"
-        self.assert_execute_outputs(CreateRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr, expected_logs=expected_logs)
-        self.assert_execute_outputs(CreateRollout(), ["855 852 854", "Reason"], options=self._default_options(), expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_execute_outputs(CreateRollout(), [852, "Reason"], options=self._default_options(), expected_logs=expected_logs)
+        self.assert_execute_outputs(CreateRollout(), ["855 852 854", "Reason"], options=self._default_options(), expected_logs=expected_logs)
 
     def test_create_rollout_resolved(self):
-        expected_stderr = """MOCK create_bug
+        expected_logs = """Preparing rollout for bug 50004.
+Updating working directory
+MOCK create_bug
 bug_title: REGRESSION(r3001): Reason
 bug_description: http://trac.webkit.org/changeset/3001 broke the build:
 Reason
@@ -322,22 +325,20 @@ If you would like to land the rollout faster, you can use the following command:
 where ATTACHMENT_ID is the ID of this attachment.
 -- End comment --
 """
-        expected_logs = "Preparing rollout for bug 50004.\nUpdating working directory\n"
-        self.assert_execute_outputs(CreateRollout(), [3001, "Reason"], options=self._default_options(), expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_execute_outputs(CreateRollout(), [3001, "Reason"], options=self._default_options(), expected_logs=expected_logs)
 
     def test_rollout(self):
-        expected_stderr = """MOCK: user.open_url: file://...
+        expected_logs = """Preparing rollout for bug 50000.
+Updating working directory
+MOCK: user.open_url: file://...
 Was that diff correct?
+Building WebKit
+Committed r49824: <http://trac.webkit.org/changeset/49824>
 MOCK reopen_bug 50000 with comment 'Reverted r852 for reason:
 
 Reason
 
 Committed r49824: <http://trac.webkit.org/changeset/49824>'
 """
-        expected_logs = """Preparing rollout for bug 50000.
-Updating working directory
-Building WebKit
-Committed r49824: <http://trac.webkit.org/changeset/49824>
-"""
-        self.assert_execute_outputs(Rollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_execute_outputs(Rollout(), [852, "Reason"], options=self._default_options(), expected_logs=expected_logs)
 
index 9e2b0d8..b33129a 100644 (file)
@@ -43,7 +43,7 @@ class AbstractEarlyWarningSystemTest(QueuesTest):
         ews = TestEWS()
         ews.bind_to_tool(MockTool())
         ews._options = MockOptions(port=None, confirm=False)
-        OutputCapture().assert_outputs(self, ews.begin_work_queue, expected_stderr=self._default_begin_work_queue_stderr(ews.name))
+        OutputCapture().assert_outputs(self, ews.begin_work_queue, expected_logs=self._default_begin_work_queue_logs(ews.name))
         ews._expected_failures.unexpected_failures_observed = lambda results: set(["foo.html", "bar.html"])
         task = Mock()
         patch = ews._tool.bugs.fetch_attachment(10000)
@@ -51,20 +51,14 @@ class AbstractEarlyWarningSystemTest(QueuesTest):
 
 
 class EarlyWarningSytemTest(QueuesTest):
-    def _default_expected_stderr(self, ews):
+    def _default_expected_logs(self, ews):
         string_replacemnts = {
             "name": ews.name,
             "port": ews.port_name,
         }
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr(ews.name),
-            "next_work_item": "",
-            "process_work_item": "MOCK: update_status: %(name)s Pass\nMOCK: release_work_item: %(name)s 10000\n" % string_replacemnts,
-        }
-        return expected_stderr
-
-    def _default_expected_logs(self):
         expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs(ews.name),
+            "process_work_item": "MOCK: update_status: %(name)s Pass\nMOCK: release_work_item: %(name)s 10000\n" % string_replacemnts,
             "handle_unexpected_error": "Mock error message\n",
             "handle_script_error": "ScriptError error message\n\nMOCK output\n",
         }
@@ -75,14 +69,13 @@ class EarlyWarningSytemTest(QueuesTest):
         options = Mock()
         options.port = None
         options.run_tests = ews._default_run_tests
-        self.assert_queue_outputs(ews, expected_stderr=self._default_expected_stderr(ews), options=options)
+        self.assert_queue_outputs(ews, expected_logs=self._default_expected_logs(ews), options=options)
 
     def _test_testing_ews(self, ews):
         ews.test_results = lambda: None
         ews.bind_to_tool(MockTool())
-        expected_stderr = self._default_expected_stderr(ews)
-        expected_logs = self._default_expected_logs()
-        self.assert_queue_outputs(ews, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        expected_logs = self._default_expected_logs(ews)
+        self.assert_queue_outputs(ews, expected_logs=expected_logs)
 
     def test_builder_ewses(self):
         self._test_builder_ews(MacEWS())
index ca63828..680e514 100644 (file)
@@ -46,6 +46,5 @@ class OpenBugsTest(CommandsTest):
             self.assertEqual(openbugs._find_bugs_in_string(expectation[0]), expectation[1])
 
     def test_args_parsing(self):
-        expected_stderr = "MOCK: user.open_url: http://example.com/12345\nMOCK: user.open_url: http://example.com/23456\n"
-        expected_logs = "2 bugs found in input.\n"
-        self.assert_execute_outputs(OpenBugs(), ["12345\n23456"], expected_stderr=expected_stderr, expected_logs=expected_logs)
+        expected_logs = "2 bugs found in input.\nMOCK: user.open_url: http://example.com/12345\nMOCK: user.open_url: http://example.com/23456\n"
+        self.assert_execute_outputs(OpenBugs(), ["12345\n23456"], expected_logs=expected_logs)
index 57bbed6..b252c0b 100644 (file)
@@ -65,14 +65,13 @@ class MockPortFactory(object):
 
 class QueryCommandsTest(CommandsTest):
     def test_bugs_to_commit(self):
-        expected_stderr = "Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)\n"
-        self.assert_execute_outputs(BugsToCommit(), None, "50000\n50003\n", expected_stderr=expected_stderr)
+        expected_logs = "Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)\n"
+        self.assert_execute_outputs(BugsToCommit(), None, "50000\n50003\n", expected_logs=expected_logs)
 
     def test_patches_in_commit_queue(self):
         expected_stdout = "http://example.com/10000\nhttp://example.com/10002\n"
-        expected_stderr = "Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)\n"
-        expected_logs = "Patches in commit queue:\n"
-        self.assert_execute_outputs(PatchesInCommitQueue(), None, expected_stdout, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        expected_logs = "Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)\nPatches in commit queue:\n"
+        self.assert_execute_outputs(PatchesInCommitQueue(), None, expected_stdout, expected_logs=expected_logs)
 
     def test_patches_to_commit_queue(self):
         expected_stdout = "http://example.com/10003&action=edit\n"
index 618d291..0a32f29 100644 (file)
@@ -130,9 +130,8 @@ class FeederQueueTest(QueuesTest):
     def test_feeder_queue(self):
         queue = TestFeederQueue()
         tool = MockTool(log_executive=True)
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("feeder-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("feeder-queue"),
             "process_work_item": """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
 Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
 MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.
@@ -141,16 +140,13 @@ MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Reje
 
 - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your committer rights.'
 MOCK: update_work_items: commit-queue [10005, 10000]
-MOCK: submit_to_ews: 10002
-""",
-        }
-        expected_logs = {
-            "process_work_item": """Feeding commit-queue items [10005, 10000]
+Feeding commit-queue items [10005, 10000]
 Feeding EWS (1 r? patch, 1 new)
+MOCK: submit_to_ews: 10002
 """,
             "handle_unexpected_error": "Mock error message\n",
         }
-        self.assert_queue_outputs(queue, tool=tool, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_queue_outputs(queue, tool=tool, expected_logs=expected_logs)
 
 
 class AbstractPatchQueueTest(CommandsTest):
@@ -163,8 +159,8 @@ class AbstractPatchQueueTest(CommandsTest):
         self.assertEqual(queue._next_patch(), None)
         tool.status_server = MockStatusServer(work_items=[2, 10000, 10001])
         expected_stdout = "MOCK: fetch_attachment: 2 is not a known attachment id\n"  # A mock-only message to prevent us from making mistakes.
-        expected_stderr = "MOCK: release_work_item: None 2\n"
-        patch = OutputCapture().assert_outputs(self, queue._next_patch, expected_stdout=expected_stdout, expected_stderr=expected_stderr)
+        expected_logs = "MOCK: release_work_item: None 2\n"
+        patch = OutputCapture().assert_outputs(self, queue._next_patch, expected_stdout=expected_stdout, expected_logs=expected_logs)
         # The patch.id() == 2 is ignored because it doesn't exist.
         self.assertEqual(patch.id(), 10000)
         self.assertEqual(queue._next_patch().id(), 10001)
@@ -178,13 +174,13 @@ class AbstractPatchQueueTest(CommandsTest):
         queue._options = Mock()
         queue._options.port = None
         patch = queue._tool.bugs.fetch_attachment(10001)
-        expected_stderr = """MOCK add_attachment_to_bug: bug_id=50000, description=Archive of layout-test-results from bot filename=layout-test-results.zip mimetype=None
+        expected_logs = """MOCK add_attachment_to_bug: bug_id=50000, description=Archive of layout-test-results from bot filename=layout-test-results.zip mimetype=None
 -- Begin comment --
 The attached test failures were seen while running run-webkit-tests on the mock-queue.
 Port: MockPort  Platform: MockPlatform 1.0
 -- End comment --
 """
-        OutputCapture().assert_outputs(self, queue._upload_results_archive_for_patch, [patch, Mock()], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, queue._upload_results_archive_for_patch, [patch, Mock()], expected_logs=expected_logs)
 
 
 class NeedsUpdateSequence(StepSequence):
@@ -238,9 +234,8 @@ class CommitQueueTest(QueuesTest):
         tool = MockTool()
         tool.filesystem.write_text_file('/tmp/layout-test-results/full_results.json', '')  # Otherwise the commit-queue will hit a KeyError trying to read the results from the MockFileSystem.
         tool.filesystem.write_text_file('/tmp/layout-test-results/webkit_unit_tests_output.xml', '')
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
             "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
 MOCK: update_status: commit-queue Updated working directory
 MOCK: update_status: commit-queue Applied patch
@@ -251,17 +246,14 @@ MOCK: update_status: commit-queue Landed patch
 MOCK: update_status: commit-queue Pass
 MOCK: release_work_item: commit-queue 10000
 """,
-            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
-        }
-        expected_logs = {
             "handle_script_error": "ScriptError error message\n\nMOCK output\n",
+            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
         }
-        self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs)
 
     def test_commit_queue_failure(self):
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
             "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
 MOCK: update_status: commit-queue Updated working directory
 MOCK: update_status: commit-queue Patch does not apply
@@ -270,10 +262,8 @@ Full output: http://dummy_url'
 MOCK: update_status: commit-queue Fail
 MOCK: release_work_item: commit-queue 10000
 """,
-            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
-        }
-        expected_logs = {
             "handle_script_error": "ScriptError error message\n\nMOCK output\n",
+            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
         }
         queue = CommitQueue()
 
@@ -285,12 +275,11 @@ MOCK: release_work_item: commit-queue 10000
             raise ScriptError('MOCK script error')
 
         queue.run_webkit_patch = mock_run_webkit_patch
-        self.assert_queue_outputs(queue, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_queue_outputs(queue, expected_logs=expected_logs)
 
     def test_commit_queue_failure_with_failing_tests(self):
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
             "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
 MOCK: update_status: commit-queue Updated working directory
 MOCK: update_status: commit-queue Patch does not apply
@@ -301,10 +290,8 @@ Full output: http://dummy_url'
 MOCK: update_status: commit-queue Fail
 MOCK: release_work_item: commit-queue 10000
 """,
-            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
-        }
-        expected_logs = {
             "handle_script_error": "ScriptError error message\n\nMOCK output\n",
+            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
         }
         queue = CommitQueue()
 
@@ -317,16 +304,15 @@ MOCK: release_work_item: commit-queue 10000
             raise ScriptError('MOCK script error')
 
         queue.run_webkit_patch = mock_run_webkit_patch
-        self.assert_queue_outputs(queue, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_queue_outputs(queue, expected_logs=expected_logs)
 
     def test_rollout(self):
         tool = MockTool(log_executive=True)
         tool.filesystem.write_text_file('/tmp/layout-test-results/full_results.json', '')  # Otherwise the commit-queue will hit a KeyError trying to read the results from the MockFileSystem.
         tool.filesystem.write_text_file('/tmp/layout-test-results/webkit_unit_tests_output.xml', '')
         tool.buildbot.light_tree_on_fire()
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
             "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean', '--port=%(port_name)s'], cwd=/mock-checkout
 MOCK: update_status: commit-queue Cleaned working directory
 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update', '--port=%(port_name)s'], cwd=/mock-checkout
@@ -344,21 +330,18 @@ MOCK: update_status: commit-queue Landed patch
 MOCK: update_status: commit-queue Pass
 MOCK: release_work_item: commit-queue 10000
 """ % {"port_name": CommitQueue.port_name},
-            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
-        }
-        expected_logs = {
             "handle_script_error": "ScriptError error message\n\nMOCK output\n",
+            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
         }
-        self.assert_queue_outputs(CommitQueue(), tool=tool, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs)
 
     def test_rollout_lands(self):
         tool = MockTool(log_executive=True)
         tool.buildbot.light_tree_on_fire()
         rollout_patch = tool.bugs.fetch_attachment(10005)  # _patch6, a rollout patch.
         assert(rollout_patch.is_rollout())
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
             "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean', '--port=%(port_name)s'], cwd=/mock-checkout
 MOCK: update_status: commit-queue Cleaned working directory
 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update', '--port=%(port_name)s'], cwd=/mock-checkout
@@ -372,12 +355,10 @@ MOCK: update_status: commit-queue Landed patch
 MOCK: update_status: commit-queue Pass
 MOCK: release_work_item: commit-queue 10005
 """ % {"port_name": CommitQueue.port_name},
-            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10005' with comment 'Rejecting attachment 10005 from commit-queue.' and additional comment 'Mock error message'\n",
-        }
-        expected_logs = {
             "handle_script_error": "ScriptError error message\n\nMOCK output\n",
+            "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10005' with comment 'Rejecting attachment 10005 from commit-queue.' and additional comment 'Mock error message'\n",
         }
-        self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_logs=expected_logs)
 
     def test_auto_retry(self):
         queue = CommitQueue()
@@ -386,10 +367,11 @@ MOCK: release_work_item: commit-queue 10005
         tool = AlwaysCommitQueueTool()
         sequence = NeedsUpdateSequence(None)
 
-        expected_stderr = "MOCK: update_status: commit-queue Tests passed, but commit failed (checkout out of date).  Updating, then landing without building or re-running tests.\n"
-        expected_logs = "Commit failed because the checkout is out of date. Please update and try again.\n"
+        expected_logs = """Commit failed because the checkout is out of date. Please update and try again.
+MOCK: update_status: commit-queue Tests passed, but commit failed (checkout out of date).  Updating, then landing without building or re-running tests.
+"""
         state = {'patch': None}
-        OutputCapture().assert_outputs(self, sequence.run_and_handle_errors, [tool, options, state], expected_exception=TryAgain, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        OutputCapture().assert_outputs(self, sequence.run_and_handle_errors, [tool, options, state], expected_exception=TryAgain, expected_logs=expected_logs)
 
         self.assertEqual(options.update, True)
         self.assertEqual(options.build, False)
@@ -402,7 +384,7 @@ MOCK: release_work_item: commit-queue 10005
         queue._tool.filesystem.write_text_file('/tmp/layout-test-results/webkit_unit_tests_output.xml', '')
         queue._options = Mock()
         queue._options.port = None
-        expected_stderr = """MOCK: update_status: commit-queue Cleaned working directory
+        expected_logs = """MOCK: update_status: commit-queue Cleaned working directory
 MOCK: update_status: commit-queue Updated working directory
 MOCK: update_status: commit-queue Applied patch
 MOCK: update_status: commit-queue ChangeLog validated
@@ -411,11 +393,11 @@ MOCK: update_status: commit-queue Passed tests
 MOCK: update_status: commit-queue Retry
 MOCK: release_work_item: commit-queue 10000
 """
-        OutputCapture().assert_outputs(self, queue.process_work_item, [QueuesTest.mock_work_item], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, queue.process_work_item, [QueuesTest.mock_work_item], expected_logs=expected_logs)
 
     def test_report_flaky_tests(self):
         queue = TestCommitQueue(MockTool())
-        expected_stderr = """MOCK bug comment: bug_id=50002, cc=None
+        expected_logs = """MOCK bug comment: bug_id=50002, cc=None
 --- Begin comment ---
 The commit-queue just saw foo/bar.html flake (text diff) while processing attachment 10000 on bug 50000.
 Port: MockPort  Platform: MockPlatform 1.0
@@ -428,6 +410,7 @@ The commit-queue just saw bar/baz.html flake (text diff) while processing attach
 Port: MockPort  Platform: MockPlatform 1.0
 --- End comment ---
 
+bar/baz-diffs.txt does not exist in results archive, uploading entire archive.
 MOCK add_attachment_to_bug: bug_id=50002, description=Archive of layout-test-results from bot filename=layout-test-results.zip mimetype=None
 MOCK bug comment: bug_id=50000, cc=None
 --- Begin comment ---
@@ -453,7 +436,7 @@ The commit-queue is continuing to process your patch.
                 # This is intentionally missing one diffs.txt to exercise the "upload the whole zip" codepath.
                 return ['foo/bar-diffs.txt']
 
-        OutputCapture().assert_outputs(self, queue.report_flaky_tests, [QueuesTest.mock_work_item, test_results, MockZipFile()], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, queue.report_flaky_tests, [QueuesTest.mock_work_item, test_results, MockZipFile()], expected_logs=expected_logs)
 
     def test_did_pass_testing_ews(self):
         tool = MockTool()
@@ -464,9 +447,8 @@ The commit-queue is continuing to process your patch.
 
 class StyleQueueTest(QueuesTest):
     def test_style_queue_with_style_exception(self):
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("style-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("style-queue"),
             "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'], cwd=/mock-checkout
 MOCK: update_status: style-queue Cleaned working directory
 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update'], cwd=/mock-checkout
@@ -480,18 +462,15 @@ MOCK: update_status: style-queue Style checked
 MOCK: update_status: style-queue Pass
 MOCK: release_work_item: style-queue 10000
 """,
-        }
-        expected_logs = {
             "handle_unexpected_error": "Mock error message\n",
             "handle_script_error": "MOCK output\n",
         }
         tool = MockTool(log_executive=True, executive_throws_when_run=set(['check-style']))
-        self.assert_queue_outputs(StyleQueue(), expected_stderr=expected_stderr, expected_logs=expected_logs, tool=tool)
+        self.assert_queue_outputs(StyleQueue(), expected_logs=expected_logs, tool=tool)
 
     def test_style_queue_with_watch_list_exception(self):
-        expected_stderr = {
-            "begin_work_queue": self._default_begin_work_queue_stderr("style-queue"),
-            "next_work_item": "",
+        expected_logs = {
+            "begin_work_queue": self._default_begin_work_queue_logs("style-queue"),
             "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'], cwd=/mock-checkout
 MOCK: update_status: style-queue Cleaned working directory
 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update'], cwd=/mock-checkout
@@ -505,11 +484,8 @@ MOCK: update_status: style-queue Style checked
 MOCK: update_status: style-queue Pass
 MOCK: release_work_item: style-queue 10000
 """,
-        }
-        expected_logs = {
-            "begin_work_queue": self._default_begin_work_queue_logs("style-queue"),
             "handle_unexpected_error": "Mock error message\n",
             "handle_script_error": "MOCK output\n",
         }
         tool = MockTool(log_executive=True, executive_throws_when_run=set(['apply-watchlist-local']))
-        self.assert_queue_outputs(StyleQueue(), expected_stderr=expected_stderr, expected_logs=expected_logs, tool=tool)
+        self.assert_queue_outputs(StyleQueue(), expected_logs=expected_logs, tool=tool)
index fc2dce3..314a640 100644 (file)
@@ -72,7 +72,7 @@ class QueuesTest(unittest.TestCase):
     def _default_begin_work_queue_logs(self, name):
         checkout_dir = '/mock-checkout'
         string_replacements = {"name": name, 'checkout_dir': checkout_dir}
-        return "CAUTION: %(name)s will discard all local changes in \"%(checkout_dir)s\"\nRunning WebKit %(name)s.\n" % string_replacements
+        return "CAUTION: %(name)s will discard all local changes in \"%(checkout_dir)s\"\nRunning WebKit %(name)s.\nMOCK: update_status: %(name)s Starting Queue\n" % string_replacements
 
     def assert_queue_outputs(self, queue, args=None, work_item=None, expected_stdout=None, expected_stderr=None, expected_exceptions=None, expected_logs=None, options=None, tool=None):
         if not tool:
index cf76653..1dae497 100644 (file)
@@ -34,14 +34,13 @@ from webkitpy.tool.mocktool import MockOptions, MockTool
 
 class RollCommandsTest(CommandsTest):
     def test_update_chromium_deps(self):
-        expected_stderr = """MOCK: MockDEPS.write_variable(chromium_rev, 6764)
+        expected_logs = """Updating Chromium DEPS to 6764
+MOCK: MockDEPS.write_variable(chromium_rev, 6764)
 MOCK: user.open_url: file://...
 Was that diff correct?
-"""
-        expected_logs = """Updating Chromium DEPS to 6764
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 """
-        self.assert_execute_outputs(RollChromiumDEPS(), [6764], expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_execute_outputs(RollChromiumDEPS(), [6764], expected_logs=expected_logs)
 
     def test_update_chromium_deps_older_revision(self):
         options = MockOptions(non_interactive=False)
index 66b2014..ad1b591 100644 (file)
@@ -42,16 +42,15 @@ class UploadCommandsTest(CommandsTest):
 
     def test_assign_to_committer(self):
         tool = MockTool()
-        expected_stderr = """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
+        expected_logs = """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
 MOCK reassign_bug: bug_id=50000, assignee=eric@webkit.org
 -- Begin comment --
 Attachment 10001 was posted by a committer and has review+, assigning to Eric Seidel for commit.
 -- End comment --
-"""
-        expected_logs = """Bug 50003 is already assigned to foo@foo.com (None).
+Bug 50003 is already assigned to foo@foo.com (None).
 Bug 50002 has no non-obsolete patches, ignoring.
 """
-        self.assert_execute_outputs(AssignToCommitter(), [], expected_stderr=expected_stderr, expected_logs=expected_logs, tool=tool)
+        self.assert_execute_outputs(AssignToCommitter(), [], expected_logs=expected_logs, tool=tool)
 
     def test_obsolete_attachments(self):
         expected_logs = "Obsoleting 2 old patches on bug 50000\n"
@@ -67,45 +66,46 @@ Bug 50002 has no non-obsolete patches, ignoring.
         options.request_commit = False
         options.review = True
         options.suggest_reviewers = False
-        expected_stderr = """MOCK: user.open_url: file://...
+        expected_logs = """MOCK: user.open_url: file://...
 Was that diff correct?
+Obsoleting 2 old patches on bug 50000
 MOCK reassign_bug: bug_id=50000, assignee=None
 MOCK add_patch_to_bug: bug_id=50000, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False
 MOCK: user.open_url: http://example.com/50000
 """
-        expected_logs = "Obsoleting 2 old patches on bug 50000\n"
-        self.assert_execute_outputs(Post(), [50000], options=options, expected_stderr=expected_stderr)
+        self.assert_execute_outputs(Post(), [50000], options=options, expected_logs=expected_logs)
 
     def test_attach_to_bug(self):
         options = MockOptions()
         options.comment = "extra comment"
         options.description = "file description"
-        expected_stderr = """MOCK add_attachment_to_bug: bug_id=50000, description=file description filename=None mimetype=None
+        expected_logs = """MOCK add_attachment_to_bug: bug_id=50000, description=file description filename=None mimetype=None
 -- Begin comment --
 extra comment
 -- End comment --
 """
-        self.assert_execute_outputs(AttachToBug(), [50000, "path/to/file.txt", "file description"], options=options, expected_stderr=expected_stderr)
+        self.assert_execute_outputs(AttachToBug(), [50000, "path/to/file.txt", "file description"], options=options, expected_logs=expected_logs)
 
     def test_attach_to_bug_no_description_or_comment(self):
         options = MockOptions()
         options.comment = None
         options.description = None
-        expected_stderr = """MOCK add_attachment_to_bug: bug_id=50000, description=file.txt filename=None mimetype=None
-"""
-        self.assert_execute_outputs(AttachToBug(), [50000, "path/to/file.txt"], options=options, expected_stderr=expected_stderr)
+        expected_logs = "MOCK add_attachment_to_bug: bug_id=50000, description=file.txt filename=None mimetype=None\n"
+        self.assert_execute_outputs(AttachToBug(), [50000, "path/to/file.txt"], options=options, expected_logs=expected_logs)
 
     def test_land_safely(self):
-        expected_stderr = "MOCK reassign_bug: bug_id=50000, assignee=None\nMOCK add_patch_to_bug: bug_id=50000, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n"
-        expected_logs = "Obsoleting 2 old patches on bug 50000\n"
-        self.assert_execute_outputs(LandSafely(), [50000], expected_stderr=expected_stderr, expected_logs=expected_logs)
+        expected_logs = """Obsoleting 2 old patches on bug 50000
+MOCK reassign_bug: bug_id=50000, assignee=None
+MOCK add_patch_to_bug: bug_id=50000, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True
+"""
+        self.assert_execute_outputs(LandSafely(), [50000], expected_logs=expected_logs)
 
     def test_prepare_diff_with_arg(self):
         self.assert_execute_outputs(Prepare(), [50000])
 
     def test_prepare(self):
-        expected_stderr = "MOCK create_bug\nbug_title: Mock user response\nbug_description: Mock user response\ncomponent: MOCK component\ncc: MOCK cc\n"
-        self.assert_execute_outputs(Prepare(), [], expected_stderr=expected_stderr)
+        expected_logs = "MOCK create_bug\nbug_title: Mock user response\nbug_description: Mock user response\ncomponent: MOCK component\ncc: MOCK cc\n"
+        self.assert_execute_outputs(Prepare(), [], expected_logs=expected_logs)
 
     def test_upload(self):
         options = MockOptions()
@@ -117,14 +117,14 @@ extra comment
         options.request_commit = False
         options.review = True
         options.suggest_reviewers = False
-        expected_stderr = """MOCK: user.open_url: file://...
+        expected_logs = """MOCK: user.open_url: file://...
 Was that diff correct?
+Obsoleting 2 old patches on bug 50000
 MOCK reassign_bug: bug_id=50000, assignee=None
 MOCK add_patch_to_bug: bug_id=50000, description=MOCK description, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False
 MOCK: user.open_url: http://example.com/50000
 """
-        expected_logs = "Obsoleting 2 old patches on bug 50000\n"
-        self.assert_execute_outputs(Upload(), [50000], options=options, expected_stderr=expected_stderr, expected_logs=expected_logs)
+        self.assert_execute_outputs(Upload(), [50000], options=options, expected_logs=expected_logs)
 
     def test_mark_bug_fixed(self):
         tool = MockTool()
@@ -132,8 +132,11 @@ MOCK: user.open_url: http://example.com/50000
         options = Mock()
         options.bug_id = 50000
         options.comment = "MOCK comment"
-        expected_stderr = """MOCK: user.open_url: http://example.com/50000
+        expected_logs = """Bug: <http://example.com/50000> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter.
+Revision: 9876
+MOCK: user.open_url: http://example.com/50000
 Is this correct?
+Adding comment to Bug 50000.
 MOCK bug comment: bug_id=50000, cc=None
 --- Begin comment ---
 MOCK comment
@@ -142,11 +145,7 @@ Committed r9876: <http://trac.webkit.org/changeset/9876>
 --- End comment ---
 
 """
-        expected_logs = """Bug: <http://example.com/50000> Bug with two r+'d and cq+'d patches, one of which has an invalid commit-queue setter.
-Revision: 9876
-Adding comment to Bug 50000.
-"""
-        self.assert_execute_outputs(MarkBugFixed(), [], expected_stderr=expected_stderr, expected_logs=expected_logs, tool=tool, options=options)
+        self.assert_execute_outputs(MarkBugFixed(), [], expected_logs=expected_logs, tool=tool, options=options)
 
     def test_edit_changelog(self):
         self.assert_execute_outputs(EditChangeLogs(), [])
index bdaaf75..a978f41 100644 (file)
@@ -41,11 +41,11 @@ class ApplyWatchListTest(unittest.TestCase):
             'bug_id': '50001',
             'diff': 'The diff',
         }
-        expected_stderr = """MockWatchList: determine_cc_and_messages
+        expected_logs = """MockWatchList: determine_cc_and_messages
 MOCK bug comment: bug_id=50001, cc=set(['levin@chromium.org'])
 --- Begin comment ---
 Message2.
 --- End comment ---
 
 """
-        capture.assert_outputs(self, step.run, [state], expected_stderr=expected_stderr)
+        capture.assert_outputs(self, step.run, [state], expected_logs=expected_logs)
index d139c63..936e3eb 100644 (file)
@@ -50,13 +50,16 @@ class CommitTest(unittest.TestCase):
         }
 
         tool.executive = MockExecutive(should_log=True, should_throw_when_run=False)
-        capture.assert_outputs(self, step.run, [state], expected_logs="Committed r49824: <http://trac.webkit.org/changeset/49824>\n")
+        expected_logs = "Committed r49824: <http://trac.webkit.org/changeset/49824>\n"
+        capture.assert_outputs(self, step.run, [state], expected_logs=expected_logs)
 
         state = {
             "changed_files": ["platform/chromium/" + filename],
         }
-        capture.assert_outputs(self, step.run, [state], expected_stderr="MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--diff-files', 'platform/chromium/"
-            + filename + "'], cwd=/mock-checkout\n", expected_logs="Committed r49824: <http://trac.webkit.org/changeset/49824>\n")
+        expected_logs = """MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--diff-files', 'platform/chromium/%s'], cwd=/mock-checkout
+Committed r49824: <http://trac.webkit.org/changeset/49824>
+""" % filename
+        capture.assert_outputs(self, step.run, [state], expected_logs=expected_logs)
 
         tool.executive = MockExecutive(should_log=True, should_throw_when_run=set(["platform/chromium/" + filename]))
         self.assertRaises(ScriptError, capture.assert_outputs, self, step.run, [state])
index 12117f7..78a867b 100644 (file)
@@ -38,10 +38,9 @@ class RunTestsTest(unittest.TestCase):
         tool._deprecated_port.run_python_unittests_command = lambda: None
         tool._deprecated_port.run_perl_unittests_command = lambda: None
         step = RunTests(tool, MockOptions(test=True, non_interactive=True, quiet=False))
-        expected_stderr = """MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests', '--gtest_output=xml:/mock-results/webkit_unit_tests_output.xml'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--no-new-test-results', '--no-launch-safari', '--skip-failing-tests', '--exit-after-n-failures=30', '--results-directory=/mock-results', '--quiet'], cwd=/mock-checkout
-"""
         expected_logs = """Running WebKit unit tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests', '--gtest_output=xml:/mock-results/webkit_unit_tests_output.xml'], cwd=/mock-checkout
 Running run-webkit-tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--no-new-test-results', '--no-launch-safari', '--skip-failing-tests', '--exit-after-n-failures=30', '--results-directory=/mock-results', '--quiet'], cwd=/mock-checkout
 """
-        OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
index 33b362b..c4ea47b 100644 (file)
@@ -74,26 +74,26 @@ class StepsTest(unittest.TestCase):
         options.open_bug = True
         return options
 
-    def _assert_step_output_with_bug(self, step, bug_id, expected_stderr, options=None):
+    def _assert_step_output_with_bug(self, step, bug_id, expected_logs, options=None):
         state = {'bug_id': bug_id}
-        OutputCapture().assert_outputs(self, self._run_step, [step, MockTool(), options, state], expected_stderr=expected_stderr)
+        OutputCapture().assert_outputs(self, self._run_step, [step, MockTool(), options, state], expected_logs=expected_logs)
 
-    def _assert_post_diff_output_for_bug(self, step, bug_id, expected_stderr):
-        self._assert_step_output_with_bug(step, bug_id, expected_stderr, self._post_diff_options())
+    def _assert_post_diff_output_for_bug(self, step, bug_id, expected_logs):
+        self._assert_step_output_with_bug(step, bug_id, expected_logs, self._post_diff_options())
 
     def test_post_diff(self):
-        expected_stderr = "MOCK add_patch_to_bug: bug_id=78, description=Patch, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False\nMOCK: user.open_url: http://example.com/78\n"
-        self._assert_post_diff_output_for_bug(steps.PostDiff, 78, expected_stderr)
+        expected_logs = "MOCK add_patch_to_bug: bug_id=78, description=Patch, mark_for_review=True, mark_for_commit_queue=False, mark_for_landing=False\nMOCK: user.open_url: http://example.com/78\n"
+        self._assert_post_diff_output_for_bug(steps.PostDiff, 78, expected_logs)
 
     def test_post_diff_for_commit(self):
-        expected_stderr = "MOCK add_patch_to_bug: bug_id=78, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n"
-        self._assert_post_diff_output_for_bug(steps.PostDiffForCommit, 78, expected_stderr)
+        expected_logs = "MOCK add_patch_to_bug: bug_id=78, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n"
+        self._assert_post_diff_output_for_bug(steps.PostDiffForCommit, 78, expected_logs)
 
     def test_ensure_bug_is_open_and_assigned(self):
-        expected_stderr = "MOCK reopen_bug 50004 with comment 'Reopening to attach new patch.'\n"
-        self._assert_step_output_with_bug(steps.EnsureBugIsOpenAndAssigned, 50004, expected_stderr)
-        expected_stderr = "MOCK reassign_bug: bug_id=50002, assignee=None\n"
-        self._assert_step_output_with_bug(steps.EnsureBugIsOpenAndAssigned, 50002, expected_stderr)
+        expected_logs = "MOCK reopen_bug 50004 with comment 'Reopening to attach new patch.'\n"
+        self._assert_step_output_with_bug(steps.EnsureBugIsOpenAndAssigned, 50004, expected_logs)
+        expected_logs = "MOCK reassign_bug: bug_id=50002, assignee=None\n"
+        self._assert_step_output_with_bug(steps.EnsureBugIsOpenAndAssigned, 50002, expected_logs)
 
     def test_runtests_args(self):
         mock_options = self._step_options()
@@ -104,14 +104,13 @@ class StepsTest(unittest.TestCase):
         tool = MockTool(log_executive=True)
         tool.port = lambda: mock_port
         step = steps.RunTests(tool, mock_options)
-        expected_stderr = """MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitperl'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests'], cwd=/mock-checkout
-MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--quiet'], cwd=/mock-checkout
-"""
         expected_logs = """Running Python unit tests
+MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy'], cwd=/mock-checkout
 Running Perl unit tests
+MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitperl'], cwd=/mock-checkout
 Running JavaScriptCore tests
+MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests'], cwd=/mock-checkout
 Running run-webkit-tests
+MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--quiet'], cwd=/mock-checkout
 """
-        OutputCapture().assert_outputs(self, step.run, [{}], expected_stderr=expected_stderr, expected_logs=expected_logs)
+        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
index e995663..42254c8 100644 (file)
@@ -42,5 +42,5 @@ class SuggestReviewersTest(unittest.TestCase):
         capture = OutputCapture()
         step = SuggestReviewers(MockTool(), MockOptions(suggest_reviewers=True, git_commit=None))
         expected_stdout = "The following reviewers have recently modified files in your patch:\nFoo Bar\n"
-        expected_stderr = "Would you like to CC them?\n"
-        capture.assert_outputs(self, step.run, [{"bug_id": "123"}], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
+        expected_logs = "Would you like to CC them?\n"
+        capture.assert_outputs(self, step.run, [{"bug_id": "123"}], expected_stdout=expected_stdout, expected_logs=expected_logs)
index 6799cb4..c3b723e 100644 (file)
@@ -45,9 +45,8 @@ class ValidateChangeLogsTest(unittest.TestCase):
         diff_file.lines = [(start_line, start_line, "foo")]
         expected_stdout = expected_stderr = expected_logs = ""
         if should_fail and not non_interactive:
-            expected_stderr = "OK to continue?\n"
-            expected_logs = "The diff to mock/ChangeLog looks wrong. Are you sure your ChangeLog entry is at the top of the file?\n"
-        result = OutputCapture().assert_outputs(self, step._check_changelog_diff, [diff_file], expected_stderr=expected_stderr, expected_logs=expected_logs)
+            expected_logs = "The diff to mock/ChangeLog looks wrong. Are you sure your ChangeLog entry is at the top of the file?\nOK to continue?\n"
+        result = OutputCapture().assert_outputs(self, step._check_changelog_diff, [diff_file], expected_logs=expected_logs)
         self.assertEqual(not result, should_fail)
 
     def test_check_changelog_diff(self):