<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[159756] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/159756">159756</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2013-11-25 10:41:13 -0800 (Mon, 25 Nov 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/159752">r159752</a> and <a href="http://trac.webkit.org/projects/webkit/changeset/159754">r159754</a>.
http://trac.webkit.org/changeset/159752
http://trac.webkit.org/changeset/159754
https://bugs.webkit.org/show_bug.cgi?id=124847
Broke linux test bots. (Requested by mhahnenberg on #webkit).
* Scripts/jsc-stress-test-helpers/check-mozilla-failure: Added.
* Scripts/run-javascriptcore-tests:
* Scripts/run-jsc-stress-tests:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsrunjavascriptcoretests">trunk/Tools/Scripts/run-javascriptcore-tests</a></li>
<li><a href="#trunkToolsScriptsrunjscstresstests">trunk/Tools/Scripts/run-jsc-stress-tests</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsScriptsjscstresstesthelperscheckmozillafailure">trunk/Tools/Scripts/jsc-stress-test-helpers/check-mozilla-failure</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (159755 => 159756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-11-25 18:24:56 UTC (rev 159755)
+++ trunk/Tools/ChangeLog        2013-11-25 18:41:13 UTC (rev 159756)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-11-25 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r159752 and r159754.
+ http://trac.webkit.org/changeset/159752
+ http://trac.webkit.org/changeset/159754
+ https://bugs.webkit.org/show_bug.cgi?id=124847
+
+ Broke linux test bots. (Requested by mhahnenberg on #webkit).
+
+ * Scripts/jsc-stress-test-helpers/check-mozilla-failure: Added.
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-jsc-stress-tests:
+
</ins><span class="cx"> 2013-11-25 Mark Hahnenberg <mhahnenberg@apple.com>
</span><span class="cx">
</span><span class="cx"> Followup fix after r159752
</span></span></pre></div>
<a id="trunkToolsScriptsjscstresstesthelperscheckmozillafailure"></a>
<div class="addfile"><h4>Added: trunk/Tools/Scripts/jsc-stress-test-helpers/check-mozilla-failure (0 => 159756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/jsc-stress-test-helpers/check-mozilla-failure         (rev 0)
+++ trunk/Tools/Scripts/jsc-stress-test-helpers/check-mozilla-failure        2013-11-25 18:41:13 UTC (rev 159756)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+#!/usr/bin/env ruby
+
+# Copyright (C) 2013 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+File.open(ARGV[0], "r") {
+ | inp |
+ inp.each_line {
+ | line |
+ exit 0 if line =~ /failed!/i
+ }
+}
+
+exit 1
</ins></span></pre></div>
<a id="trunkToolsScriptsrunjavascriptcoretests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-javascriptcore-tests (159755 => 159756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-javascriptcore-tests        2013-11-25 18:24:56 UTC (rev 159755)
+++ trunk/Tools/Scripts/run-javascriptcore-tests        2013-11-25 18:41:13 UTC (rev 159756)
</span><span class="lines">@@ -79,8 +79,6 @@
</span><span class="cx">
</span><span class="cx"> my $enableFTL = 0;
</span><span class="cx">
</span><del>-my $createTarball = 0;
-
</del><span class="cx"> my $programName = basename($0);
</span><span class="cx"> my $buildJSCDefault = $buildJSC ? "will check" : "will not check";
</span><span class="cx"> my $testapiDefault = $runTestAPI ? "will run" : "will not run";
</span><span class="lines">@@ -96,7 +94,6 @@
</span><span class="cx"> --[no-]build Check (or don't check) to see if the jsc build is up-to-date (default: $buildJSCDefault)
</span><span class="cx"> --[no-]testapi Run (or don't run) testapi (default: $testapiDefault)
</span><span class="cx"> --[no-]jsc-stress Run (or don't run) the JSC stress tests (default: $jscStressDefault)
</span><del>- --tarball Create a tarball of the bundle produced by running the JSC stress tests.
</del><span class="cx"> EOF
</span><span class="cx">
</span><span class="cx"> GetOptions(
</span><span class="lines">@@ -107,7 +104,6 @@
</span><span class="cx"> 'ftl-jit!' => \$enableFTL,
</span><span class="cx"> 'testapi!' => \$runTestAPI,
</span><span class="cx"> 'jsc-stress!' => \$runJSCStress,
</span><del>- 'tarball!' => \$createTarball,
</del><span class="cx"> 'help' => \$showHelp
</span><span class="cx"> );
</span><span class="cx">
</span><span class="lines">@@ -243,9 +239,6 @@
</span><span class="cx"> if ($enableFTL) {
</span><span class="cx"> push(@jscStressDriverCmd, "--ftl-jit");
</span><span class="cx"> }
</span><del>- if ($createTarball) {
- push(@jscStressDriverCmd, "--tarball");
- }
</del><span class="cx"> if (defined($extraTests)) {
</span><span class="cx"> push(@jscStressDriverCmd, $extraTests);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsScriptsrunjscstresstests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-jsc-stress-tests (159755 => 159756)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-jsc-stress-tests        2013-11-25 18:24:56 UTC (rev 159755)
+++ trunk/Tools/Scripts/run-jsc-stress-tests        2013-11-25 18:41:13 UTC (rev 159756)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
</span><span class="cx"> # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">
</span><del>-require 'fileutils'
</del><span class="cx"> require 'getoptlong'
</span><span class="cx"> require 'pathname'
</span><span class="cx"> require 'yaml'
</span><span class="lines">@@ -37,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> HELPERS_PATH = SCRIPTS_PATH + "jsc-stress-test-helpers"
</span><span class="cx">
</span><del>-IMPORTANT_ENVS = ["JSC_timeout"]
</del><ins>+IMPORTANT_ENVS = ["JSC_timeout", "DYLD_FRAMEWORK_PATH"]
</ins><span class="cx">
</span><span class="cx"> begin
</span><span class="cx"> require 'shellwords'
</span><span class="lines">@@ -82,10 +81,10 @@
</span><span class="cx">
</span><span class="cx"> $jscPath = nil
</span><span class="cx"> $enableFTL = false
</span><ins>+$collections = []
</ins><span class="cx"> $outputDir = Pathname.new("results")
</span><span class="cx"> $verbosity = 0
</span><del>-$bundle = nil
-$tarball = false
</del><ins>+$errorOnFailure = false
</ins><span class="cx">
</span><span class="cx"> def usage
</span><span class="cx"> puts "run-jsc-stress-tests -j <shell path> <collections path> [<collections path> ...]"
</span><span class="lines">@@ -93,9 +92,8 @@
</span><span class="cx"> puts "--jsc (-j) Path to JavaScriptCore. This option is required."
</span><span class="cx"> puts "--ftl-jit Indicate that we have the FTL JIT."
</span><span class="cx"> puts "--output-dir (-o) Path where to put results. Default is #{$outputDir}."
</span><ins>+ puts "--[no-]error-on-failure Exit with exit code 1 if any tests fail. Default is #{$errorOnFailure}."
</ins><span class="cx"> puts "--verbose (-v) Print more things while running."
</span><del>- puts "--run-bundle Runs a bundle previously created by run-jsc-stress-tests."
- puts "--tarball Creates a tarball of the final bundle."
</del><span class="cx"> puts "--help (-h) Print this message."
</span><span class="cx"> exit 1
</span><span class="cx"> end
</span><span class="lines">@@ -104,9 +102,9 @@
</span><span class="cx"> ['--jsc', '-j', GetoptLong::REQUIRED_ARGUMENT],
</span><span class="cx"> ['--ftl-jit', GetoptLong::NO_ARGUMENT],
</span><span class="cx"> ['--output-dir', '-o', GetoptLong::REQUIRED_ARGUMENT],
</span><del>- ['--run-bundle', GetoptLong::REQUIRED_ARGUMENT],
- ['--tarball', GetoptLong::NO_ARGUMENT],
- ['--verbose', '-v', GetoptLong::NO_ARGUMENT]).each {
</del><ins>+ ['--verbose', '-v', GetoptLong::NO_ARGUMENT],
+ ['--error-on-failure', GetoptLong::NO_ARGUMENT],
+ ['--no-error-on-failure', GetoptLong::NO_ARGUMENT]).each {
</ins><span class="cx"> | opt, arg |
</span><span class="cx"> case opt
</span><span class="cx"> when '--help'
</span><span class="lines">@@ -117,22 +115,17 @@
</span><span class="cx"> $outputDir = Pathname.new(arg)
</span><span class="cx"> when '--ftl-jit'
</span><span class="cx"> $enableFTL = true
</span><ins>+ when '--error-on-failure'
+ $errorOnFailure = true
+ when '--no-error-on-failure'
+ $errorOnFailure = false
</ins><span class="cx"> when '--verbose'
</span><span class="cx"> $verbosity += 1
</span><del>- when '--run-bundle'
- $bundle = Pathname.new(arg)
- when '--tarball'
- $tarball = true
</del><span class="cx"> end
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> $progressMeter = ($verbosity == 0 and $stdin.tty?)
</span><span class="cx">
</span><del>-if $bundle
- $jscPath = $bundle + ".vm" + "JavaScriptCore.framework" + "Resources" + "jsc"
- $outputDir = $bundle
-end
-
</del><span class="cx"> unless $jscPath
</span><span class="cx"> $stderr.puts "Error: must specify -j <path>."
</span><span class="cx"> exit 1
</span><span class="lines">@@ -144,43 +137,6 @@
</span><span class="cx">
</span><span class="cx"> $runlist = []
</span><span class="cx">
</span><del>-def frameworkFromJSCPath(jscPath)
- if jscPath.dirname.basename.to_s == "Resources" and jscPath.dirname.dirname.basename.to_s == "JavaScriptCore.framework"
- jscPath.dirname.dirname
- elsif jscPath.dirname.dirname.basename.to_s == "WebKitBuild"
- parentDirName = jscPath.dirname.basename.to_s
- if parentDirName == "Debug" or parentDirName == "Release"
- jscPath.dirname + "JavaScriptCore.framework"
- else
- raise "Unknown JSC path, cannot copy full framework: #{jscPath}"
- end
- else
- raise "Unknown JSC path, cannot copy full framework: #{jscPath}"
- end
-end
-
-def copyVMToBundle
- raise if $bundle
-
- vmDir = $outputDir + ".vm"
- FileUtils.mkdir_p vmDir
-
- frameworkPath = frameworkFromJSCPath($jscPath)
- FileUtils.cp_r frameworkPath, vmDir
-
- $frameworkPath = Pathname.new(".vm") + "JavaScriptCore.framework"
- $jscPath = $frameworkPath + "Resources" + "jsc"
-end
-
-def pathToVM
- dir = Pathname.new(".")
- $benchmarkDirectory.each_filename {
- | pathComponent |
- dir += ".."
- }
- dir + $jscPath
-end
-
</del><span class="cx"> def prefixCommand(prefix)
</span><span class="cx"> "awk " + Shellwords.shellescape("{ printf #{(prefix + ': ').inspect}; print }")
</span><span class="cx"> end
</span><span class="lines">@@ -193,7 +149,7 @@
</span><span class="cx"> def silentOutputHandler
</span><span class="cx"> Proc.new {
</span><span class="cx"> | name |
</span><del>- " | " + pipeAndPrefixCommand((Pathname("..") + (name + ".out")).to_s, name)
</del><ins>+ " | " + pipeAndPrefixCommand(($outputDir + (name + ".out")).to_s, name)
</ins><span class="cx"> }
</span><span class="cx"> end
</span><span class="cx">
</span><span class="lines">@@ -201,7 +157,7 @@
</span><span class="cx"> def noisyOutputHandler
</span><span class="cx"> Proc.new {
</span><span class="cx"> | name |
</span><del>- " | cat > " + Shellwords.shellescape((Pathname("..") + (name + ".out")).to_s)
</del><ins>+ " | cat > " + Shellwords.shellescape(($outputDir + (name + ".out")).to_s)
</ins><span class="cx"> }
</span><span class="cx"> end
</span><span class="cx">
</span><span class="lines">@@ -223,16 +179,16 @@
</span><span class="cx"> def diffErrorHandler(expectedFilename)
</span><span class="cx"> Proc.new {
</span><span class="cx"> | outp, plan |
</span><del>- outputFilename = Shellwords.shellescape((Pathname("..") + (plan.name + ".out")).to_s)
- diffFilename = Shellwords.shellescape((Pathname("..") + (plan.name + ".diff")).to_s)
</del><ins>+ outputFilename = Shellwords.shellescape(($outputDir + (plan.name + ".out")).to_s)
+ diffFilename = Shellwords.shellescape(($outputDir + (plan.name + ".diff")).to_s)
</ins><span class="cx">
</span><span class="cx"> outp.puts "if test -e #{plan.failFile}"
</span><span class="cx"> outp.puts "then"
</span><span class="cx"> outp.puts " (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name)
</span><span class="cx"> outp.puts " " + plan.failCommand
</span><del>- outp.puts "elif test -e ../#{Shellwords.shellescape(expectedFilename)}"
</del><ins>+ outp.puts "elif test -e #{Shellwords.shellescape(expectedFilename)}"
</ins><span class="cx"> outp.puts "then"
</span><del>- outp.puts " diff -u ../#{Shellwords.shellescape(expectedFilename)} #{outputFilename} > #{diffFilename}"
</del><ins>+ outp.puts " diff -u #{Shellwords.shellescape(expectedFilename)} #{outputFilename} > #{diffFilename}"
</ins><span class="cx"> outp.puts " if [ $? -eq 0 ]"
</span><span class="cx"> outp.puts " then"
</span><span class="cx"> outp.puts " " + plan.successCommand
</span><span class="lines">@@ -252,13 +208,13 @@
</span><span class="cx"> def mozillaErrorHandler
</span><span class="cx"> Proc.new {
</span><span class="cx"> | outp, plan |
</span><del>- outputFilename = Shellwords.shellescape((Pathname("..") + (plan.name + ".out")).to_s)
</del><ins>+ outputFilename = Shellwords.shellescape(($outputDir + (plan.name + ".out")).to_s)
</ins><span class="cx">
</span><span class="cx"> outp.puts "if test -e #{plan.failFile}"
</span><span class="cx"> outp.puts "then"
</span><span class="cx"> outp.puts " (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name)
</span><span class="cx"> outp.puts " " + plan.failCommand
</span><del>- outp.puts "elif grep -i -q failed! #{outputFilename}"
</del><ins>+ outp.puts "elif ruby " + Shellwords.shellescape((HELPERS_PATH + "check-mozilla-failure").to_s) + " #{outputFilename}"
</ins><span class="cx"> outp.puts "then"
</span><span class="cx"> outp.puts " (echo Detected failures: && cat #{outputFilename}) | " + prefixCommand(plan.name)
</span><span class="cx"> outp.puts " " + plan.failCommand
</span><span class="lines">@@ -273,12 +229,12 @@
</span><span class="cx"> def mozillaFailErrorHandler
</span><span class="cx"> Proc.new {
</span><span class="cx"> | outp, plan |
</span><del>- outputFilename = Shellwords.shellescape((Pathname("..") + (plan.name + ".out")).to_s)
</del><ins>+ outputFilename = Shellwords.shellescape(($outputDir + (plan.name + ".out")).to_s)
</ins><span class="cx">
</span><span class="cx"> outp.puts "if test -e #{plan.failFile}"
</span><span class="cx"> outp.puts "then"
</span><span class="cx"> outp.puts " " + plan.successCommand
</span><del>- outp.puts "elif grep -i -q failed! #{outputFilename}"
</del><ins>+ outp.puts "elif ruby " + Shellwords.shellescape((HELPERS_PATH + "check-mozilla-failure").to_s) + " #{outputFilename}"
</ins><span class="cx"> outp.puts "then"
</span><span class="cx"> outp.puts " " + plan.successCommand
</span><span class="cx"> outp.puts "else"
</span><span class="lines">@@ -293,13 +249,13 @@
</span><span class="cx"> def mozillaExit3ErrorHandler
</span><span class="cx"> Proc.new {
</span><span class="cx"> | outp, plan |
</span><del>- outputFilename = Shellwords.shellescape((Pathname("..") + (plan.name + ".out")).to_s)
</del><ins>+ outputFilename = Shellwords.shellescape(($outputDir + (plan.name + ".out")).to_s)
</ins><span class="cx">
</span><span class="cx"> outp.puts "if test -e #{plan.failFile}"
</span><span class="cx"> outp.puts "then"
</span><span class="cx"> outp.puts " if [ `cat #{plan.failFile}` -eq 3 ]"
</span><span class="cx"> outp.puts " then"
</span><del>- outp.puts " if grep -i -q failed! #{outputFilename}"
</del><ins>+ outp.puts " if ruby " + Shellwords.shellescape((HELPERS_PATH + "check-mozilla-failure").to_s) + " #{outputFilename}"
</ins><span class="cx"> outp.puts " then"
</span><span class="cx"> outp.puts " (echo Detected failures: && cat #{outputFilename}) | " + prefixCommand(plan.name)
</span><span class="cx"> outp.puts " " + plan.failCommand
</span><span class="lines">@@ -324,7 +280,7 @@
</span><span class="cx"> attr_accessor :index
</span><span class="cx">
</span><span class="cx"> def initialize(directory, arguments, name, outputHandler, errorHandler)
</span><del>- @directory = directory
</del><ins>+ @directory = directory.realpath
</ins><span class="cx"> @arguments = arguments
</span><span class="cx"> @name = name
</span><span class="cx"> @outputHandler = outputHandler
</span><span class="lines">@@ -333,10 +289,7 @@
</span><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def shellCommand
</span><del>- # It's important to remember that the test is actually run in a subshell, so if we change directory
- # in the subshell when we return we will be in our original directory. This is nice because we don't
- # have to bend over backwards to do things relative to the root.
- "(cd ../#{Shellwords.shellescape(@directory.to_s)} && \"$@\" " + @arguments.map{
</del><ins>+ "(cd #{Shellwords.shellescape(@directory.to_s)} && \"$@\" " + @arguments.map{
</ins><span class="cx"> | v |
</span><span class="cx"> raise "Detected a non-string in #{inspect}" unless v.is_a? String
</span><span class="cx"> Shellwords.shellescape(v)
</span><span class="lines">@@ -344,17 +297,7 @@
</span><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def reproScriptCommand
</span><del>- # We have to find our way back to the .parallel directory since that's where all of the relative
- # paths assume they start out from.
- script = "CURRENT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n"
- script += "cd $CURRENT_DIR\n"
- Pathname.new(@name).dirname.each_filename {
- | pathComponent |
- script += "cd ..\n"
- }
- script += "cd .parallel\n"
-
- script += "export DYLD_FRAMEWORK_PATH=$(cd ../#{$frameworkPath.dirname}; pwd)\n"
</del><ins>+ script = ""
</ins><span class="cx"> IMPORTANT_ENVS.each {
</span><span class="cx"> | key |
</span><span class="cx"> if ENV[key]
</span><span class="lines">@@ -362,7 +305,7 @@
</span><span class="cx"> end
</span><span class="cx"> }
</span><span class="cx"> script += "#{shellCommand} || exit 1"
</span><del>- "echo #{Shellwords.shellescape(script)} > #{Shellwords.shellescape((Pathname.new("..") + @name).to_s)}"
</del><ins>+ "echo #{Shellwords.shellescape(script)} > #{Shellwords.shellescape(($outputDir + @name).to_s)}"
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def failCommand
</span><span class="lines">@@ -423,26 +366,22 @@
</span><span class="cx"> # returns false, in which case you're supposed to add your own run commands.
</span><span class="cx"> def parseRunCommands
</span><span class="cx"> didRun = false
</span><del>-
- Dir.chdir($outputDir) {
- File.open($benchmarkDirectory + $benchmark) {
- | inp |
- inp.each_line {
- | line |
- begin
- doesMatch = line =~ /^\/\/@/
- rescue Exception => e
- # Apparently this happens in the case of some UTF8 stuff in some files, where
- # Ruby tries to be strict and throw exceptions.
- next
- end
- next unless doesMatch
- eval $~.post_match
- didRun = true
- }
</del><ins>+ File.open($benchmarkDirectory + $benchmark) {
+ | inp |
+ inp.each_line {
+ | line |
+ begin
+ doesMatch = line =~ /^\/\/@/
+ rescue Exception => e
+ # Apparently this happens in the case of some UTF8 stuff in some files, where
+ # Ruby tries to be strict and throw exceptions.
+ next
+ end
+ next unless doesMatch
+ eval $~.post_match
+ didRun = true
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><span class="cx"> didRun
</span><span class="cx"> end
</span><span class="cx">
</span><span class="lines">@@ -451,7 +390,7 @@
</span><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def run(kind, *options)
</span><del>- addRunCommand(kind, [pathToVM.to_s] + options + [$benchmark.to_s], silentOutputHandler, simpleErrorHandler)
</del><ins>+ addRunCommand(kind, [$jscPath.to_s] + options + [$benchmark.to_s], silentOutputHandler, simpleErrorHandler)
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def runDefault
</span><span class="lines">@@ -531,7 +470,7 @@
</span><span class="cx"> def runProfiler
</span><span class="cx"> profilerOutput = uniqueFilename(".json")
</span><span class="cx"> if $canRunDisplayProfilerOutput
</span><del>- addRunCommand("profiler", ["ruby", (HELPERS_PATH + "profiler-test-helper").to_s, (SCRIPTS_PATH + "display-profiler-output").to_s, profilerOutput.to_s, pathToVM.to_s, "-p", profilerOutput.to_s, $benchmark.to_s], silentOutputHandler, simpleErrorHandler)
</del><ins>+ addRunCommand("profiler", ["ruby", (HELPERS_PATH + "profiler-test-helper").to_s, (SCRIPTS_PATH + "display-profiler-output").to_s, profilerOutput.to_s, $jscPath.to_s, "-p", profilerOutput.to_s, $benchmark.to_s], silentOutputHandler, simpleErrorHandler)
</ins><span class="cx"> else
</span><span class="cx"> puts "Running simple version of #{$collectionName}/#{$benchmark} because some required Ruby features are unavailable."
</span><span class="cx"> run("profiler-simple", "-p", profilerOutput.to_s)
</span><span class="lines">@@ -546,15 +485,12 @@
</span><span class="cx"> else
</span><span class="cx"> kind = "layout"
</span><span class="cx"> end
</span><del>-
- prepareExtraRelativeFiles(["../#{testName}-expected.txt"], $benchmarkDirectory)
- prepareExtraAbsoluteFiles(LAYOUTTESTS_PATH, ["resources/standalone-pre.js", "resources/standalone-post.js"])
-
- args = [pathToVM.to_s] + options +
- [(Pathname.new("resources") + "standalone-pre.js").to_s,
</del><ins>+ args =
+ [$jscPath.to_s] + options +
+ [(LAYOUTTESTS_PATH + "resources" + "standalone-pre.js").to_s,
</ins><span class="cx"> $benchmark.to_s,
</span><del>- (Pathname.new("resources") + "standalone-post.js").to_s]
- addRunCommand(kind, args, noisyOutputHandler, diffErrorHandler(($benchmarkDirectory + "../#{testName}-expected.txt").to_s))
</del><ins>+ (LAYOUTTESTS_PATH + "resources" + "standalone-post.js").to_s]
+ addRunCommand(kind, args, noisyOutputHandler, diffErrorHandler(($benchmarkDirectory.dirname + "#{testName}-expected.txt").to_s))
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def runLayoutTestDefault
</span><span class="lines">@@ -580,40 +516,13 @@
</span><span class="cx"> runLayoutTestDFGEagerNoCJIT
</span><span class="cx"> end
</span><span class="cx">
</span><del>-def prepareExtraRelativeFiles(extraFiles, destination)
- Dir.chdir($outputDir) {
- extraFiles.each {
- | file |
- FileUtils.cp $extraFilesBaseDir + file, destination + file
- }
- }
-end
-
-def baseDirForCollection(collectionName)
- Pathname(".tests") + collectionName
-end
-
-def prepareExtraAbsoluteFiles(absoluteBase, extraFiles)
- raise unless absoluteBase.absolute?
- Dir.chdir($outputDir) {
- collectionBaseDir = baseDirForCollection($collectionName)
- extraFiles.each {
- | file |
- destination = collectionBaseDir + file
- FileUtils.mkdir_p destination.dirname unless destination.directory?
- FileUtils.cp absoluteBase + file, destination
- }
- }
-end
-
</del><span class="cx"> def runMozillaTest(kind, mode, extraFiles, *options)
</span><span class="cx"> if kind
</span><span class="cx"> kind = "mozilla-" + kind
</span><span class="cx"> else
</span><span class="cx"> kind = "mozilla"
</span><span class="cx"> end
</span><del>- prepareExtraRelativeFiles(extraFiles.map{|v| (Pathname("..") + v).to_s}, $collection)
- args = [pathToVM.to_s] + options + extraFiles.map{|v| v.to_s} + [$benchmark.to_s]
</del><ins>+ args = [$jscPath.to_s] + options + extraFiles.map{|v| ($benchmarkDirectory + v).to_s} + [$benchmark.to_s]
</ins><span class="cx"> case mode
</span><span class="cx"> when :normal
</span><span class="cx"> errorHandler = mozillaErrorHandler
</span><span class="lines">@@ -656,6 +565,14 @@
</span><span class="cx"> puts "Skipping #{$collectionName}/#{$benchmark}"
</span><span class="cx"> end
</span><span class="cx">
</span><ins>+Dir.mkdir($outputDir) unless $outputDir.directory?
+begin
+ File.delete($outputDir + "failed")
+rescue
+end
+
+$outputDir = $outputDir.realpath
+
</ins><span class="cx"> def allJSFiles(path)
</span><span class="cx"> if path.file?
</span><span class="cx"> [path]
</span><span class="lines">@@ -697,29 +614,11 @@
</span><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def prepareCollection(name)
</span><del>- FileUtils.mkdir_p $outputDir + name
-
- absoluteCollection = $collection.realpath
-
- Dir.chdir($outputDir) {
- bundleDir = baseDirForCollection(name)
-
- # Create the proper directory structures.
- FileUtils.mkdir_p bundleDir
- if bundleDir.basename == $collection.basename
- FileUtils.cp_r absoluteCollection, bundleDir.dirname
- else
- FileUtils.cp_r absoluteCollection, bundleDir
- end
-
- $extraFilesBaseDir = absoluteCollection
-
- # Redirect the collection's location to the newly constructed bundle.
- if absoluteCollection.directory?
- $collection = bundleDir
- else
- $collection = bundleDir + $collection.basename
- end
</del><ins>+ dir = $outputDir
+ Pathname.new(name).each_filename {
+ | filename |
+ dir = dir + filename
+ Dir.mkdir(dir) unless dir.directory?
</ins><span class="cx"> }
</span><span class="cx"> end
</span><span class="cx">
</span><span class="lines">@@ -727,7 +626,7 @@
</span><span class="cx">
</span><span class="cx"> def handleCollectionFile(collection)
</span><span class="cx"> collectionName = simplifyCollectionName(collection)
</span><del>-
</del><ins>+
</ins><span class="cx"> paths = {}
</span><span class="cx"> subCollections = []
</span><span class="cx"> YAML::load(IO::read(collection)).each {
</span><span class="lines">@@ -763,17 +662,17 @@
</span><span class="cx"> $collectionName = $collectionName.to_s
</span><span class="cx">
</span><span class="cx"> prepareCollection($collectionName)
</span><del>-
- Dir.chdir($outputDir) {
- allJSFiles($collection).each {
- | path |
-
- $benchmark = path.basename
- $benchmarkDirectory = path.dirname
-
- $runCommandOptions = {}
- eval entry["cmd"]
- }
</del><ins>+
+ allJSFiles(subCollection).each {
+ | path |
+
+ path = path.realpath
+
+ $benchmark = path.basename
+ $benchmarkDirectory = path.dirname
+
+ $runCommandOptions = {}
+ eval entry["cmd"]
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -786,20 +685,18 @@
</span><span class="cx"> def handleCollectionDirectory(collection)
</span><span class="cx"> collectionName = simplifyCollectionName(collection)
</span><span class="cx">
</span><ins>+ prepareCollection(collectionName)
+
</ins><span class="cx"> $collection = collection
</span><span class="cx"> $collectionName = collectionName
</span><del>- prepareCollection(collectionName)
-
- Dir.chdir($outputDir) {
- $benchmarkDirectory = $collection
- allJSFiles($collection).each {
- | path |
-
- $benchmark = path.basename
-
- $runCommandOptions = {}
- defaultRun unless parseRunCommands
- }
</del><ins>+ $benchmarkDirectory = $collection
+ allJSFiles($collection).each {
+ | path |
+
+ $benchmark = path.basename
+
+ $runCommandOptions = {}
+ defaultRun unless parseRunCommands
</ins><span class="cx"> }
</span><span class="cx"> end
</span><span class="cx">
</span><span class="lines">@@ -813,6 +710,11 @@
</span><span class="cx"> end
</span><span class="cx"> end
</span><span class="cx">
</span><ins>+ARGV.each {
+ | collection |
+ handleCollection(collection)
+}
+
</ins><span class="cx"> def appendFailure(plan)
</span><span class="cx"> File.open($outputDir + "failed", "a") {
</span><span class="cx"> | outp |
</span><span class="lines">@@ -821,126 +723,6 @@
</span><span class="cx"> $numFailures += 1
</span><span class="cx"> end
</span><span class="cx">
</span><del>-def prepareBundle
- raise if $bundle
-
- copyVMToBundle
-
- ARGV.each {
- | collection |
- handleCollection(collection)
- }
-end
-
-def cleanOldResults
- raise unless $bundle
-
- eachResultFile($outputDir) {
- | path |
- FileUtils.rm_f path
- }
-end
-
-def cleanEmptyResultFiles
- eachResultFile($outputDir) {
- | path |
- next unless path.basename.to_s =~ /\.out$/
- next unless FileTest.size(path) == 0
- FileUtils.rm_f path
- }
-end
-
-def eachResultFile(startingDir, &block)
- dirsToClean = [startingDir]
- until dirsToClean.empty? do
- nextDir = dirsToClean.pop
- Dir.foreach(nextDir) {
- | entry |
- next if entry =~ /^\./
- path = nextDir + entry
- if path.directory?
- dirsToClean.push(path)
- else
- block.call(path)
- end
- }
- end
-end
-
-def prepareParallelTestRunner
- # The goals of our parallel test runner are scalability and simplicity. The
- # simplicity part is particularly important. We don't want to have to have
- # a full-time contributor just philosophising about parallel testing.
- #
- # As such, we just pass off all of the hard work to 'make'. This creates a
- # dummy directory ("$outputDir/.parallel") in which we create a dummy
- # Makefile. The Makefile has an 'all' rule that depends on all of the tests.
- # That is, for each test we know we will run, there is a rule in the
- # Makefile and 'all' depends on it. Running 'make -j <whatever>' on this
- # Makefile results in 'make' doing all of the hard work:
- #
- # - Load balancing just works. Most systems have a great load balancer in
- # 'make'. If your system doesn't then just install a real 'make'.
- #
- # - Interruptions just work. For example Ctrl-C handling in 'make' is
- # exactly right. You don't have to worry about zombie processes.
- #
- # We then do some tricks to make failure detection work and to make this
- # totally sound. If a test fails, we don't want the whole 'make' job to
- # stop. We also don't have any facility for makefile-escaping of path names.
- # We do have such a thing for shell-escaping, though. We fix both problems
- # by having the actual work for each of the test rules be done in a shell
- # script on the side. There is one such script per test. The script responds
- # to failure by printing something on the console and then touching a
- # failure file for that test, but then still returns 0. This makes 'make'
- # continue past that failure and complete all the tests anyway.
- #
- # In the end, this script collects all of the failures by searching for
- # files in the .parallel directory whose name matches /^test_fail_/, where
- # the thing after the 'fail_' is the test index. Those are the files that
- # would be created by the test scripts if they detect failure. We're
- # basically using the filesystem as a concurrent database of test failures.
- # Even if two tests fail at the same time, since they're touching different
- # files we won't miss any failures.
-
- runIndices = []
- $runlist.each_with_index {
- | plan, index |
- runIndices << index
- plan.index = index
- }
-
- Dir.mkdir($parallelDir) unless $parallelDir.directory?
- toDelete = []
- Dir.foreach($parallelDir) {
- | filename |
- if filename =~ /^test_/
- toDelete << filename
- end
- }
-
- toDelete.each {
- | filename |
- File.unlink($parallelDir + filename)
- }
-
- $runlist.each {
- | plan |
- plan.writeRunScript($parallelDir + "test_script_#{plan.index}")
- }
-
- File.open($parallelDir + "Makefile", "w") {
- | outp |
- outp.puts("all: " + runIndices.map{|v| "test_done_#{v}"}.join(' '))
- runIndices.each {
- | index |
- plan = $runlist[index]
- outp.puts "test_done_#{index}:"
- outp.puts "\tsh test_script_#{plan.index}"
- }
- }
-end
-
</del><span class="cx"> if $enableFTL and ENV["JSC_timeout"]
</span><span class="cx"> # Currently, using the FTL is a performance regression particularly in real
</span><span class="cx"> # (i.e. non-loopy) benchmarks. Account for this in the timeout.
</span><span class="lines">@@ -952,117 +734,154 @@
</span><span class="cx"> # Increase the timeout proportionally to the number of processors.
</span><span class="cx"> ENV["JSC_timeout"] = (ENV["JSC_timeout"].to_i.to_f * Math.sqrt($numProcessors)).to_i.to_s
</span><span class="cx"> end
</span><del>-
</del><ins>+
+# The goals of our parallel test runner are scalability and simplicity. The
+# simplicity part is particularly important. We don't want to have to have
+# a full-time contributor just philosophising about parallel testing.
+#
+# As such, we just pass off all of the hard work to 'make'. This creates a
+# dummy directory ("$outputDir/.parallel") in which we create a dummy
+# Makefile. The Makefile has an 'all' rule that depends on all of the tests.
+# That is, for each test we know we will run, there is a rule in the
+# Makefile and 'all' depends on it. Running 'make -j <whatever>' on this
+# Makefile results in 'make' doing all of the hard work:
+#
+# - Load balancing just works. Most systems have a great load balancer in
+# 'make'. If your system doesn't then just install a real 'make'.
+#
+# - Interruptions just work. For example Ctrl-C handling in 'make' is
+# exactly right. You don't have to worry about zombie processes.
+#
+# We then do some tricks to make failure detection work and to make this
+# totally sound. If a test fails, we don't want the whole 'make' job to
+# stop. We also don't have any facility for makefile-escaping of path names.
+# We do have such a thing for shell-escaping, though. We fix both problems
+# by having the actual work for each of the test rules be done in a shell
+# script on the side. There is one such script per test. The script responds
+# to failure by printing something on the console and then touching a
+# failure file for that test, but then still returns 0. This makes 'make'
+# continue past that failure and complete all the tests anyway.
+#
+# In the end, this script collects all of the failures by searching for
+# files in the .parallel directory whose name matches /^test_fail_/, where
+# the thing after the 'fail_' is the test index. Those are the files that
+# would be created by the test scripts if they detect failure. We're
+# basically using the filesystem as a concurrent database of test failures.
+# Even if two tests fail at the same time, since they're touching different
+# files we won't miss any failures.
+
+runIndices = []
+$runlist.each_with_index {
+ | plan, index |
+ runIndices << index
+ plan.index = index
+}
+
+parallelDir = $outputDir + ".parallel"
+Dir.mkdir(parallelDir) unless parallelDir.directory?
+toDelete = []
+Dir.foreach(parallelDir) {
+ | filename |
+ if filename =~ /^test_/
+ toDelete << filename
+ end
+}
+
+toDelete.each {
+ | filename |
+ File.unlink(parallelDir + filename)
+}
+
</ins><span class="cx"> puts
</span><span class="cx">
</span><del>-def cleanParallelDirectory
- raise unless $bundle
- Dir.foreach($parallelDir) {
- | filename |
- next unless filename =~ /^test_fail/
- FileUtils.rm_f $parallelDir + filename
</del><ins>+$runlist.each {
+ | plan |
+ plan.writeRunScript(parallelDir + "test_script_#{plan.index}")
+}
+
+File.open(parallelDir + "Makefile", "w") {
+ | outp |
+ outp.puts("all: " + runIndices.map{|v| "test_done_#{v}"}.join(' '))
+ runIndices.each {
+ | index |
+ plan = $runlist[index]
+ outp.puts "test_done_#{index}:"
+ outp.puts "\tsh test_script_#{plan.index}"
</ins><span class="cx"> }
</span><del>-end
</del><ins>+}
</ins><span class="cx">
</span><del>-def runParallelTestRunner
- Dir.chdir($parallelDir) {
- # -1 for the Makefile, and -2 for '..' and '.'
- numberOfTests = Dir.entries(".").count - 3
- unless $progressMeter
- mysys("make", "-j", $numProcessors.to_s, "-s", "-f", "Makefile")
- else
- cmd = "make -j #{$numProcessors} -s -f Makefile"
- running = {}
- didRun = {}
- didFail = {}
- blankLine = true
- prevStringLength = 0
- IO.popen(cmd, "r") {
- | inp |
- inp.each_line {
- | line |
- line.chomp!
- if line =~ /^Running /
- running[$~.post_match] = true
- elsif line =~ /^PASS: /
- didRun[$~.post_match] = true
- elsif line =~ /^FAIL: /
- didRun[$~.post_match] = true
- didFail[$~.post_match] = true
</del><ins>+Dir.chdir(parallelDir) {
+ unless $progressMeter
+ mysys("make", "-j", $numProcessors.to_s, "-s", "-f", "Makefile")
+ else
+ cmd = "make -j #{$numProcessors} -s -f Makefile"
+ running = {}
+ didRun = {}
+ didFail = {}
+ blankLine = true
+ prevStringLength = 0
+ IO.popen(cmd, "r") {
+ | inp |
+ inp.each_line {
+ | line |
+ line.chomp!
+ if line =~ /^Running /
+ running[$~.post_match] = true
+ elsif line =~ /^PASS: /
+ didRun[$~.post_match] = true
+ elsif line =~ /^FAIL: /
+ didRun[$~.post_match] = true
+ didFail[$~.post_match] = true
+ else
+ unless blankLine
+ print("\r" + " " * prevStringLength + "\r")
+ end
+ puts line
+ blankLine = true
+ end
+
+ def lpad(str, chars)
+ str = str.to_s
+ if str.length > chars
+ str
</ins><span class="cx"> else
</span><del>- unless blankLine
- print("\r" + " " * prevStringLength + "\r")
- end
- puts line
- blankLine = true
</del><ins>+ "%#{chars}s"%(str)
</ins><span class="cx"> end
</span><del>-
- def lpad(str, chars)
- str = str.to_s
- if str.length > chars
- str
- else
- "%#{chars}s"%(str)
- end
- end
-
- string = ""
- string += "\r#{lpad(didRun.size, numberOfTests.to_s.size)}/#{numberOfTests}"
- unless didFail.empty?
- string += " (failed #{didFail.size})"
- end
- string += " "
- (running.size - didRun.size).times {
- string += "."
- }
- if string.length < prevStringLength
- print string
- print(" " * (prevStringLength - string.length))
- end
- print string
- prevStringLength = string.length
- blankLine = false
- $stdout.flush
</del><ins>+ end
+
+ string = ""
+ string += "\r#{lpad(didRun.size, $runlist.size.to_s.size)}/#{$runlist.size}"
+ unless didFail.empty?
+ string += " (failed #{didFail.size})"
+ end
+ string += " "
+ (running.size - didRun.size).times {
+ string += "."
</ins><span class="cx"> }
</span><ins>+ if string.length < prevStringLength
+ print string
+ print(" " * (prevStringLength - string.length))
+ end
+ print string
+ prevStringLength = string.length
+ blankLine = false
+ $stdout.flush
</ins><span class="cx"> }
</span><del>- puts
- raise "Failed to run #{cmd}: #{$?.inspect}" unless $?.success?
- end
- }
-end
</del><ins>+ }
+ puts
+ raise "Failed to run #{cmd}: #{$?.inspect}" unless $?.success?
+ end
+}
</ins><span class="cx">
</span><del>-def detectFailures
- raise if $bundle
</del><ins>+# Delete empty .out files to make life less confusing.
+$runlist.each {
+ | plan |
+ outputFilename = $outputDir + (plan.name + ".out")
+ File.unlink outputFilename if FileTest.size(outputFilename) == 0
+}
</ins><span class="cx">
</span><del>- Dir.foreach($parallelDir) {
- | filename |
- next unless filename =~ /test_fail_/
- appendFailure($runlist[$~.post_match.to_i])
- }
-end
-
-def compressBundle
- cmd = "cd #{$outputDir}/.. && tar -czf payload.tar.gz #{$outputDir.basename}"
- $stderr.puts ">> #{cmd}" if $verbosity >= 2
- raise unless system(cmd)
-end
-
-FileUtils.rm_rf $outputDir if $outputDir.directory? and not $bundle
-Dir.mkdir($outputDir) unless $outputDir.directory?
-
-begin
- File.delete($outputDir + "failed")
-rescue
-end
-
-$outputDir = $outputDir.realpath
-$parallelDir = $outputDir + ".parallel"
-
-prepareBundle unless $bundle
-prepareParallelTestRunner unless $bundle
-cleanParallelDirectory if $bundle
-cleanOldResults if $bundle
-runParallelTestRunner
-cleanEmptyResultFiles
-detectFailures unless $bundle
-compressBundle if $tarball
</del><ins>+Dir.foreach(parallelDir) {
+ | filename |
+ next unless filename =~ /test_fail_/
+ appendFailure($runlist[$~.post_match.to_i])
+}
</ins></span></pre>
</div>
</div>
</body>
</html>