From c8fe980efe67813b3fe8c750bd682491948027f3 Mon Sep 17 00:00:00 2001 From: "bclary%bclary.com" Date: Tue, 18 Jul 2006 19:48:32 +0000 Subject: [PATCH] JavaScript Test Library - report JS_Assert as a test failure, add failure list output file, bug 344131 --- js/tests/jsDriver.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/tests/jsDriver.pl b/js/tests/jsDriver.pl index 26fe4aeb8b5d..5730699673ee 100755 --- a/js/tests/jsDriver.pl +++ b/js/tests/jsDriver.pl @@ -318,7 +318,7 @@ sub execute_tests { # test was terminated due to timeout &report_failure ($test, "TIMED OUT ($opt_timeout seconds)\n"); } - elsif ($got_exit != $expected_exit) { + elsif ($got_exit != $expected_exit || $exit_signal != 0) { # full testcase output dumped on mismatched exit codes, &report_failure ($test, "Expected exit code " . "$expected_exit, got $got_exit\n" . @@ -393,6 +393,15 @@ sub write_results { "Tests completed on $completion_date.

\n"); if ($failures_reported > 0) { + my $output_file_failures = $opt_output_file; + $output_file_failures =~ s/(.*)\.html$/$1-failures.txt/; + open (OUTPUTFAILURES, "> $output_file_failures") || + die ("Could not create failure output file $output_file_failures"); + print OUTPUTFAILURES (join ("\n", @failed_tests)); + close OUTPUTFAILURES; + + &status ("Wrote failures to '$output_file_failures'."); + print OUTPUT ("[ Failure Details | " . "Retest List | " .