Diff
Modified: trunk/Tools/ChangeLog (273762 => 273763)
--- trunk/Tools/ChangeLog 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/ChangeLog 2021-03-02 23:06:14 UTC (rev 273763)
@@ -1,3 +1,37 @@
+2021-03-02 Sam Sneddon <[email protected]>
+
+ Remove the ability to run tests via webkit-patch
+ https://bugs.webkit.org/show_bug.cgi?id=222617
+
+ Reviewed by Jonathan Bedard.
+
+ Also removes the build-and-test and build-and-test-attachment commands, as these are now
+ equivalent to build and build-attachment with --test support gone.
+
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader.py: Unused import
+ * Scripts/webkitpy/tool/commands/download.py:
+ (BuildAndTest):
+ (Land):
+ (LandCowhand):
+ (BuildAndTestAttachment):
+ (AbstractPatchLandingCommand):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ (test_build_and_test):
+ (test_land):
+ (test_land_red_builders):
+ (test_land_no_close):
+ (test_land_no_comment):
+ (test_land_no_comment_no_close):
+ * Scripts/webkitpy/tool/steps/__init__.py:
+ * Scripts/webkitpy/tool/steps/runtests.py: Removed.
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py: Removed.
+ * Scripts/webkitpy/tool/steps/steps_unittest.py:
+ (StepsTest.test_runtests_args):
+ (StepsTest.test_runtests_debug_args):
+ (StepsTest.test_runtests_jsc):
+ (StepsTest.test_runtests_jsc_debug):
+
+
2021-03-02 Jonathan Bedard <[email protected]>
[run-webkit-tests] Use webkitscmpy when reporting results
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py (273762 => 273763)
--- trunk/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py 2021-03-02 23:06:14 UTC (rev 273763)
@@ -31,7 +31,6 @@
from webkitpy.common.net.layouttestresults import LayoutTestResults
from webkitpy.common.net.unittestresults import UnitTestResults
from webkitpy.tool.bot.abstracttestresultsreader import AbstractTestResultsReader
-from webkitpy.tool.steps.runtests import RunTests
_log = logging.getLogger(__name__)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download.py (273762 => 273763)
--- trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2021-03-02 23:06:14 UTC (rev 273763)
@@ -81,18 +81,6 @@
@DeprecatedCommand
-class BuildAndTest(AbstractSequencedCommand):
- name = "build-and-test"
- help_text = "Update working copy, build, and run the tests"
- steps = [
- steps.DiscardLocalChanges,
- steps.Update,
- steps.Build,
- steps.RunTests,
- ]
-
-
-@DeprecatedCommand
class CheckPatchRelevance(AbstractSequencedCommand):
name = "check-patch-relevance"
help_text = "Check if this patch needs to be tested"
@@ -112,7 +100,6 @@
steps.ValidateReviewer,
steps.ValidateChangeLogs, # We do this after UpdateChangeLogsWithReviewer to avoid not having to cache the diff twice.
steps.Build,
- steps.RunTests,
steps.Commit,
steps.CloseBugForLandDiff,
]
@@ -140,7 +127,6 @@
steps.CheckStyle,
steps.ConfirmDiff,
steps.Build,
- steps.RunTests,
steps.Commit,
steps.CloseBugForLandDiff,
]
@@ -286,20 +272,6 @@
]
-@DeprecatedCommand
-class BuildAndTestAttachment(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
- name = "build-and-test-attachment"
- help_text = "Apply, build, and test patches from bugzilla"
- argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
- main_steps = [
- steps.DiscardLocalChanges,
- steps.Update,
- steps.ApplyPatch,
- steps.Build,
- steps.RunTests,
- ]
-
-
class AbstractPatchApplyingCommand(AbstractPatchSequencingCommand):
prepare_steps = [
steps.EnsureLocalCommitIfNeeded,
@@ -350,7 +322,6 @@
steps.ValidateChangeLogs,
steps.ValidateReviewer,
steps.Build,
- steps.RunTests,
steps.Commit,
steps.ClosePatch,
steps.CloseBug,
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (273762 => 273763)
--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py 2021-03-02 23:06:14 UTC (rev 273763)
@@ -118,16 +118,6 @@
expected_logs = "Updating working directory\nBuilding WebKit\n"
self.assert_execute_outputs(Build(), [], options=self._default_options(), expected_logs=expected_logs)
- def test_build_and_test(self):
- expected_logs = """Updating working directory
-Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
-"""
- self.assert_execute_outputs(BuildAndTest(), [], options=self._default_options(), expected_logs=expected_logs)
-
def test_apply_attachment(self):
options = self._default_options()
options.update = True
@@ -161,10 +151,6 @@
def test_land(self):
expected_logs = """Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Adding comment and closing bug 50000
"""
@@ -185,14 +171,6 @@
Was that diff correct?
Building WebKit
MOCK run_and_throw_if_fail: ['mock-build-webkit', 'ARCHS=MOCK ARCH'], cwd=/mock-checkout, env={'MOCK_ENVIRON_COPY': '1', 'TERM': 'dumb'}
-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 _javascript_Core tests
-MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
-Running run-webkit-tests
-MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--quiet'], cwd=/mock-checkout
Committed r49824: <https://commits.webkit.org/r49824>
Committed r49824 (5@main): <https://commits.webkit.org/5@main>
No bug id provided.
@@ -206,10 +184,6 @@
def test_land_red_builders(self):
expected_logs = """Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Adding comment and closing bug 50000
"""
@@ -237,10 +211,6 @@
Updating working directory
Processing patch 10000 from bug 50000.
Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
"""
@@ -254,19 +224,11 @@
Updating working directory
Processing patch 10000 from bug 50000.
Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
Updating working directory
Processing patch 10001 from bug 50000.
Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
"""
@@ -280,19 +242,11 @@
Updating working directory
Processing patch 10000 from bug 50000.
Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
Updating working directory
Processing patch 10001 from bug 50000.
Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Not closing bug 50000 as attachment 10000 has review=+. Assuming there are more patches to land from this bug.
"""
@@ -301,10 +255,6 @@
def test_land_no_comment(self):
expected_logs = """Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Not updating bug 50000
"""
@@ -315,10 +265,6 @@
def test_land_no_close(self):
expected_logs = """Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Commenting without closing bug 50000
MOCK bug comment: bug_id=50000, cc=None, see_also=None
@@ -334,10 +280,6 @@
def test_land_no_comment_no_close(self):
expected_logs = """Building WebKit
-Running Python unit tests
-Running Perl unit tests
-Running _javascript_Core tests
-Running run-webkit-tests
Committed r49824: <https://commits.webkit.org/r49824>
Not updating bug 50000
"""
Modified: trunk/Tools/Scripts/webkitpy/tool/steps/__init__.py (273762 => 273763)
--- trunk/Tools/Scripts/webkitpy/tool/steps/__init__.py 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/__init__.py 2021-03-02 23:06:14 UTC (rev 273763)
@@ -59,7 +59,6 @@
from webkitpy.tool.steps.promptforbugortitle import PromptForBugOrTitle
from webkitpy.tool.steps.reopenbugafterrevert import ReopenBugAfterRevert
from webkitpy.tool.steps.revertrevision import RevertRevision
-from webkitpy.tool.steps.runtests import RunTests
from webkitpy.tool.steps.sortxcodeprojectfiles import SortXcodeProjectFiles
from webkitpy.tool.steps.submittoews import SubmitToEWS
from webkitpy.tool.steps.suggestreviewers import SuggestReviewers
Deleted: trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py (273762 => 273763)
--- trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py 2021-03-02 23:06:14 UTC (rev 273763)
@@ -1,151 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-# Copyright (C) 2017 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (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 optparse
-import os
-import platform
-import re
-import sys
-from webkitpy.tool.steps.abstractstep import AbstractStep
-from webkitpy.tool.steps.options import Options
-from webkitpy.common.system.executive import ScriptError, Executive
-from webkitpy.common.host import Host
-from webkitpy.layout_tests.controllers.layout_test_finder import LayoutTestFinder
-
-_log = logging.getLogger(__name__)
-
-
-class RunTests(AbstractStep):
- # FIXME: This knowledge really belongs in the commit-queue.
- NON_INTERACTIVE_FAILURE_LIMIT_COUNT = 30
-
- @classmethod
- def options(cls):
- return AbstractStep.options() + [
- Options.build_style,
- Options.test,
- Options.iterate_on_new_tests,
- Options.non_interactive,
- Options.quiet,
- Options.group,
- ]
-
- def run(self, state):
- if (
- self._options.group == "jsc"
- or self._options.iterate_on_new_tests
- or self._options.test
- ):
- _log.warning(
- "Running tests through webkit-patch is currently deprecated due to believed "
- "non-use; if it forms part of your workflow, please comment on "
- "https://bugs.webkit.org/show_bug.cgi?id=221991 and please include the "
- "command you ran, even if others have already mentioned it"
- )
-
- if self._options.group == "jsc":
- self._run_javascriptcore_tests()
- return
-
- if self._options.iterate_on_new_tests:
- _log.info("Running run-webkit-tests on new tests")
- self._run_webkit_tests(self._options.iterate_on_new_tests)
-
- if not self._options.test:
- return
-
- if not self._options.non_interactive:
- python_unittests_command = self._tool.deprecated_port().run_python_unittests_command()
- if python_unittests_command:
- _log.info("Running Python unit tests")
- self._tool.executive.run_and_throw_if_fail(python_unittests_command, cwd=self._tool.scm().checkout_root)
-
- perl_unittests_command = self._tool.deprecated_port().run_perl_unittests_command()
- if perl_unittests_command:
- _log.info("Running Perl unit tests")
- self._tool.executive.run_and_throw_if_fail(perl_unittests_command, cwd=self._tool.scm().checkout_root)
-
- _javascript_core_tests_command = self._tool.deprecated_port().run_javascriptcore_tests_command()
- if _javascript_core_tests_command:
- _log.info("Running _javascript_Core tests")
- self._tool.executive.run_and_throw_if_fail(_javascript_core_tests_command, quiet=True, cwd=self._tool.scm().checkout_root)
-
- _log.info("Running run-webkit-tests")
- self._run_webkit_tests()
-
- def _new_or_modified_tests(self):
- touched_files = self._tool.scm().changed_files()
- touched_files.extend(self._tool.scm().untracked_files())
- if not touched_files:
- return None
-
- configuration = "Debug" if (self._options.build_style == "debug") else "Release"
- port = Host().port_factory.get(self._tool.deprecated_port().port_flag_name, optparse.Values({'configuration': configuration}))
- return LayoutTestFinder(port, optparse.Values({'skipped': 'always', 'skip_failing_tests': False, 'http': True})).find_touched_tests(touched_files)
-
- def _run_webkit_tests(self, iterate_on_new_tests=0):
- args = self._tool.deprecated_port().run_webkit_tests_command(build_style=self._options.build_style)
- if self._options.non_interactive:
- args.extend([
- "--no-new-test-results",
- "--no-show-results",
- "--exit-after-n-failures=%s" % self.NON_INTERACTIVE_FAILURE_LIMIT_COUNT,
- ])
-
- # old-run-webkit-tests does not support --skip-failing-tests
- # Using --quiet one Windows fails when we try to use /dev/null, disabling for now until we find a fix
- if sys.platform != "cygwin":
- args.append("--quiet")
- args.append("--skip-failing-tests")
- else:
- args.append("--no-build")
-
- if self._options.quiet:
- args.append("--quiet")
-
- if iterate_on_new_tests:
- new_tests = self._new_or_modified_tests()
- if not new_tests:
- _log.info("No new or modified tests")
- return
- _log.info("Touched tests are: " + str(new_tests))
- for test in new_tests:
- args.append(test)
- args.append("--iterations=%d" % iterate_on_new_tests)
-
- self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
-
- def _run_javascriptcore_tests(self):
- args = self._tool.deprecated_port().run_javascriptcore_tests_command(self._options.build_style)
-
- results_directory = self._tool.port_factory.get(options=self._options).jsc_results_directory()
- results_file_path = self._tool.filesystem.join(results_directory, "jsc_test_results.json")
- args.append("--json-output=%s" % results_file_path)
- self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
Deleted: trunk/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py (273762 => 273763)
--- trunk/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py 2021-03-02 23:06:14 UTC (rev 273763)
@@ -1,66 +0,0 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
-# Copyright (C) 2020 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (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 platform
-import sys
-import unittest
-
-from webkitpy.tool.mocktool import MockOptions, MockTool
-from webkitpy.tool.steps.runtests import RunTests
-
-from webkitcorepy import OutputCapture
-
-
-class RunTestsTest(unittest.TestCase):
- def test_webkit_run_unit_tests(self):
- tool = MockTool(log_executive=True)
- 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, build_style="release", iterate_on_new_tests=0, group=None))
-
- with OutputCapture(level=logging.INFO) as captured:
- step.run({})
-
- if sys.platform != "cygwin":
- self.assertEqual(
- captured.root.log.getvalue(),
- '''Running tests through webkit-patch is currently deprecated due to believed non-use; if it forms part of your workflow, please comment on https://bugs.webkit.org/show_bug.cgi?id=221991 and please include the command you ran, even if others have already mentioned it
-Running run-webkit-tests
-MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--no-new-test-results', '--no-show-results', '--exit-after-n-failures=30', '--quiet', '--skip-failing-tests'], cwd=/mock-checkout
-''',
- )
- else:
- self.assertEqual(
- captured.root.log.getvalue(),
- '''Running tests through webkit-patch is currently deprecated due to believed non-use; if it forms part of your workflow, please comment on https://bugs.webkit.org/show_bug.cgi?id=221991 and please include the command you ran, even if others have already mentioned it
-Running run-webkit-tests
-MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--no-new-test-results', '--no-show-results', '--exit-after-n-failures=30', '--no-build'], cwd=/mock-checkout
-''',
- )
Modified: trunk/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py (273762 => 273763)
--- trunk/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py 2021-03-02 22:53:04 UTC (rev 273762)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py 2021-03-02 23:06:14 UTC (rev 273763)
@@ -113,89 +113,6 @@
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()
- mock_options.non_interactive = False
- mock_options.build_style = "release"
- step = steps.RunTests(MockTool(log_executive=True), mock_options)
- tool = MockTool(log_executive=True)
- # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
- tool._deprecated_port = DeprecatedPort()
- step = steps.RunTests(tool, mock_options)
- with OutputCapture(level=logging.INFO) as captured:
- step.run({})
- self.assertEqual(
- captured.root.log.getvalue(),
- '''Running tests through webkit-patch is currently deprecated due to believed non-use; if it forms part of your workflow, please comment on https://bugs.webkit.org/show_bug.cgi?id=221991 and please include the command you ran, even if others have already mentioned it
-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 _javascript_Core tests
-MOCK run_and_throw_if_fail: ['Tools/Scripts/run-_javascript_core-tests', '--no-fail-fast'], cwd=/mock-checkout
-Running run-webkit-tests
-MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--release', '--quiet'], cwd=/mock-checkout
-''',
- )
-
- def test_runtests_debug_args(self):
- mock_options = self._step_options()
- mock_options.non_interactive = False
- mock_options.build_style = "debug"
- step = steps.RunTests(MockTool(log_executive=True), mock_options)
- tool = MockTool(log_executive=True)
- # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
- tool._deprecated_port = DeprecatedPort()
- step = steps.RunTests(tool, mock_options)
- with OutputCapture(level=logging.INFO) as captured:
- step.run({})
- self.assertEqual(
- captured.root.log.getvalue(),
- '''Running tests through webkit-patch is currently deprecated due to believed non-use; if it forms part of your workflow, please comment on https://bugs.webkit.org/show_bug.cgi?id=221991 and please include the command you ran, even if others have already mentioned it
-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 _javascript_Core tests
-MOCK run_and_throw_if_fail: ['Tools/Scripts/run-_javascript_core-tests', '--no-fail-fast'], cwd=/mock-checkout
-Running run-webkit-tests
-MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--debug', '--quiet'], cwd=/mock-checkout
-''',
- )
-
- def test_runtests_jsc(self):
- mock_options = self._step_options()
- mock_options.non_interactive = False
- mock_options.build_style = "release"
- mock_options.group = "jsc"
- step = steps.RunTests(MockTool(log_executive=True), mock_options)
- tool = MockTool(log_executive=True)
- # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
- tool._deprecated_port = DeprecatedPort()
- step = steps.RunTests(tool, mock_options)
- with OutputCapture(level=logging.INFO) as captured:
- step.run({})
- self.assertEqual(
- captured.root.log.getvalue(),
- "Running tests through webkit-patch is currently deprecated due to believed non-use; if it forms part of your workflow, please comment on https://bugs.webkit.org/show_bug.cgi?id=221991 and please include the command you ran, even if others have already mentioned it\nMOCK run_and_throw_if_fail: ['Tools/Scripts/run-_javascript_core-tests', '--no-fail-fast', '--release', '--json-output=/tmp/jsc_test_results.json'], cwd=/mock-checkout\n",
- )
-
- def test_runtests_jsc_debug(self):
- mock_options = self._step_options()
- mock_options.non_interactive = False
- mock_options.build_style = "debug"
- mock_options.group = "jsc"
- tool = MockTool(log_executive=True)
- # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
- tool._deprecated_port = DeprecatedPort()
- step = steps.RunTests(tool, mock_options)
- with OutputCapture(level=logging.INFO) as captured:
- step.run({})
- self.assertEqual(
- captured.root.log.getvalue(),
- "Running tests through webkit-patch is currently deprecated due to believed non-use; if it forms part of your workflow, please comment on https://bugs.webkit.org/show_bug.cgi?id=221991 and please include the command you ran, even if others have already mentioned it\nMOCK run_and_throw_if_fail: ['Tools/Scripts/run-_javascript_core-tests', '--no-fail-fast', '--debug', '--json-output=/tmp/jsc_test_results.json'], cwd=/mock-checkout\n",
- )
-
def test_build_jsc_debug(self):
mock_options = self._step_options()
mock_options.non_interactive = False