[ews-build] Do not upload archive when Compile Fails
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Apr 2019 16:32:11 +0000 (16:32 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Apr 2019 16:32:11 +0000 (16:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196674

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/ews-build/factories.py:
(BuildFactory.__init__): Remove steps which require dynamic decision about whether to run or not.
* BuildSlaveSupport/ews-build/steps.py:
(CompileWebKit.evaluateCommand): Dynamically decide which steps to run based on compile status.
(CompileWebKitToT.evaluateCommand): Explicitly override Compile.evaluateCommand so that it
doesn't inherit CompileWebKit.evaluateCommand which dynamically adds more steps.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/factories.py
Tools/BuildSlaveSupport/ews-build/steps.py
Tools/ChangeLog

index c978ac3..e309825 100644 (file)
@@ -70,11 +70,7 @@ class BuildFactory(Factory):
         Factory.__init__(self, platform, configuration, architectures, False, additionalArguments)
         self.addStep(KillOldProcesses())
         self.addStep(CompileWebKit())
-        self.addStep(UnApplyPatchIfRequired())
-        self.addStep(CompileWebKitToT())
         if triggers:
-            self.addStep(ArchiveBuiltProduct())
-            self.addStep(UploadBuiltProduct())
             self.addStep(trigger.Trigger(schedulerNames=triggers, set_properties=self.propertiesToPassToTriggers() or {}))
 
     def propertiesToPassToTriggers(self):
index e720d13..ba2209a 100644 (file)
@@ -518,6 +518,10 @@ class CompileWebKit(shell.Compile):
     def evaluateCommand(self, cmd):
         if cmd.didFail():
             self.setProperty('patchFailedToBuild', True)
+            self.build.addStepsAfterCurrentStep([UnApplyPatchIfRequired(), CompileWebKitToT()])
+        else:
+            self.build.addStepsAfterCurrentStep([ArchiveBuiltProduct(), UploadBuiltProduct()])
+
 
         return super(CompileWebKit, self).evaluateCommand(cmd)
 
@@ -532,6 +536,9 @@ class CompileWebKitToT(CompileWebKit):
     def hideStepIf(self, results, step):
         return not self.doStepIf(step)
 
+    def evaluateCommand(self, cmd):
+        return shell.Compile.evaluateCommand(self, cmd)
+
 
 class CompileJSCOnly(CompileWebKit):
     name = "build-jsc"
index 33076e0..e2ab138 100644 (file)
@@ -1,3 +1,17 @@
+2019-04-08  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews-build] Do not upload archive when Compile Fails
+        https://bugs.webkit.org/show_bug.cgi?id=196674
+
+        Reviewed by Alexey Proskuryakov.
+
+        * BuildSlaveSupport/ews-build/factories.py:
+        (BuildFactory.__init__): Remove steps which require dynamic decision about whether to run or not.
+        * BuildSlaveSupport/ews-build/steps.py:
+        (CompileWebKit.evaluateCommand): Dynamically decide which steps to run based on compile status.
+        (CompileWebKitToT.evaluateCommand): Explicitly override Compile.evaluateCommand so that it 
+        doesn't inherit CompileWebKit.evaluateCommand which dynamically adds more steps.
+
 2019-04-08  Guillaume Emont  <guijemont@igalia.com>
 
         Enable DFG on MIPS