From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: yocto@yoctoproject.org
Cc: joshua.g.lock@intel.com
Subject: [[yocto-autobuilder][PATCHv2] 01/15] lib/buildsteps.py: Add BitbakeShellCommand class
Date: Tue, 21 Jun 2016 18:07:38 -0500 [thread overview]
Message-ID: <1466550472-1365-2-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1466550472-1365-1-git-send-email-anibal.limon@linux.intel.com>
The BitbakeShellCommand is a new class for store common methods when
is aim to run bitbake inside an step.
Also don't call directly the ShellCommand constructur use super to be
able for call the parent constructor no matter what is this enables
to call BitbakeShellCommand constructor.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
lib/python2.7/site-packages/autobuilder/buildsteps/BuildImages.py | 7 +++++--
.../site-packages/autobuilder/buildsteps/BuildToolchainImages.py | 7 +++++--
.../site-packages/autobuilder/buildsteps/GetBitbakeVersion.py | 6 ++++--
.../site-packages/autobuilder/buildsteps/RunESDKSanityTests.py | 6 ++++--
.../site-packages/autobuilder/buildsteps/RunSDKSanityTests.py | 6 ++++--
.../site-packages/autobuilder/buildsteps/RunSanityTests.py | 6 ++++--
lib/python2.7/site-packages/autobuilder/lib/buildsteps.py | 5 +++++
7 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/BuildImages.py b/lib/python2.7/site-packages/autobuilder/buildsteps/BuildImages.py
index 0cdd2ef..7ef8aab 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/BuildImages.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/BuildImages.py
@@ -17,7 +17,9 @@ from distutils.version import StrictVersion
from buildbot.status.results import SUCCESS, SKIPPED
import os
-class BuildImages(ShellCommand):
+from lib.buildsteps import BitbakeShellCommand
+
+class BuildImages(BitbakeShellCommand):
haltOnFailure = False
flunkOnFailure = True
name = "BuildImages"
@@ -32,7 +34,8 @@ class BuildImages(ShellCommand):
# Timeout needs to be passed to LoggingBuildStep as a kwarg
self.timeout = 100000
kwargs['timeout']=self.timeout
- ShellCommand.__init__(self, **kwargs)
+ super(BuildImages, self).__init__(factory, argdict=None,
+ **kwargs)
def start(self):
self.localconf = self.getProperty("LOCALCONF")
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/BuildToolchainImages.py b/lib/python2.7/site-packages/autobuilder/buildsteps/BuildToolchainImages.py
index 89402cd..5a540bf 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/BuildToolchainImages.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/BuildToolchainImages.py
@@ -15,7 +15,9 @@ from buildbot.steps.shell import ShellCommand
from buildbot.process.buildstep import LogLineObserver
import os
-class BuildToolchainImages(ShellCommand):
+from lib.buildsteps import BitbakeShellCommand
+
+class BuildToolchainImages(BitbakeShellCommand):
haltOnFailure = False
flunkOnFailure = True
name = "Building Toolchain Images"
@@ -29,7 +31,8 @@ class BuildToolchainImages(ShellCommand):
# Timeout needs to be passed to LoggingBuildStep as a kwarg
self.timeout = 100000
kwargs['timeout']=self.timeout
- ShellCommand.__init__(self, **kwargs)
+ super(BuildToolchainImages, self).__init__(factory, argdict=None,
+ **kwargs)
def start(self):
layerversion = self.getProperty("layerversion_core")
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/GetBitbakeVersion.py b/lib/python2.7/site-packages/autobuilder/buildsteps/GetBitbakeVersion.py
index 6eb1e21..6123343 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/GetBitbakeVersion.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/GetBitbakeVersion.py
@@ -16,7 +16,9 @@ from buildbot.process.properties import WithProperties
from twisted.python import log
from autobuilder.config import *
-class GetBitbakeVersion(ShellCommand):
+from lib.buildsteps import BitbakeShellCommand
+
+class GetBitbakeVersion(BitbakeShellCommand):
haltOnFailure = False
flunkOnFailure = False
name = "GetBitbakeVersion"
@@ -27,7 +29,7 @@ class GetBitbakeVersion(ShellCommand):
self.workerworkdir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"))
for k, v in argdict.iteritems():
setattr(self, k, v)
- ShellCommand.__init__(self, **kwargs)
+ super(GetBitbakeVersion, self).__init__(factory, argdict=None, **kwargs)
def start(self):
buildername=self.getProperty("buildername")
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/RunESDKSanityTests.py b/lib/python2.7/site-packages/autobuilder/buildsteps/RunESDKSanityTests.py
index f0bddeb..7471d3d 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunESDKSanityTests.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/RunESDKSanityTests.py
@@ -16,7 +16,9 @@ from buildbot.status.results import SUCCESS, FAILURE
from twisted.python import log as tlog
import os, re
-class RunESDKSanityTests(ShellCommand):
+from lib.buildsteps import BitbakeShellCommand
+
+class RunESDKSanityTests(BitbakeShellCommand):
haltOnFailure = False
flunkOnFailure = True
@@ -39,7 +41,7 @@ class RunESDKSanityTests(ShellCommand):
setattr(self, k, v)
self.description = "Running SDK Sanity Tests"
kwargs['timeout']=self.timeout
- ShellCommand.__init__(self, **kwargs)
+ super(RunESDKSanityTests, self).__init__(factory, argdict=None, **kwargs)
def start(self):
layerversion = self.getProperty("layerversion_core")
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py b/lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py
index 344dfd4..9b6eb5b 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/RunSDKSanityTests.py
@@ -16,7 +16,9 @@ from buildbot.status.results import SUCCESS, FAILURE
from twisted.python import log as tlog
import os, re
-class RunSDKSanityTests(ShellCommand):
+from lib.buildsteps import BitbakeShellCommand
+
+class RunSDKSanityTests(BitbakeShellCommand):
haltOnFailure = False
flunkOnFailure = True
@@ -39,7 +41,7 @@ class RunSDKSanityTests(ShellCommand):
setattr(self, k, v)
self.description = "Running SDK Sanity Tests"
kwargs['timeout']=self.timeout
- ShellCommand.__init__(self, **kwargs)
+ super(RunSDKSanityTests, self).__init__(factory, argdict=None, **kwargs)
def start(self):
layerversion = self.getProperty("layerversion_core")
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py b/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
index aeb02b1..4fa6dac 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
@@ -16,7 +16,9 @@ from buildbot.status.results import SUCCESS, FAILURE
from twisted.python import log as tlog
import os, re
-class RunSanityTests(ShellCommand):
+from lib.buildsteps import BitbakeShellCommand
+
+class RunSanityTests(BitbakeShellCommand):
haltOnFailure = False
flunkOnFailure = True
@@ -39,7 +41,7 @@ class RunSanityTests(ShellCommand):
setattr(self, k, v)
self.description = "Running Sanity Tests"
kwargs['timeout']=self.timeout
- ShellCommand.__init__(self, **kwargs)
+ super(RunSanityTests, self).__init__(factory, argdict=None, **kwargs)
def start(self):
layerversion = self.getProperty("layerversion_core")
diff --git a/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py b/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py
index 3693a7a..4f15dcf 100644
--- a/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py
+++ b/lib/python2.7/site-packages/autobuilder/lib/buildsteps.py
@@ -11,6 +11,7 @@ __email__ = "anibal.limon@linux.intel.com"
'''
import os
+
from buildbot.steps.shell import ShellCommand
DEFAULT_SHELL = 'bash'
@@ -40,3 +41,7 @@ class ShellCommandCleanEnv(ShellCommand):
pe_cmd += "%s=\"$%s\" " % (pe, pe)
return "env -i %s %s -c " % (pe_cmd, shell)
+
+class BitbakeShellCommand(ShellCommand):
+ def __init__(self, factory, argdict=None, **kwargs):
+ super(BitbakeShellCommand, self).__init__(**kwargs)
--
2.1.4
next prev parent reply other threads:[~2016-06-21 23:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 23:07 [[yocto-autobuilder][PATCHv2] 00/15] Add support for generate bitbake/oe-selftest error reports Aníbal Limón
2016-06-21 23:07 ` Aníbal Limón [this message]
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 02/15] lib/buildsteps.py: Add BitbakeLogLineObserver for BitbakeShellCommands Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 03/15] lib/buildsteps: BitbakeShellCommand add support for create error reports Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 04/15] lib/ABTools: Add functions for get errordir path in controller and worker Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 05/15] buildbot: Add support for DirectoryDownload transfer step Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 06/15] autobuilder/buildsteps: Add DownloadBitbakeErrorReports step Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 07/15] buiidsets: Add DownloadBitbakeErrorReport step Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 08/15] lib/buildsteps.py: BitbakeShellCommand add support for error_type Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 09/15] autobuilder/lib/buildsteps.py: BitbakeShellCommand update error report types Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 10/15] autobuilder/lib/{ABtools, builsteps}.py: Create save_error_report func Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 11/15] autobuilder/lib/ABTools.py: Add get_lsb_distro function Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 12/15] buildsteps/RunOeSelftest.py: Add support for create/save error reports Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 13/15] nightly-oe-selftest.conf: Add steps for Download and Send error report Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 14/15] autobuilder/buildsteps: Rename DownloadBitbakeErrorReports to DownloadErrorReports Aníbal Limón
2016-06-21 23:07 ` [[yocto-autobuilder][PATCHv2] 15/15] buildset-config: Update references from " Aníbal Limón
2016-06-22 7:44 ` [[yocto-autobuilder][PATCHv2] 00/15] Add support for generate bitbake/oe-selftest error reports Beth 'pidge' Flanagan
2016-06-22 20:17 ` Aníbal Limón
2016-06-23 15:27 ` Aníbal Limón
2016-06-23 15:35 ` Beth 'pidge' Flanagan
2016-06-27 12:28 ` Beth 'pidge' Flanagan
2016-06-28 14:55 ` Aníbal Limón
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466550472-1365-2-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=joshua.g.lock@intel.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.