Title: [171233] trunk/Tools
- Revision
- 171233
- Author
- [email protected]
- Date
- 2014-07-18 12:13:09 -0700 (Fri, 18 Jul 2014)
Log Message
Refactor run-jsc-stress-tests VM copying code to remove some abstractions
https://bugs.webkit.org/show_bug.cgi?id=135059
Reviewed by Mark Lam.
This is meant to make it easier for me to extend the copying functionality to copy things other than
the framework.
* Scripts/run-jsc-stress-tests:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (171232 => 171233)
--- trunk/Tools/ChangeLog 2014-07-18 19:08:24 UTC (rev 171232)
+++ trunk/Tools/ChangeLog 2014-07-18 19:13:09 UTC (rev 171233)
@@ -1,5 +1,17 @@
2014-07-18 Filip Pizlo <[email protected]>
+ Refactor run-jsc-stress-tests VM copying code to remove some abstractions
+ https://bugs.webkit.org/show_bug.cgi?id=135059
+
+ Reviewed by Mark Lam.
+
+ This is meant to make it easier for me to extend the copying functionality to copy things other than
+ the framework.
+
+ * Scripts/run-jsc-stress-tests:
+
+2014-07-18 Filip Pizlo <[email protected]>
+
Fix cloop build.
* Scripts/jsc-stress-test-helpers/js-exception-fuzz:
Modified: trunk/Tools/Scripts/run-jsc-stress-tests (171232 => 171233)
--- trunk/Tools/Scripts/run-jsc-stress-tests 2014-07-18 19:08:24 UTC (rev 171232)
+++ trunk/Tools/Scripts/run-jsc-stress-tests 2014-07-18 19:13:09 UTC (rev 171233)
@@ -135,7 +135,7 @@
exit 1
end
-jscArg = ""
+jscArg = nil
GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT],
['--jsc', '-j', GetoptLong::REQUIRED_ARGUMENT],
@@ -187,14 +187,17 @@
end
}
-if jscArg
- if $copy
- $jscPath = Pathname.new(jscArg).realpath
- else
- $jscPath = Pathname.new(jscArg)
- end
+unless jscArg
+ $stderr.puts "Error: must specify -jsc <path>"
+ exit 1
end
+if $copy
+ $jscPath = Pathname.new(jscArg).realpath
+else
+ $jscPath = Pathname.new(jscArg)
+end
+
$progressMeter = ($verbosity == 0 and $stdout.tty?)
if $bundle
@@ -202,11 +205,6 @@
$outputDir = $bundle
end
-unless $jscPath
- $stderr.puts "Error: must specify -jsc <path>"
- exit 1
-end
-
# Try to determine architecture. Return nil on failure.
def machOArchitectureCode
begin
@@ -281,46 +279,6 @@
end
end
-def prepareFramework(jscPath)
- frameworkPath = frameworkFromJSCPath(jscPath)
- destinationFrameworkPath = Pathname.new(".vm") + "_javascript_Core.framework"
- $jscPath = destinationFrameworkPath + "Resources" + "jsc"
- $testingFrameworkPath = Pathname.new("..") + destinationFrameworkPath
-
- if frameworkPath
- source = frameworkPath
- destination = Pathname.new(".vm")
- else
- source = jscPath
- destination = $jscPath
-
- Dir.chdir($outputDir) {
- FileUtils.mkdir_p $jscPath.dirname
- }
- end
-
- Dir.chdir($outputDir) {
- if $copyVM
- FileUtils.cp_r source, destination
- else
- begin
- FileUtils.ln_s source, destination
- rescue
- FileUtils.cp_r source, destination
- end
- end
- }
-end
-
-def copyVMToBundle
- raise if $bundle
-
- vmDir = $outputDir + ".vm"
- FileUtils.mkdir_p vmDir
-
- prepareFramework($jscPath)
-end
-
def pathToVM
dir = Pathname.new(".")
$benchmarkDirectory.each_filename {
@@ -1070,7 +1028,37 @@
raise if $bundle
if $copy
- copyVMToBundle
+ vmDir = $outputDir + ".vm"
+ FileUtils.mkdir_p vmDir
+
+ frameworkPath = frameworkFromJSCPath($jscPath)
+ destinationFrameworkPath = Pathname.new(".vm") + "_javascript_Core.framework"
+ $jscPath = destinationFrameworkPath + "Resources" + "jsc"
+ $testingFrameworkPath = Pathname.new("..") + destinationFrameworkPath
+
+ if frameworkPath
+ source = frameworkPath
+ destination = Pathname.new(".vm")
+ else
+ source = jscPath
+ destination = $jscPath
+
+ Dir.chdir($outputDir) {
+ FileUtils.mkdir_p $jscPath.dirname
+ }
+ end
+
+ Dir.chdir($outputDir) {
+ if $copyVM
+ FileUtils.cp_r source, destination
+ else
+ begin
+ FileUtils.ln_s source, destination
+ rescue
+ FileUtils.cp_r source, destination
+ end
+ end
+ }
else
if !$remote and !$tarball
$testingFrameworkPath = frameworkFromJSCPath($jscPath).realpath
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes