[OE-core] [meta-oe][PATCH v2 4/4] testimage: Moved write_image_test_data to testimage bbclass.

Paulo Neves ptsneves at gmail.com
Tue Oct 2 08:19:53 UTC 2018


Hello Richard,

Would assure you if it generated the test data on image creation *and*
on test task?
If not please describe more or less how I could collect which
variables write_image_test_data depends upon. Just a high level
description would do.

I have really been in a good spirit to get this topic merged but I do
not see a clear guidance for me to fix what was clearly broken.
Actually the current code put there by intel should should be reverted
in my opinion, as it broke all the controllers besides simpleremote
and qemu.

Paulo Neves
On Tue, Sep 4, 2018 at 12:30 PM Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
>
> On Thu, 2018-08-30 at 19:49 +0200, Paulo Neves wrote:
> > Previously the write_image_test_data was a rootfs post
> > process command. This function ran only when the rootfs
> > task was ran. Due to this if a variable was changed
> > or added to the datastore that would not trigger the do_rootfs
> > task, the variable would never be written into the json
> > file. Consequently the do_testimage task was potentially
> > unreproduceable and could fail if for some reason this
> > variable was then used.
> >
> > In this commit we move the recording of the datastore to the
> > start of the do_testimage task. The do_testimage
> > task then reads this freshly generated json and passes it into
> > the normal test machinery. This approach allows for the test
> > machinery to still be loosely coupled to bitbake, and thus
> > still allows for the tests to be exported and used independently
> > from bitbake. The caveat is, if there are datastore changes
> > then the bitbake testimage task should be run before the tests
> > can be ran independently again.
>
> I'm not sure I agree with this. The test data really should be written
> at either rootfs or image generation, not just before the tests are
> run.
>
> If you wanted to run the tests independently, after this change you
> have no way to generate the data to do that without first running the
> tests at least once. That doesn't make sense.
>
> The correct thing to do here is to ensure the write_image_test_data()
> function indicates which variables it depends upon and hence reruns
> correctly.
>
> Cheers,
>
> Richard



More information about the Openembedded-core mailing list