summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-11 13:45:28 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-11 13:45:28 +0200
commitd6a599dbc9d824a462b2b206316e102bf8136446 (patch)
treeecb257a5e55b2239d74b90fdad62fccd661cf286 /Source/JavaScriptCore/tests
parent3ccc3a85f09a83557b391aae380d3bf5f81a2911 (diff)
Imported WebKit commit 8ff1f22783a32de82fee915abd55bd1b298f2644 (http://svn.webkit.org/repository/webkit/trunk@122325)
New snapshot that should work with the latest Qt build system changes
Diffstat (limited to 'Source/JavaScriptCore/tests')
-rw-r--r--Source/JavaScriptCore/tests/mozilla/jsDriver.pl33
1 files changed, 28 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/tests/mozilla/jsDriver.pl b/Source/JavaScriptCore/tests/mozilla/jsDriver.pl
index d1c18ce66..4a774cefd 100644
--- a/Source/JavaScriptCore/tests/mozilla/jsDriver.pl
+++ b/Source/JavaScriptCore/tests/mozilla/jsDriver.pl
@@ -164,6 +164,7 @@ sub execute_tests {
my $failure_lines;
my $bug_number;
my $status_lines;
+ my @jsc_exit_code;
# user selected [Q]uit from ^C handler.
if ($user_exit) {
@@ -177,7 +178,20 @@ sub execute_tests {
$shell_command = $opt_arch . " ";
$shell_command .= &xp_path($engine_command) . " -s ";
-
+
+# FIXME: <https://bugs.webkit.org/show_bug.cgi?id=90119>
+# Sporadically on Windows, the exit code returned after close() in $?
+# is 126 (after the appropraite shifting, even though jsc exits with
+# 0 or 3). To work around this, a -x option was added to jsc that will
+# output the exit value right before exiting. We parse that value and
+# remove it from the output stream before comparing the actual and expected
+# outputs. When that bug is found and fixed, the code for processing of
+# "jsc exiting [\d]" and use of @jsc_exit_code can be removed along with
+# the -x option in jsc.cpp
+ if ($os_type eq "WIN") {
+ $shell_command .= " -x ";
+ }
+
$path = &xp_path($opt_suite_path . $suite . "/shell.js");
if (-f $path) {
$shell_command .= $file_param . $path;
@@ -202,10 +216,19 @@ sub execute_tests {
$redirect_command . " |");
@output = <OUTPUT>;
close (OUTPUT);
-
- @output = grep (!/js\>/, @output);
-
- if ($opt_exit_munge == 1) {
+
+ @jsc_exit_code = grep (/jsc exiting [\d]/, @output);
+ @output = grep (!/js\>|jsc exiting [\d]/, @output);
+
+ if (($#jsc_exit_code == 0) && ($jsc_exit_code[0] =~ /jsc exiting ([\d])\W*/)) {
+# return value from jsc output to work around windows bug
+ $got_exit = $1;
+ if ($opt_exit_munge == 1) {
+ $exit_signal = ($? & 255);
+ } else {
+ $exit_signal = 0;
+ }
+ } elsif ($opt_exit_munge == 1) {
# signal information in the lower 8 bits, exit code above that
$got_exit = ($? >> 8);
$exit_signal = ($? & 255);