run-api-tests doesn't print test name when the test crashes
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2016 22:04:36 +0000 (22:04 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2016 22:04:36 +0000 (22:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155476

Reviewed by Daniel Bates.

* Scripts/run-api-tests: Print "UNEXPECTEDLY EXITED" with a test name when output
doesn't contain the test name yet. Changed test name output to always be before raw
stdout for clarity.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198231 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/run-api-tests

index 330978d..94bf5d1 100644 (file)
@@ -1,3 +1,14 @@
+2016-03-15  Alexey Proskuryakov  <ap@apple.com>
+
+        run-api-tests doesn't print test name when the test crashes
+        https://bugs.webkit.org/show_bug.cgi?id=155476
+
+        Reviewed by Daniel Bates.
+
+        * Scripts/run-api-tests: Print "UNEXPECTEDLY EXITED" with a test name when output
+        doesn't contain the test name yet. Changed test name output to always be before raw
+        stdout for clarity.
+
 2016-03-15  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, rolling out r198203.
index 0fb97e3..4a9e178 100755 (executable)
@@ -229,6 +229,17 @@ sub runTest($$)
         @testOutput = grep { !/^LEAK:/ } @testOutput unless $showLeaks;
         map { s/\*\*PASS\*\*/possiblyColored("bold green", "PASS")/eg } @testOutput;
         map { s/\*\*FAIL\*\*/possiblyColored("bold red", "FAIL")/eg } @testOutput;
+
+        if ($result) {
+            push @testsFailed, $test;
+            if (!$timedOut && index("@testOutput", $test) == -1) {
+                print STDOUT possiblyColored("bold red", "UNEXPECTEDLY EXITED"), " $test\n";
+            }
+        } elsif ($timedOut) {
+            push @testsTimedOut, $test;
+            print STDOUT possiblyColored("bold yellow", "TIMEOUT"), " $test\n";
+        }
+
         print STDOUT @testOutput;
 
         close($childIn);
@@ -236,13 +247,6 @@ sub runTest($$)
         close($childErr) unless ($verbose || $showLeaks);
         close(DEVNULL) unless ($verbose || $showLeaks);
 
-        if ($result) {
-            push @testsFailed, $test;
-        }
-        if ($timedOut) {
-            push @testsTimedOut, $test;
-            print possiblyColored("bold yellow", "TIMEOUT"), " $test\n";
-        }
         if ($timedOut || $result) {
             return $timedOut || $result;
         }