On Tue, 2023-06-13 at 10:51 +0100, Peter Hoyes wrote:
> From: Peter Hoyes <[email protected]>
> 
> 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 not automatically
> regenerated, complicating the process of developing OEQA test cases.
> 
> Set nostamp on the new do_write_image_test_data task so that it always
> runs.
> 
> Add a demonstrative OE selftest.
> 
> Signed-off-by: Peter Hoyes <[email protected]>
> ---
>  meta/classes-recipe/testimage.bbclass     |  1 +
>  meta/lib/oeqa/selftest/cases/testimage.py | 26 +++++++++++++++++++++++
>  2 files changed, 27 insertions(+)
>  create mode 100644 meta/lib/oeqa/selftest/cases/testimage.py
> 
> diff --git a/meta/classes-recipe/testimage.bbclass 
> b/meta/classes-recipe/testimage.bbclass
> index b23340420f..67f7f3629e 100644
> --- a/meta/classes-recipe/testimage.bbclass
> +++ b/meta/classes-recipe/testimage.bbclass
> @@ -118,6 +118,7 @@ python do_write_image_test_data() {
>                  os.remove(testdata_link)
>              os.symlink(os.path.basename(testdata_name), testdata_link)
>  }
> +do_write_image_test_data[nostamp] = "1"
>  do_write_image_test_data[vardepsexclude] += "TOPDIR"
>  addtask write_image_test_data after do_rootfs before do_image_complete

I'm torn on this. What this means is that all other tasks depending on
do_image_complete will now also rerun. I suspect that will cause a
cascade of selftest failures as they aren't written to expect that.

I know there was an alternative patch of injecting all the values into
the checksum, I suspect that suffers the same issue as we'd need to
filter it a bit to stop things like TIME changing it. We can't need
*everything* there!

What we really need to do is filter the list of variables being written
out to some set of what is really needed rather than everything.

Cheers,

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

Reply via email to