Modified: trunk/Tools/ChangeLog (157068 => 157069)
--- trunk/Tools/ChangeLog 2013-10-07 23:48:19 UTC (rev 157068)
+++ trunk/Tools/ChangeLog 2013-10-07 23:56:07 UTC (rev 157069)
@@ -1,3 +1,20 @@
+2013-10-07 Gustavo Noronha Silva <gustavo.noro...@collabora.com>
+
+ [GTK] run-gtk-tests does not distinguish between failure and crashes
+ https://bugs.webkit.org/show_bug.cgi?id=122135
+
+ Reviewed by Martin Robinson.
+
+ The GTK+ API test runner does not distinguish between failures and crashes. This change
+ makes it do that, so it's easier for us to spot the more important/higher priority crash
+ case.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner._run_test_command): return the exit code instead of a boolean true/false,
+ so we have more information on how the process ended.
+ (TestRunner._run_test): check the exit code to distinguish between crashes and failures.
+ (TestRunner.run_tests): report crashes.
+
2013-10-07 Gustavo Noronha Silva <g...@gnome.org>
[GTK] Missing packages for APT on install-dependencies
Modified: trunk/Tools/Scripts/run-gtk-tests (157068 => 157069)
--- trunk/Tools/Scripts/run-gtk-tests 2013-10-07 23:48:19 UTC (rev 157068)
+++ trunk/Tools/Scripts/run-gtk-tests 2013-10-07 23:56:07 UTC (rev 157069)
@@ -22,7 +22,7 @@
import sys
import optparse
import re
-from signal import alarm, signal, SIGALRM, SIGKILL
+from signal import alarm, signal, SIGALRM, SIGKILL, SIGSEGV
from gi.repository import Gio, GLib
top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
@@ -309,7 +309,7 @@
# process. This child is dead, we can't get the status.
status = 0
- return not return_code_from_exit_status(status)
+ return return_code_from_exit_status(status)
def _run_test_glib(self, test_program):
tester_command = ['gtester']
@@ -336,7 +336,7 @@
if "TestWebKitAPI" in test_program:
return self._run_test_google(test_program)
- return False
+ return 1
def run_tests(self):
if not self._tests:
@@ -351,19 +351,24 @@
# some tests might be skipped while setting up the test environment.
self._tests = [test for test in self._tests if self._should_run_test_program(test)]
+ crashed_tests = []
failed_tests = []
timed_out_tests = []
try:
for test in self._tests:
- success = True
+ exit_status_code = 0
try:
- success = self._run_test(test)
+ exit_status_code = self._run_test(test)
except TestTimeout:
sys.stdout.write("TEST: %s: TIMEOUT\n" % test)
sys.stdout.flush()
timed_out_tests.append(test)
- if not success:
+ if exit_status_code == -SIGSEGV:
+ sys.stdout.write("TEST: %s: CRASHED\n" % test)
+ sys.stdout.flush()
+ crashed_tests.append(test)
+ elif exit_status_code != 0:
failed_tests.append(test)
finally:
self._tear_down_testing_environment()
@@ -373,6 +378,11 @@
sys.stdout.write("Tests failed (%d): %s\n" % (len(names), ", ".join(names)))
sys.stdout.flush()
+ if crashed_tests:
+ names = [test.replace(self._programs_path, '', 1) for test in crashed_tests]
+ sys.stdout.write("Tests that crashed (%d): %s\n" % (len(names), ", ".join(names)))
+ sys.stdout.flush()
+
if timed_out_tests:
names = [test.replace(self._programs_path, '', 1) for test in timed_out_tests]
sys.stdout.write("Tests that timed out (%d): %s\n" % (len(names), ", ".join(names)))