From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paulo Neves <ptsneves@gmail.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [meta-oe][PATCH v2 4/4] testimage: Moved write_image_test_data to testimage bbclass.
Date: Tue, 04 Sep 2018 11:30:34 +0100 [thread overview]
Message-ID: <a4268dca5b5db6759cce2f089f5065708112082d.camel@linuxfoundation.org> (raw)
In-Reply-To: <1535651376-25467-4-git-send-email-ptsneves@gmail.com>
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
next prev parent reply other threads:[~2018-09-04 10:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 17:49 [meta-oe][PATCH v2 1/4] testimage: Refactoring and fixing Paulo Neves
2018-08-30 17:49 ` [meta-oe][PATCH v2 2/4] testimage: target.start exceptions not masked Paulo Neves
2018-08-30 17:49 ` [meta-oe][PATCH v2 3/4] masterimage: Check for rootfs path instead of file Paulo Neves
2018-08-30 17:49 ` [meta-oe][PATCH v2 4/4] testimage: Moved write_image_test_data to testimage bbclass Paulo Neves
2018-09-04 10:30 ` Richard Purdie [this message]
2018-10-02 8:19 ` Paulo Neves
2018-10-03 16:13 ` richard.purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4268dca5b5db6759cce2f089f5065708112082d.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=ptsneves@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox