2006-10-24 Stephanie Lewis <slewis@apple.com>
authorslewis <slewis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Oct 2006 04:23:13 +0000 (04:23 +0000)
committerslewis <slewis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Oct 2006 04:23:13 +0000 (04:23 +0000)
        Reviewed by Maciej.

        - Changed run-javascriptcore tests to build testkjs before running.

        * Scripts/run-javascriptcore-tests:

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

WebKitTools/ChangeLog
WebKitTools/Scripts/run-javascriptcore-tests

index 79f53c53a6c118058600cf6c0f7c415c77431428..d919296152f088d381811ae1d1095f7b0fa56623 100644 (file)
@@ -1,3 +1,11 @@
+2006-10-24  Stephanie Lewis  <slewis@apple.com>
+
+        Reviewed by Maciej.
+
+        - Changed run-javascriptcore tests to build testkjs before running.
+
+        * Scripts/run-javascriptcore-tests:
+
 2006-10-24  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Maciej.
index 9f34d95ae6d9732b7293d92fb6fc84cf72ef1933..2d4c7014cbf5a9bd9ec8bd4fd7b7a5cffdb662f7 100755 (executable)
@@ -32,22 +32,37 @@ use strict;
 use FindBin;
 use lib $FindBin::Bin;
 use webkitdirs;
+use POSIX;
 
+# determine configuration
+my $configuration;
 setConfiguration();
-my $productDir = productDir();
+$configuration = configuration();
 
+# Find JavaScriptCore directory
 chdirWebKit();
-chdir "JavaScriptCore/tests/mozilla" or die;
+chdir("JavaScriptCore");
+
+#compile TestKJS
+my @options = XcodeOptions();
+my $result;
+if (isOSX()) {
+    $result = system "xcodebuild", "-project", "JavaScriptCore.xcodeproj", "-target", "testkjs", @options, @ARGV;
+}elsif (isCygwin()) {
+    $result = buildVisualStudioProject( "JavaScriptCore" );
+}
+exit WEXITSTATUS($result) if WEXITSTATUS($result);
+
+my $productDir = productDir();
+chdir "tests/mozilla" or die;
 
 $productDir .= "/JavaScriptCore" if (isQt());
 $ENV{DYLD_FRAMEWORK_PATH} = $productDir;
 
 my $testkjsName;
-my $configuration;
 sub determineTestkjsName
 {
     return if $testkjsName;
-    $configuration = configuration();
     if (isCygwin() && ($configuration eq "Debug")) {
         $testkjsName = "testkjs_debug";
     } else {
@@ -56,7 +71,7 @@ sub determineTestkjsName
 }
 $testkjsName = determineTestkjsName();
 
-my $result = system "perl", "jsDriver.pl", "-e", "kjs", "-s", "$productDir/$testkjsName", "-f", "actual.html", @ARGV;
+$result = system "perl", "jsDriver.pl", "-e", "kjs", "-s", "$productDir/$testkjsName", "-f", "actual.html", @ARGV;
 
 exit $result if $result;