run-webkit-tests calls out to webkit-build-directory twice
https://bugs.webkit.org/show_bug.cgi?id=77248

Reviewed by Dirk Pranke.

* Scripts/webkit-build-directory:
If called with no arguments, print out both the top-level directory and the
configuration directory

* Scripts/webkitpy/layout_tests/port/config.py:
(Config.build_directory):
When called with no arguments, get and cache both the top-level and configuration directories.

* 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):
Cache the build directory in the options object so that other users
of the options object don't need to call out to webkit-build-directory.
Also, properly support the existing --build-directory argument.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/Scripts/webkit-build-directory b/Tools/Scripts/webkit-build-directory
index bf7d66d..dab1d66 100755
--- a/Tools/Scripts/webkit-build-directory
+++ b/Tools/Scripts/webkit-build-directory
@@ -57,12 +57,15 @@
     'help|h' => \$showHelp,
 );
 
-if (!$getOptionsResult || $showHelp || (!$showConfigurationDirectory && !$showTopLevelDirectory)) {
+if (!$getOptionsResult || $showHelp) {
     print STDERR $usage;
     exit 1;
 }
 
-if ($showTopLevelDirectory) {
+if (!$showConfigurationDirectory && !$showTopLevelDirectory) {
+    print baseProductDir() . "\n";
+    print productDir() . "\n";
+} elsif ($showTopLevelDirectory) {
     print baseProductDir() . "\n";
 } else {
     print productDir() . "\n";