[yocto] [[PATCH][autobuilder] 3/8] autobuilder/buildsteps: Add ToasterStart and ToasterStop buildsteps.

Aníbal Limón anibal.limon at linux.intel.com
Fri Feb 19 08:14:44 PST 2016


These buildsteps servers for start/stop toaster in a clean way.

Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
 .../autobuilder/buildsteps/ToasterStart.py         | 32 +++++++++++++++++++++
 .../autobuilder/buildsteps/ToasterStop.py          | 33 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStart.py
 create mode 100644 lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStop.py

diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStart.py b/lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStart.py
new file mode 100644
index 0000000..14cf9db3
--- /dev/null
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStart.py
@@ -0,0 +1,32 @@
+'''
+Created on Feb 15, 2016
+
+__author__ = "Anibal (alimon) Limon"
+__copyright__ = "Copyright 2016, Intel Corp."
+__credits__ = ["Anibal Limon"]
+__license__ = "GPL"
+__version__ = "2.0"
+__maintainer__ = "Anibal Limon"
+__email__ = "anibal.limon at linux.intel.com"
+'''
+
+from lib.buildsteps import ShellCommandCleanEnv
+import os
+
+class ToasterStart(ShellCommandCleanEnv):
+    haltOnFailure = True
+    flunkOnFailure = True
+    name = "ToasterStart"
+
+    def __init__(self, factory, argdict=None, **kwargs):
+        self.factory = factory
+        self.description = "Starting toaster..."
+
+        oe_cmd = "source ./oe-init-build-env;"
+        venv_cmd = "source venv/bin/activate;"
+        start_cmd = "../bitbake/lib/toaster/tests/helpers.py -a start" \
+            " -d $(readlink -e ../)"
+
+        self.command = oe_cmd + venv_cmd + start_cmd
+
+        ShellCommandCleanEnv.__init__(self, factory, argdict, **kwargs)
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStop.py b/lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStop.py
new file mode 100644
index 0000000..6fda0e8
--- /dev/null
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/ToasterStop.py
@@ -0,0 +1,33 @@
+'''
+Created on Feb 15, 2016
+
+__author__ = "Anibal (alimon) Limon"
+__copyright__ = "Copyright 2016, Intel Corp."
+__credits__ = ["Anibal Limon"]
+__license__ = "GPL"
+__version__ = "2.0"
+__maintainer__ = "Anibal Limon"
+__email__ = "anibal.limon at linux.intel.com"
+'''
+
+from lib.buildsteps import ShellCommandCleanEnv
+import os
+
+class ToasterStop(ShellCommandCleanEnv):
+    alwaysRun = True
+    haltOnFailure = True
+    flunkOnFailure = True
+    name = "ToasterStop"
+
+    def __init__(self, factory, argdict=None, **kwargs):
+        self.factory = factory
+        self.description = "Stopping toaster..."
+
+        oe_cmd = "source ./oe-init-build-env;"
+        venv_cmd = "source venv/bin/activate;"
+        start_cmd = "../bitbake/lib/toaster/tests/helpers.py -a stop" \
+            " -d $(readlink -e ../)"
+
+        self.command = oe_cmd + venv_cmd + start_cmd
+
+        ShellCommandCleanEnv.__init__(self, factory, argdict, **kwargs)
-- 
2.1.4




More information about the yocto mailing list