summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-11 11:06:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-13 16:34:30 +0100
commit0b74cb42aefe5c1b812fd155784e4c6581e26ce2 (patch)
tree7d7e226a13a454c98e307ef83a9fb72c7d76664f /meta
parent72e5f46f75454ba4c445c65c1cbc616a9e72fc6e (diff)
downloadopenembedded-core-0b74cb42aefe5c1b812fd155784e4c6581e26ce2.tar.gz
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@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/cases/image_typedep.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/image_typedep.py b/meta/lib/oeqa/selftest/cases/image_typedep.py
index e6788853a3..932c7f883d 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')