Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg (112382 => 112383)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2012-03-28 10:41:18 UTC (rev 112382)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2012-03-28 12:11:45 UTC (rev 112383)
@@ -567,19 +567,25 @@
shell.Test.commandComplete(self, cmd)
logText = cmd.logs['stdio'].getText()
- foundItems = re.findall("TOTALS: (?P<passed>\d+) passed, (?P<failed>\d+) failed, (?P<skipped>\d+) skipped", logText)
+ foundItems = re.findall("TOTALS: (?P<passed>\d+) passed, (?P<failed>\d+) failed, (?P<skipped>\d+) skipped, (?P<crashed>\d+) crashed", logText)
self.incorrectTests = 0
+ self.crashedTests = 0
self.statusLine = []
if foundItems:
self.incorrectTests = int(foundItems[0][1])
- if self.incorrectTests > 0:
+ self.crashedTests = int(foundItems[0][3])
+
+ if self.incorrectTests > 0 or self.crashedTests > 0:
self.statusLine = [
- "%s passed, %s failed, %s skipped" % (foundItems[0][0], foundItems[0][1], foundItems[0][2])
+ "%s passed, %s failed, %s skipped, %s crashed" % (foundItems[0][0], foundItems[0][1], foundItems[0][2], foundItems[0][3])
]
def evaluateCommand(self, cmd):
+ if self.crashedTests:
+ return FAILURE
+
if re.findall("Timeout, process", cmd.logs['stdio'].getText()):
self.statusLine = ["Failure: timeout occured during testing"]
return FAILURE
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py (112382 => 112383)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2012-03-28 10:41:18 UTC (rev 112382)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2012-03-28 12:11:45 UTC (rev 112383)
@@ -102,7 +102,7 @@
.
**********************************************************************
-** TOTALS: 16 passed, 0 failed, 0 skipped **
+** TOTALS: 16 passed, 0 failed, 0 skipped, 0 crashed **
**********************************************************************""")
def test_success(self):
@@ -119,11 +119,11 @@
.
**********************************************************************
-** TOTALS: 16 passed, 0 failed, 0 skipped **
+** TOTALS: 16 passed, 0 failed, 0 skipped, 0 crashed **
**********************************************************************""")
def test_failure(self):
- self.assertResults(WARNINGS, "16 passed, 1 failed, 0 skipped", """********* Start testing of tst_QDeclarativeWebView *********
+ self.assertResults(WARNINGS, "16 passed, 1 failed, 0 skipped, 0 crashed", """********* Start testing of tst_QDeclarativeWebView *********
PASS : tst_QDeclarativeWebView::pressGrabTime()
PASS : tst_QDeclarativeWebView::renderingEnabled()
PASS : tst_QDeclarativeWebView::setHtml()
@@ -136,7 +136,7 @@
.
**********************************************************************
-** TOTALS: 16 passed, 1 failed, 0 skipped **
+** TOTALS: 16 passed, 1 failed, 0 skipped, 0 crashed **
**********************************************************************""")
def test_timeout_and_failure(self):
@@ -171,11 +171,32 @@
.
.
**********************************************************************
-** TOTALS: 73 passed, 3 failed, 1 skipped **
+** TOTALS: 73 passed, 3 failed, 1 skipped, 0 crashed **
**********************************************************************""")
+ def test_crash(self):
+ self.assertResults(FAILURE, "API tests", """********* Start testing of tst_QQuickWebView *********
+Config: Using QTest library 5.0.0, Qt 5.0.0
+PASS : tst_QQuickWebView::initTestCase()
+PASS : tst_QQuickWebView::accessPage()
+CRASHED: WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview
+CRASHED: WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_hello
+
+********* Start testing of tst_publicapi *********
+Config: Using QTest library 5.0.0, Qt 5.0.0
+PASS : tst_publicapi::initTestCase()
+PASS : tst_publicapi::publicAPI()
+PASS : tst_publicapi::cleanupTestCase()
+Totals: 3 passed, 0 failed, 0 skipped
+********* Finished testing of tst_publicapi *********
+**********************************************************************
+** TOTALS: 92 passed, 0 failed, 0 skipped, 2 crashed **
+**********************************************************************""")
+
+
+
class RunUnitTestsTest(unittest.TestCase):
def assertFailures(self, expected_failure_count, stdio):
if expected_failure_count:
Modified: trunk/Tools/ChangeLog (112382 => 112383)
--- trunk/Tools/ChangeLog 2012-03-28 10:41:18 UTC (rev 112382)
+++ trunk/Tools/ChangeLog 2012-03-28 12:11:45 UTC (rev 112383)
@@ -1,3 +1,27 @@
+2012-03-28 Ádám Kallai <[email protected]>
+
+ [Qt] run-qtwebkit-tests should report crashes
+ https://bugs.webkit.org/show_bug.cgi?id=76905
+
+ Added checking of crashing tests. Now final summary includes the total number of crashing tests too.
+ Made unit test for this modification by János Badics <[email protected]>.
+
+ Reviewed by Csaba Osztrogonác.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunQtAPITests.commandComplete):
+ (RunQtAPITests.evaluateCommand):
+ * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
+ (RunQtAPITestsTest):
+ (test_failure):
+ (test_crash):
+ * Scripts/run-qtwebkit-tests:
+ (Main.announce_results_html):
+ (Main):
+ (Main.check_crash_occurences):
+ (Main.convert_to_stdout):
+ (Main.convert_to_html):
+
2012-03-28 Kwonjin Jeong <[email protected]>
Add support for Intel compiler on Linux QT port.
Modified: trunk/Tools/Scripts/run-qtwebkit-tests (112382 => 112383)
--- trunk/Tools/Scripts/run-qtwebkit-tests 2012-03-28 10:41:18 UTC (rev 112382)
+++ trunk/Tools/Scripts/run-qtwebkit-tests 2012-03-28 12:11:45 UTC (rev 112383)
@@ -271,25 +271,46 @@
if self._options.open_results:
Popen(self._options.browser + " " + self._options.output_file, stdout=None, stderr=None, shell=True)
+ def check_crash_occurences(self, results):
+ """ Checks if any test crashes and it sums them """
+ totals = [0,0,0]
+ crash_count = 0
+ txt = []
+ #collecting results into one container with checking crash
+ for result in results:
+ found = None
+ if result.output():
+ txt.append(result.output())
+ found = re.search(r"([0-9]+) passed, ([0-9]+) failed, ([0-9]+) skipped", result.output())
+
+ if found:
+ totals = reduce(lambda x, y: (int(x[0]) + int(y[0]), int(x[1]) + int(y[1]), int(x[2]) + int(y[2])), (totals, found.groups()))
+ else:
+ txt.append('CRASHED: %s' % result.test_file_name())
+ crash_count += 1
+ self.warn("Missing sub-summary: %s" % result.test_file_name())
+
+ txt='\n\n'.join(txt)
+
+ totals = list(totals)
+ totals.append(crash_count)
+ totals = map(str, totals)
+ return txt, totals
+
def convert_to_stdout(self, results):
""" Converts results, that they could be nicely presented in the stdout. """
- # Join all results into one piece.
- txt = "\n\n".join(map(lambda w: w.output(), results))
- # Find total count of failed, skipped and passed tests.
- totals = re.findall(r"([0-9]+) passed, ([0-9]+) failed, ([0-9]+) skipped", txt)
- totals = reduce(lambda x, y: (int(x[0]) + int(y[0]), int(x[1]) + int(y[1]), int(x[2]) + int(y[2])), totals)
- totals = map(str, totals)
- totals = totals[0] + " passed, " + totals[1] + " failed, " + totals[2] + " skipped"
- # Add a summary.
- txt += '\n\n\n' + '*' * 70
+ txt, totals = self.check_crash_occurences(results)
+
+ totals = "%s passed, %s failed, %s skipped, %s crashed" % (totals[0], totals[1], totals[2], totals[3])
+
+ txt += '\n' + '*' * 70
txt += "\n**" + ("TOTALS: " + totals).center(66) + '**'
txt += '\n' + '*' * 70 + '\n'
return txt
def convert_to_html(self, results):
""" Converts results, that they could showed as a html page. """
- # Join results into one piece.
- txt = "\n\n".join(map(lambda w: w.output(), results))
+ txt, totals = self.check_crash_occurences(results)
txt = txt.replace('&', '&').replace('<', "<").replace('>', ">")
# Add a color and a style.
txt = re.sub(r"([* ]+(Finished)[ a-z_A-Z0-9]+[*]+)",
@@ -322,17 +343,14 @@
txt = re.sub(r"\n(RESULT)((.)+)",
lambda w: "</case>\n<case class='good'><br><status class='benchmark'>" + w.group(1) + r"</status>" + w.group(2),
txt)
- txt = re.sub(r"\n(QFATAL)((.)+)",
+ txt = re.sub(r"\n(QFATAL|CRASHED)((.)+)",
lambda w: "</case>\n<case class='bad'><br><status class='crash'>" + w.group(1) + r"</status>" + w.group(2),
txt)
txt = re.sub(r"\n(Totals:)([0-9', a-z]*)",
lambda w: "</case>\n<case class='good'><br><b>" + w.group(1) + r"</b>" + w.group(2) + "</case>",
txt)
- # Find total count of failed, skipped and passed tests.
- totals = re.findall(r"([0-9]+) passed, ([0-9]+) failed, ([0-9]+) skipped", txt)
- totals = reduce(lambda x, y: (int(x[0]) + int(y[0]), int(x[1]) + int(y[1]), int(x[2]) + int(y[2])), totals)
- totals = map(str, totals)
- totals = totals[0] + " passed, " + totals[1] + " failed, " + totals[2] + " skipped."
+ # Find total count of failed, skipped, passed and crashed tests.
+ totals = "%s passed, %s failed, %s skipped, %s crashed." % (totals[0], totals[1], totals[2], totals[3])
# Create a header of the html source.
txt = """
<html>