Changeset 155124 in webkit


Ignore:
Timestamp:
Sep 5, 2013 9:42:00 AM (11 years ago)
Author:
Csaba Osztrogonác
Message:

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):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg

    r151231 r155124  
    258258    def commandComplete(self, cmd):
    259259        shell.Test.commandComplete(self, cmd)
    260 
    261260        logText = cmd.logs['stdio'].getText()
    262         statusLines = [line for line in logText.splitlines() if line.find('regression') >= 0 and line.find(' found.') >= 0]
    263         if statusLines and statusLines[0].split()[0] != '0':
    264             self.regressionLine = statusLines[0]
    265         else:
    266             self.regressionLine = None
     261
     262        expressions = [
     263            ('failing Mozilla test', re.compile(r'(\d+) regression')),
     264            ('failing fast/js test', re.compile(r'(\d+) failure')),
     265            ('crashing fast/js test', re.compile(r'(\d+) crash')),
     266        ]
     267        resultLines = {}
     268
     269        for line in logText.splitlines():
     270            for name, expression in expressions:
     271                match = expression.search(line)
     272                if match:
     273                    resultLines[name] = int(match.group(1))
     274                    break
     275
     276        self.regressionLine = []
     277        for name in resultLines:
     278            failures = resultLines[name]
     279            if not failures:
     280                continue
     281
     282            if failures == 1:
     283                pluralSuffix = ''
     284            else:
     285                pluralSuffix = 's'
     286            self.regressionLine.append("%d %s%s " % (failures, name, pluralSuffix))
    267287
    268288        if 'actual.html (source)' in cmd.logs:
     
    282302
    283303    def getText2(self, cmd, results):
    284         if results != SUCCESS and self.regressionLine:
    285             return [self.name, self.regressionLine]
    286 
    287         return [self.name]
    288 
     304        result = [self.name]
     305        result.extend(self.regressionLine)
     306        return result
    289307
    290308class RunWebKitTests(shell.Test):
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py

    r139505 r155124  
    100100        self.rc = rc
    101101        self.logs = {'stdio': StubStdio(stdio)}
     102
     103
     104class RunJavaScriptCoreTestsTest(unittest.TestCase):
     105    def assertResults(self, expected_result, expected_text, rc, stdio):
     106        cmd = StubRemoteCommand(rc, stdio)
     107        step = RunJavaScriptCoreTests()
     108        step.commandComplete(cmd)
     109        actual_results = step.evaluateCommand(cmd)
     110        actual_text = step.getText2(cmd, actual_results)
     111
     112        self.assertEqual(expected_result, actual_results)
     113        self.assertEqual(actual_text, expected_text)
     114
     115    def test_no_regressions_old_output(self):
     116        self.assertResults(SUCCESS, ["jscore-test"], 0, """Results for Mozilla tests:
     117    0 regressions found.
     118    0 tests fixed.
     119    OK.""")
     120
     121    def test_mozilla_failure_old_output(self):
     122        self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test '], 1, """Results for Mozilla tests:
     123    1 regression found.
     124    0 tests fixed.""")
     125
     126    def test_mozilla_failure_new_output(self):
     127        self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test '], 1, """Results for Mozilla tests:
     128    1 regression found.
     129    0 tests fixed.
     130
     131Results for fast/js tests:
     132    0 failures found.
     133    0 crashes found.
     134    OK.""")
     135
     136    def test_fast_js_failure_new_output(self):
     137        self.assertResults(FAILURE, ["jscore-test", '469 failing fast/js tests '], 1,  """Results for Mozilla tests:
     138    0 regressions found.
     139    0 tests fixed.
     140    OK.
     141
     142Results for fast/js tests:
     143    469 failures found.
     144    0 crashes found.""")
     145
     146    def test_fast_js_crash_new_output(self):
     147        self.assertResults(FAILURE, ["jscore-test", '1 crashing fast/js test '], 1,  """Results for Mozilla tests:
     148    0 regressions found.
     149    0 tests fixed.
     150    OK.
     151
     152Results for fast/js tests:
     153    0 failures found.
     154    1 crashes found.""")
     155
     156    def test_mozilla_and_fast_js_failure_new_output(self):
     157        self.assertResults(FAILURE, ["jscore-test", '1 failing Mozilla test ', '469 failing fast/js tests '], 1,  """Results for Mozilla tests:
     158    1 regression found.
     159    0 tests fixed.
     160
     161Results for fast/js tests:
     162    469 failures found.
     163    0 crashes found.""")
    102164
    103165
  • trunk/Tools/ChangeLog

    r155118 r155124  
     12013-09-05  Csaba Osztrogonác  <ossy@webkit.org>
     2
     3        Make build.webkit.org report the number of failing run-fast-jsc tests
     4        https://bugs.webkit.org/show_bug.cgi?id=120766
     5
     6        Reviewed by Filip Pizlo.
     7
     8        * BuildSlaveSupport/build.webkit.org-config/master.cfg:
     9        (RunJavaScriptCoreTests.commandComplete):
     10        (RunJavaScriptCoreTests.getText2):
     11        * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
     12        (RunJavaScriptCoreTestsTest): Added.
     13        (RunJavaScriptCoreTestsTest.assertResults):
     14        (RunJavaScriptCoreTestsTest.test_no_regressions_old_output):
     15        (RunJavaScriptCoreTestsTest.test_mozilla_failure_old_output):
     16        (RunJavaScriptCoreTestsTest.test_mozilla_failure_new_output):
     17        (RunJavaScriptCoreTestsTest.test_fast_js_failure_new_output):
     18        (RunJavaScriptCoreTestsTest.test_fast_js_crash_new_output):
     19        (RunJavaScriptCoreTestsTest.test_mozilla_and_fast_js_failure_new_output):
     20
    1212013-09-05  Csaba Osztrogonác  <ossy@webkit.org>
    222
Note: See TracChangeset for help on using the changeset viewer.