summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/lib/oeqa/runtime/utils
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-01 10:27:11 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-12 22:51:39 -0400
commit6e60e8b2b2bab889379b380a28a167a0edd9d1d3 (patch)
treef12f54d5ba8e74e67e5fad3651a1e125bb8f4191 /import-layers/yocto-poky/meta/lib/oeqa/runtime/utils
parent509842add85b53e13164c1569a1fd43d5b8d91c5 (diff)
downloadtalos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.tar.gz
talos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.zip
Yocto 2.3
Move OpenBMC to Yocto 2.3(pyro). Tested: Built and verified Witherspoon and Palmetto images Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Resolves: openbmc/openbmc#2461
Diffstat (limited to 'import-layers/yocto-poky/meta/lib/oeqa/runtime/utils')
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/__init__.py0
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/targetbuildproject.py39
2 files changed, 39 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/__init__.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/__init__.py
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/targetbuildproject.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/targetbuildproject.py
new file mode 100644
index 000000000..5af55d736
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/utils/targetbuildproject.py
@@ -0,0 +1,39 @@
+# Copyright (C) 2016 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+from oeqa.utils.buildproject import BuildProject
+
+class TargetBuildProject(BuildProject):
+
+ def __init__(self, target, uri, foldername=None, dl_dir=None):
+ self.target = target
+ self.targetdir = "~/"
+ BuildProject.__init__(self, uri, foldername, dl_dir=dl_dir)
+
+ def download_archive(self):
+ self._download_archive()
+
+ status, output = self.target.copyTo(self.localarchive, self.targetdir)
+ if status:
+ raise Exception('Failed to copy archive to target, '
+ 'output: %s' % output)
+
+ cmd = 'tar xf %s%s -C %s' % (self.targetdir,
+ self.archive,
+ self.targetdir)
+ status, output = self.target.run(cmd)
+ if status:
+ raise Exception('Failed to extract archive, '
+ 'output: %s' % output)
+
+ # Change targetdir to project folder
+ self.targetdir = self.targetdir + self.fname
+
+ # The timeout parameter of target.run is set to 0
+ # to make the ssh command run with no timeout.
+ def _run(self, cmd):
+ ret = self.target.run(cmd, 0)
+ msg = "Command %s failed with exit code %s: %s" % (cmd, ret[0], ret[1])
+ if ret[0] != 0:
+ raise Exception(msg)
+ return ret[0]
OpenPOWER on IntegriCloud