Changeset 269786 in webkit
- Timestamp:
- Nov 13, 2020, 10:22:32 AM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
CISupport/build-webkit-org/steps.py (modified) (7 diffs)
-
ChangeLog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/CISupport/build-webkit-org/steps.py
r269781 r269786 45 45 Interpolate = properties.Interpolate 46 46 from buildbot.process import logobserver 47 from buildbot.process.results import Results 47 48 from buildbot.steps.source.svn import SVN 48 49 else: … … 92 93 93 94 def getText(self, cmd, results): 95 # FIXME: delete this method after switching to Buildbot v2 94 96 return self.getText2(cmd, results) 95 97 96 98 def getText2(self, cmd, results): 99 # FIXME: delete this method after switching to Buildbot v2 97 100 if results != SUCCESS and self.failedTestCount: 98 101 return [self.failedTestsFormatString % (self.failedTestCount, self.failedTestPluralSuffix)] 99 102 100 103 return [self.name] 104 105 def getResultSummary(self): 106 status = self.name 107 108 if self.results != SUCCESS: 109 if self.failedTestCount: 110 status = self.failedTestsFormatString % (self.failedTestCount, self.failedTestPluralSuffix) 111 else: 112 status += ' ({})'.format(Results[self.results]) 113 114 return {'step': status} 101 115 102 116 … … 618 632 619 633 if self.results != SUCCESS and self.incorrectLayoutLines: 620 status = u' '.join(self.incorrectLayoutLines)621 return { u'step': status}634 status = ' '.join(self.incorrectLayoutLines) 635 return {'step': status} 622 636 return super(RunWebKitTests, self).getResultSummary() 623 637 … … 665 679 ] 666 680 failedTestsFormatString = "%d api test%s failed or timed out" 681 test_summary_re = re.compile(r'Ran (?P<ran>\d+) tests of (?P<total>\d+) with (?P<passed>\d+) successful') 667 682 668 683 def __init__(self, *args, **kwargs): … … 673 688 if USE_BUILDBOT_VERSION2: 674 689 self.workerEnvironment[RESULTS_SERVER_API_KEY] = os.getenv(RESULTS_SERVER_API_KEY) 690 self.log_observer = ParseByLineLogObserver(self.parseOutputLine) 691 self.addLogObserver('stdio', self.log_observer) 692 self.failedTestCount = 0 675 693 else: 676 694 self.slaveEnvironment[RESULTS_SERVER_API_KEY] = os.getenv(RESULTS_SERVER_API_KEY) … … 679 697 680 698 def countFailures(self, cmd): 699 if USE_BUILDBOT_VERSION2: 700 return self.failedTestCount 701 681 702 log_text = cmd.logs['stdio'].getText() 682 703 … … 685 706 return -1 686 707 return int(match.group('ran')) - int(match.group('passed')) 708 709 def parseOutputLine(self, line): 710 match = self.test_summary_re.match(line) 711 if match: 712 self.failedTestCount = int(match.group('ran')) - int(match.group('passed')) 687 713 688 714 -
trunk/Tools/ChangeLog
r269785 r269786 1 2020-11-13 Aakash Jain <aakash_jain@apple.com> 2 3 [build.webkit.org] Update RunAPITests step for new buildbot 4 https://bugs.webkit.org/show_bug.cgi?id=218907 5 6 Reviewed by Jonathan Bedard. 7 8 * CISupport/build-webkit-org/steps.py: 9 (TestWithFailureCount.getText): Added FIXME to remove this method after switching to buildbot v2. 10 (TestWithFailureCount.getText2): Added FIXME to remove this method after switching to buildbot v2. 11 (TestWithFailureCount.getResultSummary): Method to generate custom step summary. 12 (RunWebKitTests.getResultSummary): Removed unnecessary u'', python3 defaults to unicode anyways. 13 (RunAPITests): 14 (RunAPITests.start): Use ParseByLineLogObserver. 15 (RunAPITests.countFailures): 16 (RunAPITests.parseOutputLine): Method to process each line. 17 1 18 2020-11-12 Darin Adler <darin@apple.com> 2 19
Note:
See TracChangeset
for help on using the changeset viewer.