2011-01-18 Dirk Pranke <dpranke@chromium.org>
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 05:15:10 +0000 (05:15 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jan 2011 05:15:10 +0000 (05:15 +0000)
        Reviewed by Tony Chang.

        new-run-webkit-tests: add a --build-directory command line argument

        Official Google Chrome builds use a non-standard build directory
        location. This patch adds a --build-directory argument that
        allows that location to be specified on the command line. Only
        Chromium-based builds will use this flag for now, but anyone can
        in the future.

        There are no unit tests for this since it's difficult to test
        until mock filesystems are fully supported in the code. This was
        tested by hand for now.

        https://bugs.webkit.org/show_bug.cgi?id=52694

        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

index 482c44673f720df3b55c90b65e854f3b3ad9f26e..57fecce62bdbeba288dac88ca0b99714100f7035 100644 (file)
@@ -1,3 +1,26 @@
+2011-01-18  Dirk Pranke  <dpranke@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        new-run-webkit-tests: add a --build-directory command line argument
+
+        Official Google Chrome builds use a non-standard build directory
+        location. This patch adds a --build-directory argument that
+        allows that location to be specified on the command line. Only
+        Chromium-based builds will use this flag for now, but anyone can
+        in the future.
+
+        There are no unit tests for this since it's difficult to test
+        until mock filesystems are fully supported in the code. This was
+        tested by hand for now.
+
+        https://bugs.webkit.org/show_bug.cgi?id=52694
+
+        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
 2011-01-18  Maciej Stachowiak  <mjs@apple.com>
 
         Not reviewed. Bot fix.
index 5d9dd874a9dfbcfbb1a239aa04caa94cae2600a7..79741b2ec94fd86b4e751247b8394358666e8bf6 100644 (file)
@@ -78,6 +78,10 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
     #
 
     def _build_path(self, *comps):
+        if self.get_option('build_directory'):
+            return self._filesystem.join(self.get_option('build_directory'),
+                                         *comps)
+
         base = self.path_from_chromium_base()
         if os.path.exists(os.path.join(base, 'sconsbuild')):
             return os.path.join(base, 'sconsbuild', *comps)
index 6802707c2f0e98e13fe1160e61ecc4933e13fb4a..b08a948b44946d38f8bc66508804797ea0b8e713 100644 (file)
@@ -105,6 +105,10 @@ class ChromiumMacPort(chromium.ChromiumPort):
     #
 
     def _build_path(self, *comps):
+        if self.get_option('build_directory'):
+            return self._filesystem.join(self.get_option('build_directory'),
+                                         *comps)
+
         path = self.path_from_chromium_base('xcodebuild', *comps)
         if os.path.exists(path) or self.get_option('use_test_shell'):
             return path
index d080f824d013d155671333f826c273c4844d16d9..0fecc6d2d41a7126b66dbbbc6a037df37ebb6d9d 100644 (file)
@@ -106,6 +106,10 @@ class ChromiumWinPort(chromium.ChromiumPort):
     # PROTECTED ROUTINES
     #
     def _build_path(self, *comps):
+        if self.get_option('build_directory'):
+            return self._filesystem.join(self.get_option('build_directory'),
+                                         *comps)
+
         p = self.path_from_chromium_base('webkit', *comps)
         if os.path.exists(p):
             return p
index a141661fe8574f7709b2a675e558ad8df6d08c7b..dcdcfaa33e7f706c39a3662b5167cdfcbf4440d1 100755 (executable)
@@ -277,6 +277,8 @@ def parse_args(args=None):
             default="layout-test-results",
             help="Output results directory source dir, relative to Debug or "
                  "Release"),
+        optparse.make_option("--build-directory",
+            help="Path to the directory under which build files are kept (should not include configuration)"),
         optparse.make_option("--new-baseline", action="store_true",
             default=False, help="Save all generated results as new baselines "
                  "into the platform directory, overwriting whatever's "