Title: [174601] trunk/Tools
Revision
174601
Author
msab...@apple.com
Date
2014-10-10 10:47:52 -0700 (Fri, 10 Oct 2014)

Log Message

Add ability to select tarfile name in run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=137614

Reviewed by Mark Hahnenberg.

Added optional file name argument to the --tarball option.

* Scripts/run-_javascript_core-tests: Added "--" to terminate options so the first
extra test given after the options wont be used for the optional tarball file name.
* Scripts/run-jsc-stress-tests:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (174600 => 174601)


--- trunk/Tools/ChangeLog	2014-10-10 17:42:54 UTC (rev 174600)
+++ trunk/Tools/ChangeLog	2014-10-10 17:47:52 UTC (rev 174601)
@@ -1,3 +1,16 @@
+2014-10-10  Michael Saboff  <msab...@apple.com>
+
+        Add ability to select tarfile name in run-jsc-stress-tests
+        https://bugs.webkit.org/show_bug.cgi?id=137614
+
+        Reviewed by Mark Hahnenberg.
+
+        Added optional file name argument to the --tarball option.  
+
+        * Scripts/run-_javascript_core-tests: Added "--" to terminate options so the first
+        extra test given after the options wont be used for the optional tarball file name.
+        * Scripts/run-jsc-stress-tests:
+
 2014-10-10  Chris Dumez  <cdu...@apple.com>
 
         Unreviewed, update my information in contributors.json

Modified: trunk/Tools/Scripts/run-_javascript_core-tests (174600 => 174601)


--- trunk/Tools/Scripts/run-_javascript_core-tests	2014-10-10 17:42:54 UTC (rev 174600)
+++ trunk/Tools/Scripts/run-_javascript_core-tests	2014-10-10 17:47:52 UTC (rev 174601)
@@ -268,6 +268,10 @@
         push(@jscStressDriverCmd, "--remote");
         push(@jscStressDriverCmd, $remoteHost);
     }
+
+    # End option processing, the rest of the arguments are tests
+    push((@jscStressDriverCmd, "--");
+
     if (defined($extraTests)) {
         push(@jscStressDriverCmd, $extraTests);
     }

Modified: trunk/Tools/Scripts/run-jsc-stress-tests (174600 => 174601)


--- trunk/Tools/Scripts/run-jsc-stress-tests	2014-10-10 17:42:54 UTC (rev 174600)
+++ trunk/Tools/Scripts/run-jsc-stress-tests	2014-10-10 17:47:52 UTC (rev 174601)
@@ -107,6 +107,7 @@
 $verbosity = 0
 $bundle = nil
 $tarball = false
+$tarFileName = "payload.tar.gz"
 $copyVM = false
 $testRunnerType = :make
 $remoteUser = nil
@@ -126,7 +127,7 @@
     puts "--output-dir         (-o)   Path where to put results. Default is #{$outputDir}."
     puts "--verbose            (-v)   Print more things while running."
     puts "--run-bundle                Runs a bundle previously created by run-jsc-stress-tests."
-    puts "--tarball                   Creates a tarball of the final bundle."
+    puts "--tarball [fileName]        Creates a tarball of the final bundle.  Use name if supplied for tar file."
     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 "--remote                    Specify a remote host on which to run tests."
@@ -144,7 +145,7 @@
                ['--memory-limited', GetoptLong::NO_ARGUMENT],
                ['--output-dir', '-o', GetoptLong::REQUIRED_ARGUMENT],
                ['--run-bundle', GetoptLong::REQUIRED_ARGUMENT],
-               ['--tarball', GetoptLong::NO_ARGUMENT],
+               ['--tarball', GetoptLong::OPTIONAL_ARGUMENT],
                ['--force-vm-copy', GetoptLong::NO_ARGUMENT],
                ['--shell-runner', GetoptLong::NO_ARGUMENT],
                ['--remote', GetoptLong::REQUIRED_ARGUMENT],
@@ -171,6 +172,7 @@
     when '--tarball'
         $tarball = true
         $copyVM = true
+        $tarFileName = arg unless arg == ''
     when '--force-vm-copy'
         $copyVM = true
     when '--shell-runner'
@@ -1346,11 +1348,11 @@
         }
 
         $remoteDirectory = JSON::parse(sshRead("cat ~/.bencher"))["tempPath"]
-        mysys("scp", "-P", $remotePort.to_s, ($outputDir.dirname + "payload.tar.gz").to_s, "#{$remoteUser}@#{$remoteHost}:#{$remoteDirectory}")
+        mysys("scp", "-P", $remotePort.to_s, ($outputDir.dirname + $tarFileName).to_s, "#{$remoteUser}@#{$remoteHost}:#{$remoteDirectory}")
         remoteScript = "\""
         remoteScript += "cd #{$remoteDirectory} && "
         remoteScript += "rm -rf #{$outputDir.basename} && "
-        remoteScript += "tar xzf payload.tar.gz && "
+        remoteScript += "tar xzf #{$tarFileName} && "
         remoteScript += "cd #{$outputDir.basename}/.runner && "
         remoteScript += "DYLD_FRAMEWORK_PATH=\\\"\\$(cd #{$testingFrameworkPath.dirname}; pwd)\\\" sh runscript"
         remoteScript += "\""
@@ -1393,7 +1395,7 @@
 end
 
 def compressBundle
-    cmd = "cd #{$outputDir}/.. && tar -czf payload.tar.gz #{$outputDir.basename}"
+    cmd = "cd #{$outputDir}/.. && tar -czf #{$tarFileName} #{$outputDir.basename}"
     $stderr.puts ">> #{cmd}" if $verbosity >= 2
     raise unless system(cmd)
 end
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to