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_qemux86_64_ptest.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_qemux86_64_ptest.py')
| -rw-r--r-- | lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py b/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py index 0f0f491..88e773b 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64_ptest.py | |||
| @@ -4,7 +4,7 @@ import re | |||
| 4 | 4 | ||
| 5 | from oeqa.selftest.case import OESelftestTestCase | 5 | from oeqa.selftest.case import OESelftestTestCase |
| 6 | from oeqa.utils.commands import runCmd | 6 | from oeqa.utils.commands import runCmd |
| 7 | from testutils import qemu_launch, qemu_send_command, qemu_terminate | 7 | from testutils import metadir, qemu_launch, qemu_send_command, qemu_terminate |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | class PtestTests(OESelftestTestCase): | 10 | class PtestTests(OESelftestTestCase): |
| @@ -13,12 +13,7 @@ class PtestTests(OESelftestTestCase): | |||
| 13 | layer = "meta-updater-qemux86-64" | 13 | layer = "meta-updater-qemux86-64" |
| 14 | result = runCmd('bitbake-layers show-layers') | 14 | result = runCmd('bitbake-layers show-layers') |
| 15 | if re.search(layer, result.output) is None: | 15 | if re.search(layer, result.output) is None: |
| 16 | # Assume the directory layout for finding other layers. We could also | 16 | self.meta_qemu = metadir() + layer |
| 17 | # make assumptions by using 'show-layers', but either way, if the | ||
| 18 | # layers we need aren't where we expect them, we are out of like. | ||
| 19 | path = os.path.abspath(os.path.dirname(__file__)) | ||
| 20 | metadir = path + "/../../../../../" | ||
| 21 | self.meta_qemu = metadir + layer | ||
| 22 | runCmd('bitbake-layers add-layer "%s"' % self.meta_qemu) | 17 | runCmd('bitbake-layers add-layer "%s"' % self.meta_qemu) |
| 23 | else: | 18 | else: |
| 24 | self.meta_qemu = None | 19 | self.meta_qemu = None |
