diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2016-11-02 13:04:28 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:05:19 +0000 |
commit | 72e9ae377d310282f1c8cc49d4806b26a0b41e79 (patch) | |
tree | 5aa0a7e6a380ea01bff7d32b04f152b81f72b5d8 /meta/lib/oeqa/runtime | |
parent | 92c57a5db7848edc993b3d9450c473f6e8861224 (diff) | |
download | poky-72e9ae377d310282f1c8cc49d4806b26a0b41e79.tar.gz |
oeqa/utils: Move targetbuild to buildproject module
The new buildproject module will contain only BuildProject class
a helper class for build source code.
The remaining classes TargetBuildProject and SDKBuildProject was
move to runtime and sdk respectively.
[YOCTO #10599]
(From OE-Core rev: 525fd2a5cda00890e921b63f7f608a10bc024d73)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/utils/__init__.py | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/utils/targetbuildproject.py | 33 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/utils/__init__.py b/meta/lib/oeqa/runtime/utils/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/meta/lib/oeqa/runtime/utils/__init__.py | |||
diff --git a/meta/lib/oeqa/runtime/utils/targetbuildproject.py b/meta/lib/oeqa/runtime/utils/targetbuildproject.py new file mode 100644 index 0000000000..138b5ef041 --- /dev/null +++ b/meta/lib/oeqa/runtime/utils/targetbuildproject.py | |||
@@ -0,0 +1,33 @@ | |||
1 | # Copyright (C) 2016 Intel Corporation | ||
2 | # Released under the MIT license (see COPYING.MIT) | ||
3 | |||
4 | from oeqa.utils.buildproject import BuildProject | ||
5 | |||
6 | class TargetBuildProject(BuildProject): | ||
7 | |||
8 | def __init__(self, target, d, uri, foldername=None): | ||
9 | self.target = target | ||
10 | self.targetdir = "~/" | ||
11 | BuildProject.__init__(self, d, uri, foldername, tmpdir="/tmp") | ||
12 | |||
13 | def download_archive(self): | ||
14 | |||
15 | self._download_archive() | ||
16 | |||
17 | (status, output) = self.target.copy_to(self.localarchive, self.targetdir) | ||
18 | if status != 0: | ||
19 | raise Exception("Failed to copy archive to target, output: %s" % output) | ||
20 | |||
21 | (status, output) = self.target.run('tar xf %s%s -C %s' % (self.targetdir, self.archive, self.targetdir)) | ||
22 | if status != 0: | ||
23 | raise Exception("Failed to extract archive, output: %s" % output) | ||
24 | |||
25 | #Change targetdir to project folder | ||
26 | self.targetdir = self.targetdir + self.fname | ||
27 | |||
28 | # The timeout parameter of target.run is set to 0 to make the ssh command | ||
29 | # run with no timeout. | ||
30 | def _run(self, cmd): | ||
31 | return self.target.run(cmd, 0)[0] | ||
32 | |||
33 | |||