Title: [179946] trunk/Tools
Revision
179946
Author
o...@webkit.org
Date
2015-02-11 12:31:24 -0800 (Wed, 11 Feb 2015)

Log Message

Make run-jsc-stress-tests --remote work with make-based runner
https://bugs.webkit.org/show_bug.cgi?id=141079

Reviewed by Darin Adler.

* Scripts/run-_javascript_core-tests:
(runJSCStressTests): Pass through the --shell-runner and --make-runner arguments.
* Scripts/run-jsc-stress-tests: Made the make-based runner the default runner,
except for remote testing on Darwin. Unified runShellTestRunner and runMakeTestRunner
to avoid code duplication.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (179945 => 179946)


--- trunk/Tools/ChangeLog	2015-02-11 20:29:32 UTC (rev 179945)
+++ trunk/Tools/ChangeLog	2015-02-11 20:31:24 UTC (rev 179946)
@@ -1,5 +1,18 @@
 2015-02-11  Csaba Osztrogonác  <o...@webkit.org>
 
+        Make run-jsc-stress-tests --remote work with make-based runner
+        https://bugs.webkit.org/show_bug.cgi?id=141079
+
+        Reviewed by Darin Adler.
+
+        * Scripts/run-_javascript_core-tests:
+        (runJSCStressTests): Pass through the --shell-runner and --make-runner arguments.
+        * Scripts/run-jsc-stress-tests: Made the make-based runner the default runner,
+        except for remote testing on Darwin. Unified runShellTestRunner and runMakeTestRunner
+        to avoid code duplication.
+
+2015-02-11  Csaba Osztrogonác  <o...@webkit.org>
+
         run-jsc-stress tests should detect the number of processors on the remote machine too
         https://bugs.webkit.org/show_bug.cgi?id=141196
 

Modified: trunk/Tools/Scripts/run-_javascript_core-tests (179945 => 179946)


--- trunk/Tools/Scripts/run-_javascript_core-tests	2015-02-11 20:29:32 UTC (rev 179945)
+++ trunk/Tools/Scripts/run-_javascript_core-tests	2015-02-11 20:31:24 UTC (rev 179946)
@@ -48,6 +48,8 @@
 my $extraTests;
 my $jsDriverArgs;
 my $childProcesses;
+my $shellRunner;
+my $makeRunner;
 
 my $buildJSC = 1;
 
@@ -82,6 +84,9 @@
   --remote=                     Run the JSC stress tests on the specified remote host. Implies --tarball.
   --extra-tests=                Path to a file containing extra tests
   --child-processes=            Specify the number of child processes.
+  --shell-runner                Uses the shell-based test runner instead of the default make-based runner.
+                                In general the shell runner is slower than the make runner.
+  --make-runner                 Uses the faster make-based runner.
 
 EOF
 
@@ -96,6 +101,8 @@
     'tarball!' => \$createTarball,
     'remote=s' => \$remoteHost,
     'child-processes=s' => \$childProcesses,
+    'shell-runner' => \$shellRunner,
+    'make-runner' => \$makeRunner,
     'help' => \$showHelp
 );
 
@@ -286,6 +293,14 @@
         push(@jscStressDriverCmd, $childProcesses);
     }
 
+    if ($shellRunner) {
+        push(@jscStressDriverCmd, "--shell-runner");
+    }
+
+    if ($makeRunner) {
+        push(@jscStressDriverCmd, "--make-runner");
+    }
+
     # End option processing, the rest of the arguments are tests
     push(@jscStressDriverCmd, "--");
 

Modified: trunk/Tools/Scripts/run-jsc-stress-tests (179945 => 179946)


--- trunk/Tools/Scripts/run-jsc-stress-tests	2015-02-11 20:29:32 UTC (rev 179945)
+++ trunk/Tools/Scripts/run-jsc-stress-tests	2015-02-11 20:31:24 UTC (rev 179946)
@@ -98,7 +98,7 @@
 $tarball = false
 $tarFileName = "payload.tar.gz"
 $copyVM = false
-$testRunnerType = :make
+$testRunnerType = nil
 $remoteUser = nil
 $remoteHost = nil
 $remotePort = nil
@@ -126,6 +126,7 @@
     puts "                            e.g. darwin, linux & windows."
     puts "--shell-runner              Uses the shell-based test runner instead of the default make-based runner."
     puts "                            In general the shell runner is slower than the make runner."
+    puts "--make-runner               Uses the faster make-based runner."
     puts "--remote                    Specify a remote host on which to run tests."
     puts "--child-processes    (-c)   Specify the number of child processes."
     puts "--help               (-h)   Print this message."
@@ -146,6 +147,7 @@
                ['--arch', GetoptLong::REQUIRED_ARGUMENT],
                ['--os', GetoptLong::REQUIRED_ARGUMENT],
                ['--shell-runner', GetoptLong::NO_ARGUMENT],
+               ['--make-runner', GetoptLong::NO_ARGUMENT],
                ['--remote', GetoptLong::REQUIRED_ARGUMENT],
                ['--child-processes', '-c', GetoptLong::REQUIRED_ARGUMENT],
                ['--verbose', '-v', GetoptLong::NO_ARGUMENT]).each {
@@ -175,9 +177,10 @@
         $copyVM = true
     when '--shell-runner'
         $testRunnerType = :shell
+    when '--make-runner'
+        $testRunnerType = :make
     when '--remote'
         $copyVM = true
-        $testRunnerType = :shell
         $tarball = true
         $remote = true
         uri = URI("ssh://" + arg)
@@ -262,6 +265,14 @@
 $architecture = determineArchitecture unless $architecture
 $hostOS = determineOS unless $hostOS
 
+if !$testRunnerType
+    if $remote and $hostOS == "darwin"
+        $testRunnerType = :shell
+    else
+        $testRunnerType = :make
+    end
+end
+
 $numFailures = 0
 
 BASE_OPTIONS = ["--useFTLJIT=false", "--enableFunctionDotArguments=true"]
@@ -1245,17 +1256,6 @@
     }
 end
 
-def runTestRunner
-    case $testRunnerType
-    when :shell
-        runShellTestRunner
-    when :make
-        runMakeTestRunner
-    else
-        raise "Unknown test runner type: #{$testRunnerType.to_s}"
-    end
-end
-
 def sshRead(cmd)
     raise unless $remote
 
@@ -1367,7 +1367,16 @@
     end
 end
 
-def runShellTestRunner
+def runTestRunner
+    case $testRunnerType
+    when :shell
+        testRunnerCommand = "sh runscript"
+    when :make
+        testRunnerCommand = "make -j #{$numChildProcesses.to_s} -s -f Makefile"
+    else
+        raise "Unknown test runner type: #{$testRunnerType.to_s}"
+    end
+
     if $remote
         $remoteDirectory = JSON::parse(sshRead("cat ~/.bencher"))["tempPath"]
         mysys("ssh", "-p", $remotePort.to_s, "#{$remoteUser}@#{$remoteHost}", "mkdir -p #{$remoteDirectory}")
@@ -1379,22 +1388,15 @@
         remoteScript += "cd #{$outputDir.basename}/.runner && "
         remoteScript += "export DYLD_FRAMEWORK_PATH=\\\"\\$(cd #{$testingFrameworkPath.dirname}; pwd)\\\" && "
         remoteScript += "export JSC_timeout=#{Shellwords.shellescape(ENV['JSC_timeout'])} && "
-        remoteScript += "sh runscript\""
+        remoteScript += "#{testRunnerCommand}\""
         runAndMonitorTestRunnerCommand("ssh", "-p", $remotePort.to_s, "#{$remoteUser}@#{$remoteHost}", remoteScript)
     else
         Dir.chdir($runnerDir) {
-            runAndMonitorTestRunnerCommand("sh", "runscript")
+            runAndMonitorTestRunnerCommand(testRunnerCommand)
         }
     end
 end
 
-def runMakeTestRunner
-    raise if $remote
-    Dir.chdir($runnerDir) {
-        runAndMonitorTestRunnerCommand("make", "-j", $numChildProcesses.to_s, "-s", "-f", "Makefile")
-    }
-end
-
 def detectFailures
     raise if $bundle
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to