WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-217958-20201020114047.patch (text/plain), 4.80 KB, created by
Aakash Jain
on 2020-10-20 08:40:48 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2020-10-20 08:40:48 PDT
Size:
4.80 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 268730) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,23 @@ >+2020-10-20 Aakash Jain <aakash_jain@apple.com> >+ >+ [build.webkit.org] Use builder tags instead of category for latest buildbot >+ https://bugs.webkit.org/show_bug.cgi?id=217958 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/build.webkit.org-config/loadConfig.py: >+ (loadBuilderConfig): >+ (PlatformSpecificScheduler.filter): >+ (getInvalidTags): >+ (getValidTags): >+ (getTagsForBuilder): >+ * BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py: Added unit-tests, copied from EWS code. >+ (TagsForBuilderTest): >+ (TagsForBuilderTest.verifyTags): >+ (TagsForBuilderTest.test_getTagsForBuilder): >+ (TagsForBuilderTest.test_tags_type): >+ (TagsForBuilderTest.test_getInvalidTags): >+ > 2020-10-20 Philippe Normand <pnormand@igalia.com> > > Unreviewed, partial revert of r268721. >Index: Tools/BuildSlaveSupport/build.webkit.org-config/loadConfig.py >=================================================================== >--- Tools/BuildSlaveSupport/build.webkit.org-config/loadConfig.py (revision 268730) >+++ Tools/BuildSlaveSupport/build.webkit.org-config/loadConfig.py (working copy) >@@ -157,7 +157,9 @@ def loadBuilderConfig(c, is_test_mode_en > if (category in ('AppleMac', 'AppleWin', 'iOS')) and factoryName != 'BuildFactory': > builder['nextBuild'] = pickLatestBuild > >- if not USE_BUILDBOT_VERSION2: >+ if USE_BUILDBOT_VERSION2: >+ builder['tags'] = getTagsForBuilder(builder) >+ else: > builder['category'] = category > c['builders'].append(builder) > >@@ -170,3 +172,23 @@ class PlatformSpecificScheduler(AnyBranc > > def filter(self, change): > return wkbuild.should_build(self.platform, change.files) >+ >+ >+def getInvalidTags(): >+ """ >+ We maintain a list of words which we do not want to display as tag in buildbot. >+ We generate a list of tags by splitting the builder name. We do not want certain words as tag. >+ For e.g. we don't want '11'as tag for builder iOS-11-Simulator-EWS >+ """ >+ tags_blacklist = [str(i) for i in xrange(0, 20)] >+ tags_blacklist.extend(['EWS', 'TryBot']) >+ return tags_blacklist >+ >+ >+def getValidTags(tags): >+ return list(set(tags) - set(getInvalidTags())) >+ >+ >+def getTagsForBuilder(builder): >+ keywords = filter(None, re.split('[, \-_:()]+', str(builder['name']))) >+ return getValidTags(keywords) >Index: Tools/BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py >=================================================================== >--- Tools/BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py (revision 268730) >+++ Tools/BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py (working copy) >@@ -27,6 +27,8 @@ import json > import os > import unittest > >+import loadConfig >+ > > class ConfigDotJSONTest(unittest.TestCase): > def get_config(self): >@@ -65,5 +67,36 @@ class ConfigDotJSONTest(unittest.TestCas > self.assertTrue(len(scheduler.get('builderNames')) == 1, 'scheduler "{}" triggers multiple builders.'.format(scheduler['name'])) > > >+class TagsForBuilderTest(unittest.TestCase): >+ def verifyTags(self, builderName, expectedTags): >+ tags = loadConfig.getTagsForBuilder({'name': builderName}) >+ self.assertEqual(sorted(tags), sorted(expectedTags)) >+ >+ def test_getTagsForBuilder(self): >+ self.verifyTags('EWS', []) >+ self.verifyTags('TryBot-10-EWS', []) >+ self.verifyTags('11-EWS', []) >+ self.verifyTags('32-EWS', ['32']) >+ self.verifyTags('iOS-11-EWS', ['iOS']) >+ self.verifyTags('iOS(11),(test)-EWS', ['iOS', 'test']) >+ self.verifyTags('Windows-EWS', ['Windows']) >+ self.verifyTags('Windows_Windows', ['Windows']) >+ self.verifyTags('GTK-Build-EWS', ['GTK', 'Build']) >+ self.verifyTags('GTK-WK2-Tests-EWS', ['GTK', 'WK2', 'Tests']) >+ self.verifyTags('macOS-Sierra-Release-WK1-EWS', ['Sierra', 'Release', 'macOS', 'WK1']) >+ self.verifyTags('macOS-High-Sierra-Release-32bit-WK2-EWS', ['macOS', 'High', 'Sierra', 'Release', 'WK2', '32bit']) >+ >+ def test_tags_type(self): >+ tags = loadConfig.getTagsForBuilder({'name': u'iOS-11-EWS'}) >+ self.assertEqual(tags, ['iOS']) >+ self.assertEqual(type(tags[0]), str) >+ >+ def test_getInvalidTags(self): >+ invalidTags = loadConfig.getInvalidTags() >+ expectedTags = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', >+ '11', '12', '13', '14', '15', '16', '17', '18', '19', 'EWS', 'TryBot'] >+ self.assertEqual(invalidTags, expectedTags) >+ >+ > if __name__ == '__main__': > unittest.main()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 217958
:
411868
|
411871