Title: [179342] trunk/Tools
Revision
179342
Author
[email protected]
Date
2015-01-29 05:32:25 -0800 (Thu, 29 Jan 2015)

Log Message

[buildbot] Simplify jscore-test buildstep
https://bugs.webkit.org/show_bug.cgi?id=140821

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunJavaScriptCoreTests): Inherited from TestWithFailureCount and removed useless actual.html logfile.
(RunJavaScriptCoreTests.countFailures): Added.
(RunJavaScriptCoreTests.commandComplete): Deleted.
(RunJavaScriptCoreTests.evaluateCommand): Deleted.
(RunJavaScriptCoreTests.getText): Deleted.
(RunJavaScriptCoreTests.getText2): Deleted.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Updated.
(RunJavaScriptCoreTestsTest.test_mozilla_failure_old_output):
(RunJavaScriptCoreTestsTest.test_mozilla_failures_old_output):
(RunJavaScriptCoreTestsTest.test_jsc_stress_failure_new_output):
(RunJavaScriptCoreTestsTest.test_jsc_stress_failures_new_output):

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg (179341 => 179342)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg	2015-01-29 12:09:46 UTC (rev 179341)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg	2015-01-29 13:32:25 UTC (rev 179342)
@@ -279,12 +279,12 @@
     flunkOnFailure = True
 
 
-class RunJavaScriptCoreTests(shell.Test):
+class RunJavaScriptCoreTests(TestWithFailureCount):
     name = "jscore-test"
     description = ["jscore-tests running"]
     descriptionDone = ["jscore-tests"]
     command = ["perl", "./Tools/Scripts/run-_javascript_core-tests", WithProperties("--%(configuration)s")]
-    logfiles = {'actual.html (source)': 'Source/_javascript_Core/tests/mozilla/actual.html'}
+    failedTestsFormatString = "%d JSC test%s failed"
 
     def __init__(self, buildJSCTool=True, *args, **kwargs):
         self.buildJSCTool = buildJSCTool
@@ -297,52 +297,19 @@
             self.setCommand(self.command + ['--no-build'])
         return shell.Test.start(self)
 
-    def commandComplete(self, cmd):
-        shell.Test.commandComplete(self, cmd)
+    def countFailures(self, cmd):
         logText = cmd.logs['stdio'].getText()
 
-        expressions = [
-            ('failing Mozilla test', re.compile(r'^Results for Mozilla tests:\r?\n\s+(\d+) regression', re.MULTILINE)),
-            ('failing JSC stress test', re.compile(r'^Results for JSC stress tests:\r?\n\s+(\d+) failure', re.MULTILINE)),
-        ]
-        resultLines = {}
+        match = re.search(r'^Results for JSC stress tests:\r?\n\s+(\d+) failure', logText, re.MULTILINE)
+        if match:
+            return int(match.group(1))
 
-        for name, _expression_ in expressions:
-            match = _expression_.search(logText)
-            resultLines[name] = int(match.group(1)) if match else 0
+        match = re.search(r'^Results for Mozilla tests:\r?\n\s+(\d+) regression', logText, re.MULTILINE)
+        if match:
+            return int(match.group(1))
 
-        self.regressionLine = []
-        for name in resultLines:
-            failures = resultLines[name]
-            if not failures:
-                continue
+        return 0
 
-            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())
-
-    def evaluateCommand(self, cmd):
-        if self.regressionLine:
-            return FAILURE
-
-        if cmd.rc != 0:
-            return FAILURE
-
-        return SUCCESS
-
-    def getText(self, cmd, results):
-        return self.getText2(cmd, results)
-
-    def getText2(self, cmd, results):
-        result = [self.name]
-        result.extend(self.regressionLine)
-        return result
-
 class RunWebKitTests(shell.Test):
     name = "layout-test"
     description = ["layout-tests running"]

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py (179341 => 179342)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py	2015-01-29 12:09:46 UTC (rev 179341)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py	2015-01-29 13:32:25 UTC (rev 179342)
@@ -122,21 +122,21 @@
     OK.""")
 
     def test_mozilla_failure_old_output(self):
-        self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test '], 1, """Results for Mozilla tests:
+        self.assertResults(FAILURE, ["1 JSC test failed"], 1, """Results for Mozilla tests:
     1 regression found.
     0 tests fixed.""")
 
     def test_mozilla_failures_old_output(self):
-        self.assertResults(FAILURE, ["jscore-test", '2 failing Mozilla tests '], 1, """Results for Mozilla tests:
+        self.assertResults(FAILURE, ["2 JSC tests failed"], 1, """Results for Mozilla tests:
     2 regressions found.
     0 tests fixed.""")
 
     def test_jsc_stress_failure_new_output(self):
-        self.assertResults(FAILURE, ["jscore-test", '1 failing JSC stress test '], 1,  """Results for JSC stress tests:
+        self.assertResults(FAILURE, ["1 JSC test failed"], 1,  """Results for JSC stress tests:
     1 failure found.""")
 
     def test_jsc_stress_failures_new_output(self):
-        self.assertResults(FAILURE, ["jscore-test", '5 failing JSC stress tests '], 1,  """Results for JSC stress tests:
+        self.assertResults(FAILURE, ["5 JSC tests failed"], 1,  """Results for JSC stress tests:
     5 failures found.""")
 
 

Modified: trunk/Tools/ChangeLog (179341 => 179342)


--- trunk/Tools/ChangeLog	2015-01-29 12:09:46 UTC (rev 179341)
+++ trunk/Tools/ChangeLog	2015-01-29 13:32:25 UTC (rev 179342)
@@ -1,5 +1,25 @@
 2015-01-29  Csaba Osztrogonác  <[email protected]>
 
+        [buildbot] Simplify jscore-test buildstep
+        https://bugs.webkit.org/show_bug.cgi?id=140821
+
+        Reviewed by Alexey Proskuryakov.
+
+        * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+        (RunJavaScriptCoreTests): Inherited from TestWithFailureCount and removed useless actual.html logfile.
+        (RunJavaScriptCoreTests.countFailures): Added.
+        (RunJavaScriptCoreTests.commandComplete): Deleted.
+        (RunJavaScriptCoreTests.evaluateCommand): Deleted.
+        (RunJavaScriptCoreTests.getText): Deleted.
+        (RunJavaScriptCoreTests.getText2): Deleted.
+        * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Updated.
+        (RunJavaScriptCoreTestsTest.test_mozilla_failure_old_output):
+        (RunJavaScriptCoreTestsTest.test_mozilla_failures_old_output):
+        (RunJavaScriptCoreTestsTest.test_jsc_stress_failure_new_output):
+        (RunJavaScriptCoreTestsTest.test_jsc_stress_failures_new_output):
+
+2015-01-29  Csaba Osztrogonác  <[email protected]>
+
         Unreviewed, revert r179337, we don't need this dependency.
 
         * efl/install-dependencies:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to