Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg (108245 => 108246)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2012-02-20 16:50:26 UTC (rev 108245)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2012-02-20 16:57:51 UTC (rev 108246)
@@ -576,6 +576,10 @@
]
def evaluateCommand(self, cmd):
+ if re.findall("Timeout, process", cmd.logs['stdio'].getText()):
+ self.statusLine = ["Failure: timeout occured during testing"]
+ return FAILURE
+
if self.incorrectTests:
return WARNINGS
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py (108245 => 108246)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2012-02-20 16:50:26 UTC (rev 108245)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2012-02-20 16:57:51 UTC (rev 108246)
@@ -78,6 +78,108 @@
self.logs = {'stdio': StubStdio(stdio)}
+class RunQtAPITestsTest(unittest.TestCase):
+ def assertResults(self, expected_result, expected_text, stdio):
+ rc = 0
+ cmd = StubRemoteCommand(rc, stdio)
+ step = RunQtAPITests()
+ step.commandComplete(cmd)
+ actual_results = step.evaluateCommand(cmd)
+ actual_text = str(step.getText2(cmd, actual_results)[0])
+
+ self.assertEqual(expected_result, actual_results)
+ self.assertEqual(actual_text, expected_text)
+
+ def test_timeout(self):
+ self.assertResults(FAILURE, "API tests", """INFO:Exec:Running... WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview
+INFO:Exec:Running... WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qmltests/tst_qmltests
+Qml debugging is enabled. Only use this in a safe environment!
+INFO:Exec:Finished WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview
+ERROR:Exec:Timeout, process 'WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qmltests/tst_qmltests' (2336) was terminated
+INFO:Exec:Finished WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qmltests/tst_qmltests
+********* Start testing of tst_QQuickWebView *********
+Config: Using QTest library 5.0.0, Qt 5.0.0
+PASS : tst_QQuickWebView::initTestCase()
+QWARN : tst_QQuickWebView::accessPage() QQuickCanvas: platform does not support threaded rendering!
+.
+.
+.
+
+**********************************************************************
+** TOTALS: 16 passed, 0 failed, 0 skipped **
+**********************************************************************""")
+
+ def test_success(self):
+ self.assertResults(SUCCESS, "API tests", """INFO:Exec:Running... WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview
+INFO:Exec:Running... WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qmltests/tst_qmltests
+Qml debugging is enabled. Only use this in a safe environment!
+INFO:Exec:Finished WebKitBuild/Release/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview
+********* Start testing of tst_QQuickWebView *********
+Config: Using QTest library 5.0.0, Qt 5.0.0
+PASS : tst_QQuickWebView::initTestCase()
+QWARN : tst_QQuickWebView::accessPage() QQuickCanvas: platform does not support threaded rendering!
+.
+.
+.
+
+**********************************************************************
+** TOTALS: 16 passed, 0 failed, 0 skipped **
+**********************************************************************""")
+
+ def test_failure(self):
+ self.assertResults(WARNINGS, "16 passed, 1 failed, 0 skipped", """********* Start testing of tst_QDeclarativeWebView *********
+PASS : tst_QDeclarativeWebView::pressGrabTime()
+PASS : tst_QDeclarativeWebView::renderingEnabled()
+PASS : tst_QDeclarativeWebView::setHtml()
+PASS : tst_QDeclarativeWebView::settings()
+FAIL! : tst_QDeclarativeWebView::backgroundColor() Compared values are not the same
+ Loc: [/ramdisk/qt-linux-release/build/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp(532)]
+PASS : tst_QDeclarativeWebView::cleanupTestCase()
+.
+.
+.
+
+**********************************************************************
+** TOTALS: 16 passed, 1 failed, 0 skipped **
+**********************************************************************""")
+
+ def test_timeout_and_failure(self):
+ self.assertResults(FAILURE, "Failure: timeout occured during testing", """INFO:Exec:Finished WebKitBuild/Release/Source/WebKit/qt/tests/benchmarks/painting/tst_painting
+ERROR:Exec:Timeout, process 'WebKitBuild/Release/Source/WebKit/qt/tests/qwebpage/tst_qwebpage' (13000) was terminated
+INFO:Exec:Finished WebKitBuild/Release/Source/WebKit/qt/tests/qwebpage/tst_qwebpage
+********* Start testing of tst_Loading *********
+Config: Using QTest library 4.8.0, Qt 4.8.0
+PASS : tst_Loading::initTestCase()
+QDEBUG : tst_Loading::load(amazon) loaded the Generic plugin
+RESULT : tst_Loading::load():"amazon":
+ 1,843 msecs per iteration (total: 1,843, iterations: 1)
+RESULT : tst_Loading::load():"kde":
+ 139 msecs per iteration (total: 139, iterations: 1)
+RESULT : tst_Loading::load():"apple":
+ 740 msecs per iteration (total: 740, iterations: 1)
+PASS : tst_Loading::load()
+PASS : tst_Loading::cleanupTestCase()
+Totals: 3 passed, 0 failed, 0 skipped
+********* Finished testing of tst_Loading *********
+.
+.
+.
+PASS : tst_QDeclarativeWebView::renderingEnabled()
+PASS : tst_QDeclarativeWebView::setHtml()
+PASS : tst_QDeclarativeWebView::settings()
+FAIL! : tst_QDeclarativeWebView::backgroundColor() Compared values are not the same
+ Loc: [/ramdisk/qt-linux-release/build/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp(532)]
+PASS : tst_QDeclarativeWebView::cleanupTestCase()
+Totals: 16 passed, 3 failed, 1 skipped
+.
+.
+.
+**********************************************************************
+** TOTALS: 73 passed, 3 failed, 1 skipped **
+**********************************************************************""")
+
+
+
class RunUnitTestsTest(unittest.TestCase):
def assertFailures(self, expected_failure_count, stdio):
if expected_failure_count:
Modified: trunk/Tools/ChangeLog (108245 => 108246)
--- trunk/Tools/ChangeLog 2012-02-20 16:50:26 UTC (rev 108245)
+++ trunk/Tools/ChangeLog 2012-02-20 16:57:51 UTC (rev 108246)
@@ -1,3 +1,23 @@
+2012-02-20 János Badics <[email protected]>
+
+ [Qt] run-qtwebkit-tests doesn't consider timeouts as failures
+ https://bugs.webkit.org/show_bug.cgi?id=71816
+
+ RunQtAPITests will notify if a timeout occurs during testing.
+ Added unittest to the master.cfg
+
+ Reviewed by Csaba Osztrogonác.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunQtAPITests.evaluateCommand):
+ * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
+ (RunQtAPITestsTest):
+ (RunQtAPITestsTest.assertResults):
+ (RunQtAPITestsTest.test_timeout):
+ (test_success):
+ (test_failure):
+ (test_timeout_and_failure):
+
2012-02-20 Andy Wingo <[email protected]>
Add wingo as a committer.