Build fix for mac-debug EWS queue.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Oct 2015 04:54:37 +0000 (04:54 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Oct 2015 04:54:37 +0000 (04:54 +0000)
Unreviewed.

Pass --debug to run-webkit-tests.

While at it, removed unsupported run_webkit_unit_tests_command. All the test steps
will need to be substantially modified to work in EWS, so the dummy implementation
was not helpful.

* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.run_javascriptcore_tests_command):
(DeprecatedPort):
(DeprecatedPort.run_webkit_tests_command):
(DeprecatedPort.run_python_unittests_command):
(DeprecatedPort.run_webkit_unit_tests_command): Deleted.
* Scripts/webkitpy/common/config/ports_mock.py:
(MockPort.run_javascriptcore_tests_command):
(MockPort):
(MockPort.run_webkit_tests_command):
(MockPort.run_bindings_tests_command):
(MockPort.run_webkit_unit_tests_command): Deleted.
* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run):
* Scripts/webkitpy/tool/steps/runtests_unittest.py:
(RunTestsTest.test_webkit_run_unit_tests):
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest.test_runtests_args):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/common/config/ports.py
Tools/Scripts/webkitpy/common/config/ports_mock.py
Tools/Scripts/webkitpy/tool/commands/download_unittest.py
Tools/Scripts/webkitpy/tool/steps/runtests.py
Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
Tools/Scripts/webkitpy/tool/steps/steps_unittest.py

index 97fd3e2..bc6d1c3 100644 (file)
@@ -1,3 +1,35 @@
+2015-10-13  Alexey Proskuryakov  <ap@apple.com>
+
+        Build fix for mac-debug EWS queue.
+
+        Unreviewed.
+
+        Pass --debug to run-webkit-tests.
+
+        While at it, removed unsupported run_webkit_unit_tests_command. All the test steps
+        will need to be substantially modified to work in EWS, so the dummy implementation
+        was not helpful.
+
+        * Scripts/webkitpy/common/config/ports.py:
+        (DeprecatedPort.run_javascriptcore_tests_command):
+        (DeprecatedPort):
+        (DeprecatedPort.run_webkit_tests_command):
+        (DeprecatedPort.run_python_unittests_command):
+        (DeprecatedPort.run_webkit_unit_tests_command): Deleted.
+        * Scripts/webkitpy/common/config/ports_mock.py:
+        (MockPort.run_javascriptcore_tests_command):
+        (MockPort):
+        (MockPort.run_webkit_tests_command):
+        (MockPort.run_bindings_tests_command):
+        (MockPort.run_webkit_unit_tests_command): Deleted.
+        * Scripts/webkitpy/tool/commands/download_unittest.py:
+        * Scripts/webkitpy/tool/steps/runtests.py:
+        (RunTests.run):
+        * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+        (RunTestsTest.test_webkit_run_unit_tests):
+        * Scripts/webkitpy/tool/steps/steps_unittest.py:
+        (StepsTest.test_runtests_args):
+
 2015-10-13  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Generate Crash Traces
index 39417de..c621089 100644 (file)
@@ -104,11 +104,13 @@ class DeprecatedPort(object):
     def run_javascriptcore_tests_command(self):
         return self.script_shell_command("run-javascriptcore-tests")
 
-    def run_webkit_unit_tests_command(self):
-        return None
-
-    def run_webkit_tests_command(self):
-        return self.script_shell_command("run-webkit-tests")
+    def run_webkit_tests_command(self, build_style=None):
+        command = self.script_shell_command("run-webkit-tests")
+        if build_style == "debug":
+            command.append("--debug")
+        if build_style == "release":
+            command.append("--release")
+        return command
 
     def run_python_unittests_command(self):
         return self.script_shell_command("test-webkitpy")
index 779796c..61743de 100644 (file)
@@ -52,10 +52,7 @@ class MockPort(object):
     def run_javascriptcore_tests_command(self):
         return ['mock-run-javacriptcore-tests']
 
-    def run_webkit_unit_tests_command(self):
-        return ['mock-run-webkit-unit-tests']
-
-    def run_webkit_tests_command(self):
+    def run_webkit_tests_command(self, build_style=None):
         return ['mock-run-webkit-tests']
 
     def run_bindings_tests_command(self):
index 6c8cd54..f394db0 100644 (file)
@@ -76,7 +76,7 @@ class DownloadCommandsTest(CommandsTest):
     def _default_options(self):
         options = MockOptions()
         options.build = True
-        options.build_style = True
+        options.build_style = "release"
         options.check_style = True
         options.check_style_filter = None
         options.clean = True
@@ -101,7 +101,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 """
         self.assert_execute_outputs(BuildAndTest(), [], options=self._default_options(), expected_logs=expected_logs)
@@ -143,7 +142,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Updating bug 50000
@@ -172,8 +170,6 @@ Running JavaScriptCore tests
 MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
 Running bindings generation tests
 MOCK run_and_throw_if_fail: ['mock-run-bindings-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>
@@ -192,7 +188,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Updating bug 50000
@@ -224,7 +219,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
@@ -242,7 +236,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
@@ -253,7 +246,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
@@ -271,7 +263,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
@@ -282,7 +273,6 @@ Running Python unit tests
 Running Perl unit tests
 Running JavaScriptCore tests
 Running bindings generation tests
-Running WebKit unit tests
 Running run-webkit-tests
 Committed r49824: <http://trac.webkit.org/changeset/49824>
 Not closing bug 50000 as attachment 10000 has review=+.  Assuming there are more patches to land from this bug.
index ecd6351..dddf81e 100644 (file)
@@ -89,18 +89,8 @@ class RunTests(AbstractStep):
             except ScriptError, e:
                 _log.info("Error running run-bindings-tests: %s" % e.message_with_output())
 
-        webkit_unit_tests_command = self._tool.deprecated_port().run_webkit_unit_tests_command()
-        if webkit_unit_tests_command:
-            _log.info("Running WebKit unit tests")
-            args = webkit_unit_tests_command
-            try:
-                self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
-            except ScriptError, e:
-                _log.info("Error running webkit_unit_tests: %s" % e.message_with_output())
-
-
         _log.info("Running run-webkit-tests")
-        args = self._tool.deprecated_port().run_webkit_tests_command()
+        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",
index 2a7ec9e..44982e2 100644 (file)
@@ -39,21 +39,17 @@ class RunTestsTest(unittest.TestCase):
         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))
+        step = RunTests(tool, MockOptions(test=True, non_interactive=True, quiet=False, build_style="release"))
 
         if sys.platform != "cygwin":
             expected_logs = """Running bindings generation tests
 MOCK run_and_throw_if_fail: ['mock-run-bindings-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', '--no-new-test-results', '--no-show-results', '--exit-after-n-failures=30', '--quiet', '--skip-failing-tests'], cwd=/mock-checkout
 """
         else:
             expected_logs = """Running bindings generation tests
 MOCK run_and_throw_if_fail: ['mock-run-bindings-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', '--no-new-test-results', '--no-show-results', '--exit-after-n-failures=30', '--no-build'], cwd=/mock-checkout
 """
index b1e2bf1..340dcae 100644 (file)
@@ -98,6 +98,7 @@ class StepsTest(unittest.TestCase):
     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.
@@ -112,6 +113,28 @@ MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests'], cwd=/moc
 Running bindings generation tests
 MOCK run_and_throw_if_fail: ['Tools/Scripts/run-bindings-tests'], cwd=/mock-checkout
 Running run-webkit-tests
-MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--quiet'], cwd=/mock-checkout
+MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--release', '--quiet'], cwd=/mock-checkout
+"""
+        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
+
+    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)
+        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 bindings generation tests
+MOCK run_and_throw_if_fail: ['Tools/Scripts/run-bindings-tests'], cwd=/mock-checkout
+Running run-webkit-tests
+MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--debug', '--quiet'], cwd=/mock-checkout
 """
         OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)