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-16 13:21:34 +0100
commit62865578bf324bd6c4113af1e67d458528a7ec39 (patch)
treee30065bcc755219c45e6eece87d4333480098002 /meta
parent754cf58700514e111013c139efd64fcaea77c384 (diff)
downloadpoky-62865578bf324bd6c4113af1e67d458528a7ec39.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. (From OE-Core rev: 0b74cb42aefe5c1b812fd155784e4c6581e26ce2) 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
29 # like CONVERSION_DEPENDS_bz2="somedep" 29 # like CONVERSION_DEPENDS_bz2="somedep"
30 result = bitbake('-e emptytest') 30 result = bitbake('-e emptytest')
31 31
32 dep = None
32 for line in result.output.split('\n'): 33 for line in result.output.split('\n'):
33 if line.startswith('CONVERSION_DEPENDS_bz2'): 34 if line.startswith('CONVERSION_DEPENDS_bz2'):
34 dep = line.split('=')[1].strip('"') 35 dep = line.split('=')[1].strip('"')
35 break 36 break
36 37
38 self.assertIsNotNone(dep, "CONVERSION_DEPENDS_bz2 dependency not found in bitbake -e output")
39
37 # Now get the dependency task list and check for the expected task 40 # Now get the dependency task list and check for the expected task
38 # dependency 41 # dependency
39 bitbake('-g emptytest') 42 bitbake('-g emptytest')