Title: [165274] trunk/Tools
Revision
165274
Author
mhahnenb...@apple.com
Date
2014-03-07 11:40:21 -0800 (Fri, 07 Mar 2014)

Log Message

run-jsc-stress-tests doesn't eagerly report test failures when using the shell runner
https://bugs.webkit.org/show_bug.cgi?id=129886

Reviewed by Mark Lam.

* Scripts/jsc-stress-test-helpers/shell-runner.sh: Added a "verbose" mode to the shell runner.
If we're in verbose mode, then we don't redirect any output when running each test. If we're not
in verbose mode then we redirect stdout to /dev/null and allow any stderr output through.
* Scripts/run-jsc-stress-tests: Redirect any sort of error output to stderr so that it will
make it through when in non-verbose mode.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (165273 => 165274)


--- trunk/Tools/ChangeLog	2014-03-07 19:02:41 UTC (rev 165273)
+++ trunk/Tools/ChangeLog	2014-03-07 19:40:21 UTC (rev 165274)
@@ -1,3 +1,16 @@
+2014-03-07  Mark Hahnenberg  <mhahnenb...@apple.com>
+
+        run-jsc-stress-tests doesn't eagerly report test failures when using the shell runner
+        https://bugs.webkit.org/show_bug.cgi?id=129886
+
+        Reviewed by Mark Lam.
+
+        * Scripts/jsc-stress-test-helpers/shell-runner.sh: Added a "verbose" mode to the shell runner.
+        If we're in verbose mode, then we don't redirect any output when running each test. If we're not
+        in verbose mode then we redirect stdout to /dev/null and allow any stderr output through.
+        * Scripts/run-jsc-stress-tests: Redirect any sort of error output to stderr so that it will 
+        make it through when in non-verbose mode.
+
 2014-03-07  Martin Robinson  <mrobin...@igalia.com>
 
         [GTK] buid-webkit should use CMake by default

Modified: trunk/Tools/Scripts/jsc-stress-test-helpers/shell-runner.sh (165273 => 165274)


--- trunk/Tools/Scripts/jsc-stress-test-helpers/shell-runner.sh	2014-03-07 19:02:41 UTC (rev 165273)
+++ trunk/Tools/Scripts/jsc-stress-test-helpers/shell-runner.sh	2014-03-07 19:40:21 UTC (rev 165274)
@@ -31,6 +31,15 @@
     fi
 fi
 
+VERBOSE=0
+while getopts "v" OPTION
+do
+    case $OPTION in
+        v) VERBOSE=1
+            ;;
+    esac
+done
+
 indexFile=".index"
 testList=".all_tests.txt"
 tempFile=".temp.txt"
@@ -71,7 +80,7 @@
             mv ${tempFile} ${testList}
             unlock_test_list
 
-            sh ${nextTest} > /dev/null
+            [ $VERBOSE -eq 1 ] && sh ${nextTest} || sh ${nextTest} 1> /dev/null
 
             lock_test_list
         done

Modified: trunk/Tools/Scripts/run-jsc-stress-tests (165273 => 165274)


--- trunk/Tools/Scripts/run-jsc-stress-tests	2014-03-07 19:02:41 UTC (rev 165273)
+++ trunk/Tools/Scripts/run-jsc-stress-tests	2014-03-07 19:40:21 UTC (rev 165274)
@@ -276,7 +276,7 @@
         | outp, plan |
         outp.puts "if test -e #{plan.failFile}"
         outp.puts "then"
-        outp.puts "    (echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name)
+        outp.puts "    (echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "    " + plan.failCommand
         outp.puts "else"
         outp.puts "    " + plan.successCommand
@@ -293,7 +293,7 @@
         
         outp.puts "if test -e #{plan.failFile}"
         outp.puts "then"
-        outp.puts "    (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name)
+        outp.puts "    (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "    " + plan.failCommand
         outp.puts "elif test -e ../#{Shellwords.shellescape(expectedFilename)}"
         outp.puts "then"
@@ -302,11 +302,11 @@
         outp.puts "    then"
         outp.puts "    " + plan.successCommand
         outp.puts "    else"
-        outp.puts "        (echo \"DIFF FAILURE!\" && cat #{diffFilename}) | " + prefixCommand(plan.name)
+        outp.puts "        (echo \"DIFF FAILURE!\" && cat #{diffFilename}) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "        " + plan.failCommand
         outp.puts "    fi"
         outp.puts "else"
-        outp.puts "    (echo \"NO EXPECTATION!\" && cat #{outputFilename}) | " + prefixCommand(plan.name)
+        outp.puts "    (echo \"NO EXPECTATION!\" && cat #{outputFilename}) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "    " + plan.failCommand
         outp.puts "fi"
     }
@@ -321,11 +321,11 @@
 
         outp.puts "if test -e #{plan.failFile}"
         outp.puts "then"
-        outp.puts "    (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name)
+        outp.puts "    (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "    " + plan.failCommand
         outp.puts "elif grep -i -q failed! #{outputFilename}"
         outp.puts "then"
-        outp.puts "    (echo Detected failures: && cat #{outputFilename}) | " + prefixCommand(plan.name)
+        outp.puts "    (echo Detected failures: && cat #{outputFilename}) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "    " + plan.failCommand
         outp.puts "else"
         outp.puts "    " + plan.successCommand
@@ -347,7 +347,7 @@
         outp.puts "then"
         outp.puts "    " + plan.successCommand
         outp.puts "else"
-        outp.puts "    (echo NOTICE: You made this test pass, but it was expected to fail) | " + prefixCommand(plan.name)
+        outp.puts "    (echo NOTICE: You made this test pass, but it was expected to fail) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "    " + plan.failCommand
         outp.puts "fi"
     }
@@ -366,17 +366,17 @@
         outp.puts "    then"
         outp.puts "        if grep -i -q failed! #{outputFilename}"
         outp.puts "        then"
-        outp.puts "            (echo Detected failures: && cat #{outputFilename}) | " + prefixCommand(plan.name)
+        outp.puts "            (echo Detected failures: && cat #{outputFilename}) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "            " + plan.failCommand
         outp.puts "        else"
         outp.puts "            " + plan.successCommand
         outp.puts "        fi"
         outp.puts "    else"
-        outp.puts "        (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name)
+        outp.puts "        (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "        " + plan.failCommand
         outp.puts "    fi"
         outp.puts "else"
-        outp.puts "    (cat #{outputFilename} && echo ERROR: Test expected to fail, but returned successfully) | " + prefixCommand(plan.name)
+        outp.puts "    (cat #{outputFilename} && echo ERROR: Test expected to fail, but returned successfully) | " + prefixCommand(plan.name) + "1>&2"
         outp.puts "    " + plan.failCommand
         outp.puts "fi"
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to