On 13/06/2023 12:33, Richard Purdie wrote:
On Tue, 2023-06-13 at 10:55 +0100, Peter Hoyes wrote:
On 23/05/2023 18:06, Ross Burton wrote:
On 17 May 2023, at 17:29, Peter Hoyes via lists.openembedded.org
<[email protected]>  wrote:
The testdata.json file generated as part of the rootfs
postprocess
commands contains almost all Bitbake variables and is used by
OEQA test
cases to inspect the build environment. However it is only
regenerated
when the rootfs task is otherwise retriggered, complicating the
process
of developing OEQA test cases.
I’m about to run for dinner, but would it make more sense for this
function to be a separate task inside testimage.bbclass that
happens after rootfs?  This will stop the explosion of variable
dependencies causing rootfs to re-run.

Ross
Thanks for the suggestion - I have implemented this for consideration
in
https://lists.openembedded.org/g/openembedded-core/topic/patch_1_2/99501785
Making it a separate task is fine, the challenge is that it needs to
run at the same time as image processing so that DATE/TIME are
consistent and the image names are correct.

That implies that it has to be before do_image_complete which means any
change in variables will retrigger the image creation :(.

I think we need to try and fix this differently and stop exporting
every variable.

Cheers,

Richard

If I understand correctly...

It sounds like moving testdata creation to a separate task doesn't bring much benefit so I'll revert to something based off this patch.

It looks like a relatively small number of variables are actually used by OEQA tests in OE-core:

 * IMAGE
 * ARCH
 * MACHINE
 * PACKAGE_FEED_GPG_NAME
 * VIRTUAL-RUNTIME_init_manager
 * WORKDIR
 * DISTRO_FEATURES
 * PTEST_EXPECT_FAILURE
 * TEST_LOG_DIR
 * libdir
 * T
 * MULTILIB_VARIANTS
 * SDKPATH
 * SDK_DEPLOY
 * TOOLCHAINEXT_OUTPUTNAME
 * QEMU_USE_KVM
 * DL_DIR

Notably, DATE/TIME do not seem to be referenced at all (apart from a comment in oeqa/runtime/cases/ptest.py recommending *not* using DATETIME for test output). Additionally, DL_DIR and WORKDIR are updated on each testimage execution using TESTIMAGE_UPDATE_VARS.

How about introducing a new variable, e.g. TESTIMAGE_EXPORT_VARS, containing just the list above (to which other variables could optionally be appended in other layers)?

Peter
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183101): 
https://lists.openembedded.org/g/openembedded-core/message/183101
Mute This Topic: https://lists.openembedded.org/mt/98951993/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to