Changeset 243177 in webkit
- Timestamp:
- Mar 19, 2019, 4:02:26 PM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
BuildSlaveSupport/ews-build/steps.py (modified) (2 diffs)
-
ChangeLog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/ews-build/steps.py
r243174 r243177 757 757 name = 'configuration' 758 758 description = ['configuration'] 759 descriptionDone = ['configuration']760 759 haltOnFailure = False 761 760 flunkOnFailure = False 762 761 warnOnFailure = False 762 logEnviron = False 763 763 command_list = [['hostname'], 764 764 ['df', '-hl'], … … 770 770 super(PrintConfiguration, self).__init__(timeout=60, **kwargs) 771 771 self.commands = [] 772 self.log_observer = logobserver.BufferLogObserver(wantStderr=True) 773 self.addLogObserver('stdio', self.log_observer) 772 774 # FIXME: Check platform before running platform specific commands. 773 775 for command in self.command_list: 774 self.commands.append(util.ShellArg(command=command, logfile=command[0])) 776 self.commands.append(util.ShellArg(command=command, logfile='stdio')) 777 778 def convert_build_to_os_name(self, build): 779 if not build: 780 return 'Unknown' 781 782 build_to_name_mapping = { 783 '10.14': 'Mojave', 784 '10.13': 'High Sierra', 785 '10.12': 'Sierra', 786 '10.11': 'El Capitan', 787 '10.10': 'Yosemite', 788 '10.9': 'Maverick', 789 '10.8': 'Mountain Lion', 790 '10.7': 'Lion', 791 '10.6': 'Snow Leopard', 792 '10.5': 'Leopard', 793 } 794 795 for key, value in build_to_name_mapping.iteritems(): 796 if build.startswith(key): 797 return value 798 return 'Unknown' 799 800 def getResultSummary(self): 801 if self.results != SUCCESS: 802 return {u'step': u'Failed to print configuration'} 803 logText = self.log_observer.getStdout() + self.log_observer.getStderr() 804 configuration = u'' 805 match = re.search('ProductVersion:[ \t]*(.+?)\n', logText) 806 if match: 807 os_version = match.group(1).strip() 808 os_name = self.convert_build_to_os_name(os_version) 809 configuration = u'OS: {} ({})'.format(os_name, os_version) 810 811 sdk_re = 'MacOSX[\s\S]*?SDKVersion:[ \t]*(.+?)\n' 812 is_ios_builder = 'iOS' in self.getProperty('buildername', '') 813 if is_ios_builder: 814 sdk_re = 'iPhoneSimulator[\s\S]*?SDKVersion:[ \t]*(.+?)\n' 815 match = re.search(sdk_re, logText) 816 if match: 817 xcode_version = match.group(1).strip() 818 configuration += u', Xcode: {}'.format(xcode_version) 819 return {u'step': configuration} -
trunk/Tools/ChangeLog
r243174 r243177 1 2019-03-19 Aakash Jain <aakash_jain@apple.com> 2 3 [ews-build] Improve summary for PrintConfiguration step 4 https://bugs.webkit.org/show_bug.cgi?id=195945 5 6 Reviewed by Lucas Forschler. 7 8 * BuildSlaveSupport/ews-build/steps.py: 9 (PrintConfiguration.getResultSummary): Override getResultSummary. 10 1 11 2019-03-19 Aakash Jain <aakash_jain@apple.com> 2 12
Note:
See TracChangeset
for help on using the changeset viewer.