From: Tudor Florea <tudor.florea@enea.com>
To: "Ray, Ian (GE Healthcare)" <ian.ray@ge.com>,
"Burton, Ross" <ross.burton@intel.com>
Cc: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [yocto][PATCH 1/1] ptest: user-specified run-ptest script location
Date: Tue, 29 Sep 2015 22:53:33 +0300 [thread overview]
Message-ID: <560AEC3D.1010701@enea.com> (raw)
In-Reply-To: <30E719D66AEA914CBB7DAB303B1C722D1729D1@BUDURBPA11.e2k.ad.ge.com>
On 29/09/2015 09:59, Ray, Ian (GE Healthcare) wrote:
> On 28 September 2015, Tudor Florea wrote:
>>> On 28 September 2015, Ross Burton wrote:
>>>> Surely if an upstream is under your control and is ptest-aware, it can also
>>>> install run-ptest into the right place too?
>>> The run-ptest script is currently required to be in WORKDIR.
>> Actually run-ptest is currently required to be present in
>> /usr/lib/<package>/ptest. If a package is "ptest-aware", that package
>> should contain a install-ptest make target which will take care of
>> installing the run-ptest file.
> In summary, the options seem to be as follows:
>
> # option 1 -- package includes run-ptest, recipe points to it
> PTEST_RUN_SCRIPT_PATH = "path/to/run-ptest"
>
> # option 2 -- recipe copies run-ptest to WORKDIR
> # This leverages meta/classes/ptest.bbclass do_install_ptest_base.
> do_compile_ptest () {
> oe_runmake buildtest-TESTS
> cp ${S}/path/to/run-ptest ${WORKDIR}
> }
>
> # option 3 -- package installs run-ptest
> # The recipe requires custom do_install_ptest because there is no
> # run-ptest in WORKDIR so meta/classes/ptest.bbclass does not call
> # do_install_ptest_base.
> do_install () {
> oe_runmake DESTDIR=${D} install
>
> # Copied from do_install_ptest_base.
> install -D ${S}/ptest/run-ptest ${D}${PTEST_PATH}/run-ptest
> oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
> chown -R root:root ${D}${PTEST_PATH}
>
> # Hack alert! had to comment out do_install_ptest_base[cleandirs] in
> # meta/classes/ptest.bbclass to test this option.
> }
>
> My inexperience shows here with option #3 which attempted to address the comments
> by Ross and Tudor, but which does not actually work (tested on Fido branch).
I think that we should modify do_install_ptest_base to run
do_install_ptest and install the Makefile irrespective of the presence
of run-ptest file in ${WORKDIR}
Something like:
do_install_ptest_base() {
if [ -f ${WORKDIR}/run-ptest ]; then
install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
fi
if grep -q install-ptest: Makefile; then
oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
fi
do_install_ptest
}
Does this fits with your needs?
Regards,
Tudor
>
> Maybe there is an option #4, where the recipe does *not* inherit ptest, but that would
> place a significant burden on the recipe author (detecting PTEST_ENABLED, adding
> tasks, etc). No doubt there is an easier way. Sorry for being such a noob!
>
> Ian
>
next prev parent reply other threads:[~2015-09-29 19:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 7:11 [yocto][PATCH 0/1] new PTEST_RUN_SCRIPT_PATH Ian Ray
2015-09-21 7:11 ` [yocto][PATCH 1/1] ptest: user-specified run-ptest script location Ian Ray
2015-09-28 13:49 ` Tudor Florea
2015-09-28 14:46 ` Ray, Ian (GE Healthcare)
2015-09-28 15:23 ` Burton, Ross
2015-09-28 15:41 ` Ray, Ian (GE Healthcare)
2015-09-28 18:44 ` Tudor Florea
2015-09-29 6:59 ` Ray, Ian (GE Healthcare)
2015-09-29 13:17 ` Richard Purdie
2015-09-29 19:53 ` Tudor Florea [this message]
2015-09-30 10:35 ` Ray, Ian (GE Healthcare)
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=560AEC3D.1010701@enea.com \
--to=tudor.florea@enea.com \
--cc=ian.ray@ge.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.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