Unreviewed, rolling out r106302.
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2012 21:46:09 +0000 (21:46 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jan 2012 21:46:09 +0000 (21:46 +0000)
http://trac.webkit.org/changeset/106302
https://bugs.webkit.org/show_bug.cgi?id=77472

Broke building DRT before running the tests (Requested by ojan
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-01-31

* Scripts/webkit-build-directory:
* Scripts/webkitpy/layout_tests/port/config.py:
(Config.build_directory):
* Scripts/webkitpy/layout_tests/port/config_standalone.py:
(main):
* Scripts/webkitpy/layout_tests/port/config_unittest.py:
(ConfigTest.assert_configuration):
(ConfigTest.test_build_directory.mock_webkit_build_directory):
(ConfigTest.test_build_directory):
(ConfigTest.test_default_configuration__notfound):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort._build_path):

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

Tools/ChangeLog
Tools/Scripts/webkit-build-directory
Tools/Scripts/webkitpy/layout_tests/port/config.py
Tools/Scripts/webkitpy/layout_tests/port/config_standalone.py
Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/webkit.py

index 9e8e74f16501d067e1718c35da195a1d10474fda..0a50adc9787114c4514cd68194dc77322b2212e4 100644 (file)
@@ -1,3 +1,25 @@
+2012-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r106302.
+        http://trac.webkit.org/changeset/106302
+        https://bugs.webkit.org/show_bug.cgi?id=77472
+
+        Broke building DRT before running the tests (Requested by ojan
+        on #webkit).
+
+        * Scripts/webkit-build-directory:
+        * Scripts/webkitpy/layout_tests/port/config.py:
+        (Config.build_directory):
+        * Scripts/webkitpy/layout_tests/port/config_standalone.py:
+        (main):
+        * Scripts/webkitpy/layout_tests/port/config_unittest.py:
+        (ConfigTest.assert_configuration):
+        (ConfigTest.test_build_directory.mock_webkit_build_directory):
+        (ConfigTest.test_build_directory):
+        (ConfigTest.test_default_configuration__notfound):
+        * Scripts/webkitpy/layout_tests/port/webkit.py:
+        (WebKitPort._build_path):
+
 2012-01-31  Antoine Labour  <piman@chromium.org>
 
         Merge WebGraphicsContext3D creation and initialization, and move it to
index dab1d6622fff7f52d79d3d280dc77aee19664852..bf7d66dbfb962c2d61320cdf7c70f63b8059c7e5 100755 (executable)
@@ -57,15 +57,12 @@ my $getOptionsResult = GetOptions(
     'help|h' => \$showHelp,
 );
 
-if (!$getOptionsResult || $showHelp) {
+if (!$getOptionsResult || $showHelp || (!$showConfigurationDirectory && !$showTopLevelDirectory)) {
     print STDERR $usage;
     exit 1;
 }
 
-if (!$showConfigurationDirectory && !$showTopLevelDirectory) {
-    print baseProductDir() . "\n";
-    print productDir() . "\n";
-} elsif ($showTopLevelDirectory) {
+if ($showTopLevelDirectory) {
     print baseProductDir() . "\n";
 } else {
     print productDir() . "\n";
index 6a1045f12ef29f420a6570453b089016aec07058..c5529072818d302ea3de868b93f7da7b3c865700 100644 (file)
@@ -74,19 +74,12 @@ class Config(object):
             flags = ["--configuration", self.flag_for_configuration(configuration)]
         else:
             configuration = ""
-            flags = []
+            flags = ["--top-level"]
 
         if not self._build_directories.get(configuration):
             args = ["perl", self.script_path("webkit-build-directory")] + flags
-            output = self._executive.run_command(args, cwd=self.webkit_base_dir()).rstrip()
-            parts = output.split("\n")
-            self._build_directories[configuration] = parts[0]
-
-            if len(parts) == 2:
-                default_configuration = parts[1][len(parts[0]):]
-                if default_configuration.startswith("/"):
-                    default_configuration = default_configuration[1:]
-                self._build_directories[default_configuration] = parts[1]
+            self._build_directories[configuration] = (
+                self._executive.run_command(args, cwd=self.webkit_base_dir()).rstrip())
 
         return self._build_directories[configuration]
 
index 5b048314520c899454cfde16e6c9332e2fe2593f..3dec3b91c4562beca91ba50e7c7215b5b42ddcaf 100644 (file)
@@ -57,7 +57,7 @@ def main(argv=None):
         argv = sys.argv
 
     if len(argv) == 3 and argv[1] == '--mock':
-        e = executive_mock.MockExecutive2(output='foo\nfoo/%s' % argv[2])
+        e = executive_mock.MockExecutive2(output='foo')
         fs = filesystem_mock.MockFileSystem({'foo/Configuration': argv[2]})
     else:
         e = executive.Executive()
index 51a779850056901008990a2553277fac17bf1fe4..e557eefe8f1506273c45f9a3c3e52241995f80d7 100644 (file)
@@ -51,21 +51,18 @@ class ConfigTest(unittest.TestCase):
     def assert_configuration(self, contents, expected):
         # This tests that a configuration file containing
         # _contents_ ends up being interpreted as _expected_.
-        output = 'foo\nfoo/%s' % contents
-        c = self.make_config(output, {'foo/Configuration': contents})
+        c = self.make_config('foo', {'foo/Configuration': contents})
         self.assertEqual(c.default_configuration(), expected)
 
     def test_build_directory(self):
         # --top-level
         def mock_webkit_build_directory(arg_list):
             if arg_list == ['--top-level']:
-                return '/WebKitBuild/'
+                return '/WebKitBuild'
             elif arg_list == ['--configuration', '--debug']:
                 return '/WebKitBuild/Debug'
             elif arg_list == ['--configuration', '--release']:
                 return '/WebKitBuild/Release'
-            elif arg_list == []:
-                return '/WebKitBuild/\n/WebKitBuild//Debug\n'
             return 'Error'
 
         def mock_run_command(arg_list):
@@ -74,10 +71,10 @@ class ConfigTest(unittest.TestCase):
             return 'Error'
 
         c = self.make_config(run_command_fn=mock_run_command)
-        self.assertEqual(c.build_directory(None), '/WebKitBuild/')
+        self.assertTrue(c.build_directory(None).endswith('WebKitBuild'))
 
         # Test again to check caching
-        self.assertEqual(c.build_directory(None), '/WebKitBuild/')
+        self.assertTrue(c.build_directory(None).endswith('WebKitBuild'))
 
         # Test other values
         self.assertTrue(c.build_directory('Release').endswith('/Release'))
@@ -98,7 +95,7 @@ class ConfigTest(unittest.TestCase):
 
     def test_default_configuration__notfound(self):
         # This tests what happens if the default configuration file doesn't exist.
-        c = self.make_config(output='foo\nfoo/Release', files={'foo/Configuration': None})
+        c = self.make_config(output='foo', files={'foo/Configuration': None})
         self.assertEqual(c.default_configuration(), "Release")
 
     def test_default_configuration__unknown(self):
index 7918066525f1d380c8afbfdb878a8ae376f6140a..41a152d6f0718a8ba5bbaf465809c37c00b86f6a 100644 (file)
@@ -380,9 +380,6 @@ class WebKitPort(Port):
         build_directory = self.get_option('root')
         if not build_directory:
             build_directory = self._config.build_directory(self.get_option('configuration'))
-            # Set --root here Since this modifies the options object used by the worker subprocesses,
-            # it avoids the slow call out to build_directory in each subprocess.
-            self.set_option_default('root', build_directory)
         return self._filesystem.join(build_directory, *comps)
 
     def _path_to_driver(self):