oe-selftest: devtool: fix error message in _test_recipe_contents()

If a variable is being set in the recipe when we've explicitly passed
None as the value to _test_recipe_contents() indicating that it
shouldn't be set at all, then we should be printing out the variable
name in the assertion message but it seems like I forgot to do a
substitution. Also include the value for informational purposes.

(From OE-Core rev: 0dafcb158003fb13f82c266f607d9967fca321db)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2016-10-31 16:59:48 +13:00 committed by Richard Purdie
parent e0b62c38ac
commit 7aebaa4204
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class DevtoolBase(oeSelfTest):
if var and var in checkvars:
needvalue = checkvars.pop(var)
if needvalue is None:
self.fail('Variable %s should not appear in recipe')
self.fail('Variable %s should not appear in recipe, but value is being set to "%s"' % (var, value))
if isinstance(needvalue, set):
if var == 'LICENSE':
value = set(value.split(' & '))