diff options
author | Laurent Bonnans <laurent.bonnans@here.com> | 2019-07-08 11:28:34 +0200 |
---|---|---|
committer | Laurent Bonnans <laurent.bonnans@here.com> | 2019-07-15 15:28:26 +0200 |
commit | eeaa391f3043bcf5cf3bd7645792fa6d01ee43c8 (patch) | |
tree | bbd1916152115c05aa07a6d424a57270dd603d1c /lib/oeqa/selftest/cases/updater_minnowboard.py | |
parent | 69d8dc6ed1405a6a05faca12f482e79cb6e0471b (diff) | |
download | meta-updater-eeaa391f3043bcf5cf3bd7645792fa6d01ee43c8.tar.gz |
Factor out ugly function in oe-selftests
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Diffstat (limited to 'lib/oeqa/selftest/cases/updater_minnowboard.py')
-rw-r--r-- | lib/oeqa/selftest/cases/updater_minnowboard.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/oeqa/selftest/cases/updater_minnowboard.py b/lib/oeqa/selftest/cases/updater_minnowboard.py index 267445b..855bd20 100644 --- a/lib/oeqa/selftest/cases/updater_minnowboard.py +++ b/lib/oeqa/selftest/cases/updater_minnowboard.py | |||
@@ -1,9 +1,8 @@ | |||
1 | import os | ||
2 | import re | 1 | import re |
3 | 2 | ||
4 | from oeqa.selftest.case import OESelftestTestCase | 3 | from oeqa.selftest.case import OESelftestTestCase |
5 | from oeqa.utils.commands import runCmd, get_bb_var | 4 | from oeqa.utils.commands import runCmd, get_bb_var |
6 | from testutils import qemu_launch, qemu_send_command, qemu_terminate, verifyProvisioned | 5 | from testutils import metadir, qemu_launch, qemu_send_command, qemu_terminate, verifyProvisioned |
7 | 6 | ||
8 | 7 | ||
9 | class MinnowTests(OESelftestTestCase): | 8 | class MinnowTests(OESelftestTestCase): |
@@ -12,18 +11,13 @@ class MinnowTests(OESelftestTestCase): | |||
12 | layer_intel = "meta-intel" | 11 | layer_intel = "meta-intel" |
13 | layer_minnow = "meta-updater-minnowboard" | 12 | layer_minnow = "meta-updater-minnowboard" |
14 | result = runCmd('bitbake-layers show-layers') | 13 | result = runCmd('bitbake-layers show-layers') |
15 | # Assume the directory layout for finding other layers. We could also | ||
16 | # make assumptions by using 'show-layers', but either way, if the | ||
17 | # layers we need aren't where we expect them, we are out of luck. | ||
18 | path = os.path.abspath(os.path.dirname(__file__)) | ||
19 | metadir = path + "/../../../../../" | ||
20 | if re.search(layer_intel, result.output) is None: | 14 | if re.search(layer_intel, result.output) is None: |
21 | self.meta_intel = metadir + layer_intel | 15 | self.meta_intel = metadir() + layer_intel |
22 | runCmd('bitbake-layers add-layer "%s"' % self.meta_intel) | 16 | runCmd('bitbake-layers add-layer "%s"' % self.meta_intel) |
23 | else: | 17 | else: |
24 | self.meta_intel = None | 18 | self.meta_intel = None |
25 | if re.search(layer_minnow, result.output) is None: | 19 | if re.search(layer_minnow, result.output) is None: |
26 | self.meta_minnow = metadir + layer_minnow | 20 | self.meta_minnow = metadir() + layer_minnow |
27 | runCmd('bitbake-layers add-layer "%s"' % self.meta_minnow) | 21 | runCmd('bitbake-layers add-layer "%s"' % self.meta_minnow) |
28 | else: | 22 | else: |
29 | self.meta_minnow = None | 23 | self.meta_minnow = None |