The cr-android EWS should actually be building Chromium for Android
authorpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Aug 2012 17:38:18 +0000 (17:38 +0000)
committerpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Aug 2012 17:38:18 +0000 (17:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93489

Reviewed by Adam Barth.

The cr-android EWS bots should be building Chromium for Android, which
requires some additional flags to Chromium's default configuration.

* Scripts/webkitdirs.pm:
(buildChromium):
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(ChromiumAndroidPort):
(ChromiumAndroidPort.update_webkit_command):
(ChromiumAndroidPort.build_webkit_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_chromium_android_port):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(ChromiumAndroidEWS):
* Scripts/webkitpy/tool/steps/update_unittest.py:
(UpdateTest.test_update_command_non_interactive):
(UpdateTest.test_update_command_interactive):

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

Tools/ChangeLog
Tools/Scripts/webkitdirs.pm
Tools/Scripts/webkitpy/common/config/ports.py
Tools/Scripts/webkitpy/common/config/ports_unittest.py
Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
Tools/Scripts/webkitpy/tool/steps/update_unittest.py

index 225e512..2611b72 100644 (file)
@@ -1,3 +1,28 @@
+2012-08-08  Peter Beverloo  <peter@chromium.org>
+
+        The cr-android EWS should actually be building Chromium for Android
+        https://bugs.webkit.org/show_bug.cgi?id=93489
+
+        Reviewed by Adam Barth.
+
+        The cr-android EWS bots should be building Chromium for Android, which
+        requires some additional flags to Chromium's default configuration.
+
+        * Scripts/webkitdirs.pm:
+        (buildChromium):
+        * Scripts/webkitpy/common/config/ports.py:
+        (DeprecatedPort.port):
+        (ChromiumAndroidPort):
+        (ChromiumAndroidPort.update_webkit_command):
+        (ChromiumAndroidPort.build_webkit_command):
+        * Scripts/webkitpy/common/config/ports_unittest.py:
+        (DeprecatedPortTest.test_chromium_android_port):
+        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+        (ChromiumAndroidEWS):
+        * Scripts/webkitpy/tool/steps/update_unittest.py:
+        (UpdateTest.test_update_command_non_interactive):
+        (UpdateTest.test_update_command_interactive):
+
 2012-08-08  Alexey Proskuryakov  <ap@apple.com>
 
         [WK2] MiniBrowser crashes on window.open()
 2012-08-08  Alexey Proskuryakov  <ap@apple.com>
 
         [WK2] MiniBrowser crashes on window.open()
index cc16e38..075eef6 100755 (executable)
@@ -2579,7 +2579,9 @@ sub buildChromium($@)
 
     # We might need to update DEPS or re-run GYP if things have changed.
     if (checkForArgumentAndRemoveFromArrayRef("--update-chromium", \@options)) {
 
     # We might need to update DEPS or re-run GYP if things have changed.
     if (checkForArgumentAndRemoveFromArrayRef("--update-chromium", \@options)) {
-        system("perl", "Tools/Scripts/update-webkit-chromium", "--force") == 0 or die $!;
+        my @updateCommand = ("perl", "Tools/Scripts/update-webkit-chromium", "--force");
+        push @updateCommand, "--chromium-android" if isChromiumAndroid();
+        system(@updateCommand) == 0 or die $!;
     }
 
     my $result = 1;
     }
 
     my $result = 1;
index c086238..1d76b42 100644 (file)
@@ -59,6 +59,7 @@ class DeprecatedPort(object):
     def port(port_name):
         ports = {
             "chromium": ChromiumPort,
     def port(port_name):
         ports = {
             "chromium": ChromiumPort,
+            "chromium-android": ChromiumAndroidPort,
             "chromium-xvfb": ChromiumXVFBPort,
             "gtk": GtkPort,
             "mac": MacPort,
             "chromium-xvfb": ChromiumXVFBPort,
             "gtk": GtkPort,
             "mac": MacPort,
@@ -193,6 +194,20 @@ class ChromiumPort(DeprecatedPort):
         return None
 
 
         return None
 
 
+class ChromiumAndroidPort(ChromiumPort):
+    port_flag_name = "chromium-android"
+
+    def update_webkit_command(self, non_interactive=False):
+        command = super(ChromiumAndroidPort, self).update_webkit_command(non_interactive=non_interactive)
+        command.append("--chromium-android")
+        return command
+
+    def build_webkit_command(self, build_style=None):
+        command = super(ChromiumAndroidPort, self).build_webkit_command(build_style=build_style)
+        command.append("--chromium-android")
+        return command
+
+
 class ChromiumXVFBPort(ChromiumPort):
     port_flag_name = "chromium-xvfb"
 
 class ChromiumXVFBPort(ChromiumPort):
     port_flag_name = "chromium-xvfb"
 
index e0b77c8..df5bf73 100644 (file)
@@ -59,6 +59,10 @@ class DeprecatedPortTest(unittest.TestCase):
         self.assertEquals(ChromiumPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--chromium", "--update-chromium"])
         self.assertEquals(ChromiumPort().update_webkit_command(), DeprecatedPort().script_shell_command("update-webkit") + ["--chromium"])
 
         self.assertEquals(ChromiumPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--chromium", "--update-chromium"])
         self.assertEquals(ChromiumPort().update_webkit_command(), DeprecatedPort().script_shell_command("update-webkit") + ["--chromium"])
 
+    def test_chromium_android_port(self):
+        self.assertEquals(ChromiumAndroidPort().build_webkit_command(), ChromiumPort().build_webkit_command() + ["--chromium-android"])
+        self.assertEquals(ChromiumAndroidPort().update_webkit_command(), ChromiumPort().update_webkit_command() + ["--chromium-android"])
+
     def test_chromium_xvfb_port(self):
         self.assertEquals(ChromiumXVFBPort().run_webkit_tests_command(), ['xvfb-run'] + DeprecatedPort().script_shell_command('new-run-webkit-tests') + ['--chromium', '--skip-failing-tests'])
 
     def test_chromium_xvfb_port(self):
         self.assertEquals(ChromiumXVFBPort().run_webkit_tests_command(), ['xvfb-run'] + DeprecatedPort().script_shell_command('new-run-webkit-tests') + ['--chromium', '--skip-failing-tests'])
 
index 6c18b8a..c5875b6 100644 (file)
@@ -194,6 +194,7 @@ class ChromiumWindowsEWS(AbstractChromiumEWS):
 
 class ChromiumAndroidEWS(AbstractChromiumEWS):
     name = "cr-android-ews"
 
 class ChromiumAndroidEWS(AbstractChromiumEWS):
     name = "cr-android-ews"
+    port_name = "chromium-android"
     watchers = AbstractChromiumEWS.watchers + [
         "peter+ews@chromium.org",
     ]
     watchers = AbstractChromiumEWS.watchers + [
         "peter+ews@chromium.org",
     ]
index 19ef949..c1a934d 100644 (file)
@@ -28,7 +28,7 @@
 
 import unittest
 
 
 import unittest
 
-from webkitpy.common.config.ports import ChromiumPort, ChromiumXVFBPort
+from webkitpy.common.config.ports import ChromiumPort, ChromiumAndroidPort, ChromiumXVFBPort
 from webkitpy.tool.mocktool import MockOptions, MockTool
 from webkitpy.tool.steps.update import Update
 
 from webkitpy.tool.mocktool import MockOptions, MockTool
 from webkitpy.tool.steps.update import Update
 
@@ -47,6 +47,9 @@ class UpdateTest(unittest.TestCase):
         tool._deprecated_port = ChromiumXVFBPort()
         self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--force-update"], step._update_command())
 
         tool._deprecated_port = ChromiumXVFBPort()
         self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--force-update"], step._update_command())
 
+        tool._deprecated_port = ChromiumAndroidPort()
+        self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--force-update", "--chromium-android"], step._update_command())
+
     def test_update_command_interactive(self):
         tool = MockTool()
         options = MockOptions(non_interactive=False)
     def test_update_command_interactive(self):
         tool = MockTool()
         options = MockOptions(non_interactive=False)
@@ -58,3 +61,6 @@ class UpdateTest(unittest.TestCase):
 
         tool._deprecated_port = ChromiumXVFBPort()
         self.assertEqual(["Tools/Scripts/update-webkit", "--chromium"], step._update_command())
 
         tool._deprecated_port = ChromiumXVFBPort()
         self.assertEqual(["Tools/Scripts/update-webkit", "--chromium"], step._update_command())
+
+        tool._deprecated_port = ChromiumAndroidPort()
+        self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--chromium-android"], step._update_command())