[oe-commits] [openembedded-core] 17/31: oeqa/selftest/image_tyypedep: Avoid undefined variable failure
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 13 15:35:17 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 0b74cb42aefe5c1b812fd155784e4c6581e26ce2
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jul 11 11:06:48 2018 +0000
oeqa/selftest/image_tyypedep: Avoid undefined variable failure
If something goes wrong with the test, dep can be undefined. Avoid a
traceback for this and handle it more gracefully.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/selftest/cases/image_typedep.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/image_typedep.py b/meta/lib/oeqa/selftest/cases/image_typedep.py
index e678885..932c7f8 100644
--- a/meta/lib/oeqa/selftest/cases/image_typedep.py
+++ b/meta/lib/oeqa/selftest/cases/image_typedep.py
@@ -29,11 +29,14 @@ inherit image
# like CONVERSION_DEPENDS_bz2="somedep"
result = bitbake('-e emptytest')
+ dep = None
for line in result.output.split('\n'):
if line.startswith('CONVERSION_DEPENDS_bz2'):
dep = line.split('=')[1].strip('"')
break
+ self.assertIsNotNone(dep, "CONVERSION_DEPENDS_bz2 dependency not found in bitbake -e output")
+
# Now get the dependency task list and check for the expected task
# dependency
bitbake('-g emptytest')
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list