Title: [155205] trunk/Tools
- Revision
- 155205
- Author
- [email protected]
- Date
- 2013-09-06 12:36:34 -0700 (Fri, 06 Sep 2013)
Log Message
Fix run-jsc-stress-tests to use Pathname instead of File.realpath.
Also make it uses system() instead of popen(); that means that test output
will go to the console. This reduces error detection flakiness. It's fine
because stress tests don't print() unless they really have to.
Rubber stamped by Mark Hahnenberg.
* Scripts/run-jsc-stress-tests:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (155204 => 155205)
--- trunk/Tools/ChangeLog 2013-09-06 19:32:56 UTC (rev 155204)
+++ trunk/Tools/ChangeLog 2013-09-06 19:36:34 UTC (rev 155205)
@@ -1,3 +1,15 @@
+2013-09-06 Filip Pizlo <[email protected]>
+
+ Fix run-jsc-stress-tests to use Pathname instead of File.realpath.
+
+ Also make it uses system() instead of popen(); that means that test output
+ will go to the console. This reduces error detection flakiness. It's fine
+ because stress tests don't print() unless they really have to.
+
+ Rubber stamped by Mark Hahnenberg.
+
+ * Scripts/run-jsc-stress-tests:
+
2013-09-05 Filip Pizlo <[email protected]>
Introduce a way to run benchmarks and JSRegress as stress tests with different jsc command-line options
Modified: trunk/Tools/Scripts/run-jsc-stress-tests (155204 => 155205)
--- trunk/Tools/Scripts/run-jsc-stress-tests 2013-09-06 19:32:56 UTC (rev 155204)
+++ trunk/Tools/Scripts/run-jsc-stress-tests 2013-09-06 19:36:34 UTC (rev 155205)
@@ -24,10 +24,11 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'getoptlong'
+require 'pathname'
$jscPath = nil
$collections = []
-$outputDir = "results"
+$outputDir = Pathname.new("results")
def usage
puts "run-jsc-stress-tests -j <shell path> <collections path> [<collections path> ...]"
@@ -46,9 +47,9 @@
when '--help'
usage
when '--jsc'
- $jscPath = File.realpath(arg)
+ $jscPath = Pathname.new(arg).realpath
when '--output-dir'
- $outputDir = arg
+ $outputDir = Pathname.new(arg)
end
}
@@ -62,18 +63,11 @@
def run(kind, *options)
name = "#{$benchmark}.#{kind}"
print "#{name}: "
- IO.popen([$jscPath] + options + [$benchmark], "r") {
- | inp |
- File.open($outputDir + "/" + $collectionName + "/" + name, "w") {
- | outp |
- outp.write inp.read
- }
- }
- if $?.success?
+ if system($jscPath.to_s, *options, $benchmark)
puts "OK."
else
puts "FAIL: #{$?.inspect}"
- File.open($outputDir + "/failed", "a") {
+ File.open($outputDir + "failed", "a") {
| outp |
outp.puts name
}
@@ -113,28 +107,17 @@
puts "Skipping #{$benchmark}"
end
-collectionNames = {}
-
-Dir.mkdir($outputDir) unless FileTest.directory? $outputDir
+Dir.mkdir($outputDir) unless $outputDir.directory?
begin
- File.delete($outputDir + "/failed")
+ File.delete($outputDir + "failed")
rescue
end
-$outputDir = File.realpath($outputDir)
+$outputDir = $outputDir.realpath
ARGV.each {
| collection |
$collection = collection
- $collectionName = File.basename(collection)
- toAdd = 1
- while collectionNames[$collectionName]
- $collectionName = File.basename(collection) + "-#{toAdd}"
- toAdd += 1
- end
- collectionNames[$collectionName] = true
- dir = $outputDir + "/" + $collectionName
- Dir.mkdir(dir) unless FileTest.directory? dir
Dir.chdir(collection) {
Dir.foreach('.') {
| benchmark |
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes