commit:     fe31d987a48588a27ded9bb0c1f0b49c69f273a8
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 10 22:35:27 2023 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Fri Mar 10 22:35:27 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=fe31d987

Add CheckEAPI

Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>

 buildbot_gentoo_ci/steps/version.py | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/buildbot_gentoo_ci/steps/version.py 
b/buildbot_gentoo_ci/steps/version.py
index 59d19dc..c6f333e 100644
--- a/buildbot_gentoo_ci/steps/version.py
+++ b/buildbot_gentoo_ci/steps/version.py
@@ -409,6 +409,35 @@ class SetupPropertys(BuildStep):
         self.setProperty("version", self.version, 'version')
         return SUCCESS
 
+class CheckEAPI(BuildStep):
+
+    name = 'CheckEAPI'
+    description = 'Running'
+    descriptionDone = 'Ran'
+    descriptionSuffix = None
+    haltOnFailure = True
+    flunkOnFailure = True
+
+    def __init__(self, **kwargs):
+        super().__init__(**kwargs)
+
+    #@defer.inlineCallbacks
+    def run(self):
+        # Run head 30 if we did't find it on head 10
+        if self.getProperty("eapi"):
+            return SKIPPED
+        self.build.addStepsAfterCurrentStep([
+                steps.SetPropertyFromCommand(
+                                            name = 'RunGetEAPI',
+                                            haltOnFailure = True,
+                                            flunkOnFailure = True,
+                                            command=['head', '-n','30', 
self.getProperty("ebuild_file")],
+                                            strip=False,
+                                            extract_fn=PersOutputOfGetEapi
+                                            )
+            ])
+        return SUCCESS
+
 class SetupStepsForCheckV(BuildStep):
     
     name = 'Setup steps for Checking V'
@@ -441,10 +470,11 @@ class SetupStepsForCheckV(BuildStep):
                                                             name = 
'RunGetEAPI',
                                                             haltOnFailure = 
True,
                                                             flunkOnFailure = 
True,
-                                                            command=['head', 
'-n', '15', self.getProperty("ebuild_file")],
+                                                            command=['head', 
'-n', '10', self.getProperty("ebuild_file")],
                                                             strip=False,
                                                             
extract_fn=PersOutputOfGetEapi
                                                             ))
+            addStepVData.append(CheckEAPI())
             addStepVData.append(steps.SetPropertyFromCommand(
                                                             name = 
'GetPythonVersion',
                                                             haltOnFailure = 
True,

Reply via email to