Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg (155123 => 155124)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2013-09-05 16:28:15 UTC (rev 155123)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg 2013-09-05 16:42:00 UTC (rev 155124)
@@ -257,14 +257,34 @@
def commandComplete(self, cmd):
shell.Test.commandComplete(self, cmd)
-
logText = cmd.logs['stdio'].getText()
- statusLines = [line for line in logText.splitlines() if line.find('regression') >= 0 and line.find(' found.') >= 0]
- if statusLines and statusLines[0].split()[0] != '0':
- self.regressionLine = statusLines[0]
- else:
- self.regressionLine = None
+ expressions = [
+ ('failing Mozilla test', re.compile(r'(\d+) regression')),
+ ('failing fast/js test', re.compile(r'(\d+) failure')),
+ ('crashing fast/js test', re.compile(r'(\d+) crash')),
+ ]
+ resultLines = {}
+
+ for line in logText.splitlines():
+ for name, _expression_ in expressions:
+ match = _expression_.search(line)
+ if match:
+ resultLines[name] = int(match.group(1))
+ break
+
+ self.regressionLine = []
+ for name in resultLines:
+ failures = resultLines[name]
+ if not failures:
+ continue
+
+ if failures == 1:
+ pluralSuffix = ''
+ else:
+ pluralSuffix = 's'
+ self.regressionLine.append("%d %s%s " % (failures, name, pluralSuffix))
+
if 'actual.html (source)' in cmd.logs:
self.addHTMLLog('actual.html', cmd.logs['actual.html (source)'].getText())
@@ -281,12 +301,10 @@
return self.getText2(cmd, results)
def getText2(self, cmd, results):
- if results != SUCCESS and self.regressionLine:
- return [self.name, self.regressionLine]
+ result = [self.name]
+ result.extend(self.regressionLine)
+ return result
- return [self.name]
-
-
class RunWebKitTests(shell.Test):
name = "layout-test"
description = ["layout-tests running"]
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py (155123 => 155124)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2013-09-05 16:28:15 UTC (rev 155123)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py 2013-09-05 16:42:00 UTC (rev 155124)
@@ -101,6 +101,68 @@
self.logs = {'stdio': StubStdio(stdio)}
+class RunJavaScriptCoreTestsTest(unittest.TestCase):
+ def assertResults(self, expected_result, expected_text, rc, stdio):
+ cmd = StubRemoteCommand(rc, stdio)
+ step = RunJavaScriptCoreTests()
+ step.commandComplete(cmd)
+ actual_results = step.evaluateCommand(cmd)
+ actual_text = step.getText2(cmd, actual_results)
+
+ self.assertEqual(expected_result, actual_results)
+ self.assertEqual(actual_text, expected_text)
+
+ def test_no_regressions_old_output(self):
+ self.assertResults(SUCCESS, ["jscore-test"], 0, """Results for Mozilla tests:
+ 0 regressions found.
+ 0 tests fixed.
+ OK.""")
+
+ def test_mozilla_failure_old_output(self):
+ self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test '], 1, """Results for Mozilla tests:
+ 1 regression found.
+ 0 tests fixed.""")
+
+ def test_mozilla_failure_new_output(self):
+ self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test '], 1, """Results for Mozilla tests:
+ 1 regression found.
+ 0 tests fixed.
+
+Results for fast/js tests:
+ 0 failures found.
+ 0 crashes found.
+ OK.""")
+
+ def test_fast_js_failure_new_output(self):
+ self.assertResults(FAILURE, ["jscore-test", '469 failing fast/js tests '], 1, """Results for Mozilla tests:
+ 0 regressions found.
+ 0 tests fixed.
+ OK.
+
+Results for fast/js tests:
+ 469 failures found.
+ 0 crashes found.""")
+
+ def test_fast_js_crash_new_output(self):
+ self.assertResults(FAILURE, ["jscore-test", '1 crashing fast/js test '], 1, """Results for Mozilla tests:
+ 0 regressions found.
+ 0 tests fixed.
+ OK.
+
+Results for fast/js tests:
+ 0 failures found.
+ 1 crashes found.""")
+
+ def test_mozilla_and_fast_js_failure_new_output(self):
+ self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test ', '469 failing fast/js tests '], 1, """Results for Mozilla tests:
+ 1 regression found.
+ 0 tests fixed.
+
+Results for fast/js tests:
+ 469 failures found.
+ 0 crashes found.""")
+
+
class RunQtAPITestsTest(unittest.TestCase):
def assertResults(self, expected_result, expected_text, stdio):
rc = 0
Modified: trunk/Tools/ChangeLog (155123 => 155124)
--- trunk/Tools/ChangeLog 2013-09-05 16:28:15 UTC (rev 155123)
+++ trunk/Tools/ChangeLog 2013-09-05 16:42:00 UTC (rev 155124)
@@ -1,5 +1,25 @@
2013-09-05 Csaba Osztrogonác <[email protected]>
+ Make build.webkit.org report the number of failing run-fast-jsc tests
+ https://bugs.webkit.org/show_bug.cgi?id=120766
+
+ Reviewed by Filip Pizlo.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunJavaScriptCoreTests.commandComplete):
+ (RunJavaScriptCoreTests.getText2):
+ * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
+ (RunJavaScriptCoreTestsTest): Added.
+ (RunJavaScriptCoreTestsTest.assertResults):
+ (RunJavaScriptCoreTestsTest.test_no_regressions_old_output):
+ (RunJavaScriptCoreTestsTest.test_mozilla_failure_old_output):
+ (RunJavaScriptCoreTestsTest.test_mozilla_failure_new_output):
+ (RunJavaScriptCoreTestsTest.test_fast_js_failure_new_output):
+ (RunJavaScriptCoreTestsTest.test_fast_js_crash_new_output):
+ (RunJavaScriptCoreTestsTest.test_mozilla_and_fast_js_failure_new_output):
+
+2013-09-05 Csaba Osztrogonác <[email protected]>
+
Make run-fast-jsc script bash, dash and Darwin's /bin/sh friendly
https://bugs.webkit.org/show_bug.cgi?id=120759