WebKit Bugzilla
Attachment 346500 Details for
Bug 188295
: [ews-build] Add build step to Check Patch Relevance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
ews_checkPatchRelevance_v2.patch (text/plain), 5.70 KB, created by
Aakash Jain
on 2018-08-03 10:08:31 PDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2018-08-03 10:08:31 PDT
Size:
5.70 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 234534) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2018-08-02 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-build] Add build step to Check Patch Relevance >+ https://bugs.webkit.org/show_bug.cgi?id=188295 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-build/steps.py: >+ (CheckPatchRelevance): Added step to check patch relevance. >+ (CheckPatchRelevance._changed_files): >+ (CheckPatchRelevance._patch_is_relevant): Checks if the patch is relevant. >+ (CheckPatchRelevance._get_patch): Retrieves the patch from buildbot. >+ (CheckPatchRelevance._addToLog): Add the log message. >+ (CheckPatchRelevance.start): >+ * BuildSlaveSupport/ews-build/factories.py: Added CheckPatchRelevance step appropriately. >+ > 2018-08-02 Nan Wang <n_wang@apple.com> > > AX: [iOS] add support to return the attributed string under the element >Index: Tools/BuildSlaveSupport/ews-build/factories.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/factories.py (revision 234534) >+++ Tools/BuildSlaveSupport/ews-build/factories.py (working copy) >@@ -45,6 +45,7 @@ class StyleFactory(Factory): > class BindingsFactory(Factory): > def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, **kwargs): > Factory.__init__(self, platform, configuration, architectures, False, additionalArguments) >+ self.addStep(CheckPatchRelevance()) > self.addStep(RunBindingsTests()) > > >@@ -57,6 +58,7 @@ class WebKitPerlFactory(Factory): > class WebKitPyFactory(Factory): > def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, **kwargs): > Factory.__init__(self, platform, configuration, architectures, False, additionalArguments) >+ self.addStep(CheckPatchRelevance()) > self.addStep(RunWebKitPyTests()) > > >@@ -86,6 +88,7 @@ class BuildFactory(Factory): > class JSCTestsFactory(Factory): > def __init__(self, platform, configuration='release', architectures=None, additionalArguments=None, **kwargs): > Factory.__init__(self, platform, configuration, architectures, False, additionalArguments) >+ self.addStep(CheckPatchRelevance()) > self.addStep(CompileJSCOnly()) > self.addStep(UnApplyPatchIfRequired()) > self.addStep(CompileJSCOnlyToT()) >Index: Tools/BuildSlaveSupport/ews-build/steps.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps.py (revision 234534) >+++ Tools/BuildSlaveSupport/ews-build/steps.py (working copy) >@@ -76,6 +76,95 @@ class CheckOutSource(svn.SVN): > **kwargs) > > >+class CheckPatchRelevance(buildstep.BuildStep): >+ name = 'check-patch-relevance' >+ description = ['check-patch-relevance running'] >+ descriptionDone = ['check-patch-relevance'] >+ flunkOnFailure = True >+ haltOnFailure = True >+ >+ bindings_paths = [ >+ "Source/WebCore", >+ "Tools", >+ ] >+ >+ jsc_paths = [ >+ "JSTests/", >+ "Source/JavaScriptCore/", >+ "Source/WTF/", >+ "Source/bmalloc/", >+ "Makefile", >+ "Makefile.shared", >+ "Source/Makefile", >+ "Source/Makefile.shared", >+ "Tools/Scripts/build-webkit", >+ "Tools/Scripts/build-jsc", >+ "Tools/Scripts/jsc-stress-test-helpers/", >+ "Tools/Scripts/run-jsc", >+ "Tools/Scripts/run-jsc-benchmarks", >+ "Tools/Scripts/run-jsc-stress-tests", >+ "Tools/Scripts/run-javascriptcore-tests", >+ "Tools/Scripts/run-layout-jsc", >+ "Tools/Scripts/update-javascriptcore-test-results", >+ "Tools/Scripts/webkitdirs.pm", >+ ] >+ >+ webkitpy_paths = [ >+ "Tools/Scripts/webkitpy/", >+ "Tools/QueueStatusServer/", >+ ] >+ >+ group_to_paths_mapping = { >+ 'bindings': bindings_paths, >+ 'jsc': jsc_paths, >+ 'webkitpy': webkitpy_paths, >+ } >+ >+ def _patch_is_relevant(self, patch, builderName): >+ group = [group for group in self.group_to_paths_mapping.keys() if group in builderName.lower()] >+ if not group: >+ # This builder doesn't have paths defined, all patches are relevant. >+ return True >+ >+ relevant_paths = self.group_to_paths_mapping[group[0]] >+ >+ for change in patch.splitlines(): >+ for path in relevant_paths: >+ if re.search(path, change, re.IGNORECASE): >+ return True >+ return False >+ >+ def _get_patch(self): >+ sourcestamp = self.build.getSourceStamp(self.getProperty('codebase', '')) >+ if not sourcestamp or not sourcestamp.patch: >+ return None >+ return sourcestamp.patch[1] >+ >+ @defer.inlineCallbacks >+ def _addToLog(self, logName, message): >+ try: >+ log = self.getLog(logName) >+ except KeyError: >+ log = yield self.addLog(logName) >+ log.addStdout(message) >+ >+ def start(self): >+ patch = self._get_patch() >+ if not patch: >+ # This build doesn't have an patch, it might be a force build. >+ self.finished(SUCCESS) >+ return None >+ >+ if self._patch_is_relevant(patch, self.getProperty('buildername', '')): >+ self._addToLog('stdio', 'This patch contains relevant changes.') >+ self.finished(SUCCESS) >+ return None >+ >+ self._addToLog('stdio', 'This patch does not have relevant changes.') >+ self.finished(FAILURE) >+ return None >+ >+ > class UnApplyPatchIfRequired(CheckOutSource): > name = 'unapply-patch' >
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
Flags:
lforschler
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188295
:
346444
| 346500