diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-13 11:44:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-13 17:35:22 +0000 |
commit | 4eb546cf1c2780b7870ba4d6e1a51bd096987fe8 (patch) | |
tree | 3f473f5c3d2536b590c704e1107090ce138488a0 /meta/lib/oeqa/selftest/cases | |
parent | 3bff360ff32a0ea671f1899cd87aae6f8ed549d4 (diff) | |
download | poky-4eb546cf1c2780b7870ba4d6e1a51bd096987fe8.tar.gz |
selftest/recipetool: Stop test corrupting tinfoil class
Running recipetool.RecipetoolTests.test_recipetool_handle_license_vars
followed by wic.Wic2.test_biosplusefi_plugin_qemu would show a failure of:
File "/media/build/poky/meta/lib/oeqa/utils/commands.py", line 351, in runqemu
qemu = oeqa.targetcontrol.QemuTarget(recipedata, targetlogger, image_fstype)
File "/media/build/poky/meta/lib/oeqa/targetcontrol.py", line 116, in __init__
use_kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
File "/media/build/poky/meta/lib/oe/types.py", line 182, in qemu_use_kvm
if kvm and boolean(kvm):
File "/media/build/poky/meta/lib/oe/types.py", line 128, in boolean
raise ValueError("Invalid boolean value '%s'" % value)
ValueError: Invalid boolean value '/media/build/poky/meta/files/common-licenses'
which made no sense until you realise the recipetool test is corrupting
the tinfoil class. Work on a copy instead to avoid this.
(From OE-Core rev: 7fe76fe17f67c1bbd108d02836692fed20d24771)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/recipetool.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 25b06cdcf0..b193f0f5c8 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -581,7 +581,10 @@ class RecipetoolTests(RecipetoolBase): | |||
581 | 581 | ||
582 | commonlicdir = get_bb_var('COMMON_LICENSE_DIR') | 582 | commonlicdir = get_bb_var('COMMON_LICENSE_DIR') |
583 | 583 | ||
584 | d = bb.tinfoil.TinfoilDataStoreConnector | 584 | class DataConnectorCopy(bb.tinfoil.TinfoilDataStoreConnector): |
585 | pass | ||
586 | |||
587 | d = DataConnectorCopy | ||
585 | d.getVar = Mock(return_value=commonlicdir) | 588 | d.getVar = Mock(return_value=commonlicdir) |
586 | 589 | ||
587 | srctree = tempfile.mkdtemp(prefix='recipetoolqa') | 590 | srctree = tempfile.mkdtemp(prefix='recipetoolqa') |