diff options
author | Ross Burton <ross.burton@intel.com> | 2015-12-23 13:45:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-28 09:25:20 +0000 |
commit | 09705a4af0b2cbbf1de925159d4a25c24432b546 (patch) | |
tree | 32f924237af2a6611937dc6d051fe70fb75fed57 /meta/lib/oeqa/selftest/recipetool.py | |
parent | 4b543f7405430a2ab452dbd334b4b0a430e1091c (diff) | |
download | poky-09705a4af0b2cbbf1de925159d4a25c24432b546.tar.gz |
oeqa/selftest: support sets in devtool comparisons
The devtool and recipetool tests do literal string comparisons, but for some
fields the ordering could be irrelevant and potentially non-deterministic. For
example, the recipetool_create_simple test started failing with:
AssertionError: 'GPLv2 Unknown' != 'Unknown GPLv2' : values for LICENSE do not match
The ordering of the LICENSE field isn't relevant. So, if the expected value is
a set(), split the string into a set too and compare those.
(From OE-Core rev: dab1b0ad42f08eb547732e854ba28a4cf0a23107)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/recipetool.py')
-rw-r--r-- | meta/lib/oeqa/selftest/recipetool.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py index 34e383f772..00f415b2c6 100644 --- a/meta/lib/oeqa/selftest/recipetool.py +++ b/meta/lib/oeqa/selftest/recipetool.py | |||
@@ -413,8 +413,8 @@ class RecipetoolTests(RecipetoolBase): | |||
413 | self.fail('recipetool did not create recipe file; output:\n%s' % result.output) | 413 | self.fail('recipetool did not create recipe file; output:\n%s' % result.output) |
414 | self.assertEqual(dirlist[0], 'socat_%s.bb' % pv, 'Recipe file incorrectly named') | 414 | self.assertEqual(dirlist[0], 'socat_%s.bb' % pv, 'Recipe file incorrectly named') |
415 | checkvars = {} | 415 | checkvars = {} |
416 | checkvars['LICENSE'] = 'Unknown GPLv2' | 416 | checkvars['LICENSE'] = set(['Unknown', 'GPLv2']) |
417 | checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263' | 417 | checkvars['LIC_FILES_CHKSUM'] = set(['file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4', 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263']) |
418 | # We don't check DEPENDS since they are variable for this recipe depending on what's in the sysroot | 418 | # We don't check DEPENDS since they are variable for this recipe depending on what's in the sysroot |
419 | checkvars['S'] = None | 419 | checkvars['S'] = None |
420 | checkvars['SRC_URI'] = srcuri.replace(pv, '${PV}') | 420 | checkvars['SRC_URI'] = srcuri.replace(pv, '${PV}') |