]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake.conf: fix HOSTTOOLS setting related to image testing
authorChen Qi <Qi.Chen@windriver.com>
Fri, 1 Jun 2018 05:03:09 +0000 (13:03 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Jun 2018 14:14:43 +0000 (15:14 +0100)
A list of tools are added to HOSTTOOLS depending on if we inherit
testimage or not. Unfortunately, if we use TEST_IMAGE variable to
automate the test, these tools are not added to HOSTTOOLS.

Modify the condition to also check TEST_IMAGE to fix the above problem.

Also, change to use if...else... instead of list index for such setting.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/bitbake.conf

index 3f63a250251d9ebb5eddad7cef8d249b22a96057..36ed144aa781e6ecde074bff1294e892c94cde31 100644 (file)
@@ -487,7 +487,7 @@ HOSTTOOLS += " \
 "
 
 # Tools needed to run testimage runtime image testing
-HOSTTOOLS += "${@['', 'ip ping ps scp ssh stty'][bb.data.inherits_class('testimage', d)]}"
+HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.data.inherits_class('testimage', d) or d.getVar('TEST_IMAGE') == '1') else ''}"
 
 # Link to these if present
 HOSTTOOLS_NONFATAL += "aws ccache gcc-ar gpg ld.bfd ld.gold nc sftp socat ssh sudo"