[OE-core] [yocto][PATCH 1/1] ptest: user-specified run-ptest script location

Ray, Ian (GE Healthcare) ian.ray at ge.com
Tue Sep 29 06:59:10 UTC 2015


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).

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



More information about the Openembedded-core mailing list