aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/ptest.bbclass
AgeCommit message (Collapse)Author
2014-05-08ptest: Work from PTEST_ENABLED, not DISTRO_FEATURESRichard Purdie
Some classes of recipe disable ptest even though its in DISTRO_FEATURES (e.g. nativesdk). We shouldn't attempt to build ptest packages when its disabled. This replaces some DISTRO_FEATURE checks with PTEST_ENABLED checks instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-04-25Globally replace 'base_contains' calls with 'bb.utils.contains'Otavio Salvador
The base_contains is kept as a compatibility method and we ought to not use it in OE-Core so we can remove it from base metadata in future. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11ptest: Don't enable ptest for nativesdk and cross-canadian packagesTudor Florea
The ptest is useful in context of deployment to the target hence we don't need ptest for nativesdk and cross-canadian packages Signed-off-by: Tudor Florea <tudor.florea@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-12meta/recipes: Remove virtclass referencesRichard Purdie
The virtclass overrides will go away at some point (apart from the multilib one). Change them all to class-xxx instead since people enjoy copy and pasting them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-14ptest: d.keys() is slow, use a list insteadRichard Purdie
Unfortunately d.keys is extremely slow. Using a list in this case should be fine since the addtask lines are immediately above the code and aren't going to change often. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-14ptest.bblass: Fix package QA issues when disabledNathan Rossi
When the ptest distro feature is disabled, a ptest directory is still created in the install phase, This directory is not cleaned up or consumed by any package and will throw a QA error, e.g. ERROR: QA Issue: glib-2.0: Files/directories were installed but not shipped /usr/lib/glib-2.0/ptest ERROR: QA run found fatal errors. Please consider fixing them. ERROR: Function failed: do_package_qa This is caused by the do_install_ptest_base[cleandirs] attribute which is not setup to be conditional on ptest being enabled. This patch refactors the use of PTEST_ENABLED in the *ptest_base tasks, replacing the conditional execution with the removal of the tasks from the build, this prevents any part (including cleandirs) of the ptest tasks from executing when disabled. Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-20ptest: Disable for native recipesRichard Purdie
We don't use or otherwise care about ptest for native recipes. Its therefore pointless to take the performance hit for them and we can disable them. (From OE-Core rev: f3d35bb4719d0b8f8e6fc5976e9dbfc0e2019c2e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20ptest: Fix dependency/ordering issueRichard Purdie
We've seen occasional issues on the autobuilder where files appear during do_populate_sysroot and this is due to the ptest installation happening in parallel. This fixes the order to be deterministic. (From OE-Core rev: 0ed1641d870f4bb5735aeeb7bd29cc196e61b7cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03ptest: ensure do_install_ptest_base task runs in fakeroot contextRoss Burton
As this task is installing files into $D it needs to run inside pseudo so that special permissions and owners are preserved. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30classes/ptest: do not set EXCLUDE_FROM_WORLDPaul Eggleton
Various normal recipes that we expect to build during a world build now inherit this class; it cannot therefore set EXCLUDE_FROM_WORLD. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-30classes/ptest: fix quotingPaul Eggleton
BitBake currently allows using the same quotes outside and inside the value, but it isn't really right, looks odd and might stop working in future. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10ptest.bbclass: add cleandirs flag to do_install_ptest_baseChen Qi
The do_install_ptest_base task should have cleandirs flag, just like the do_install task. The ${D}${PTEST_PATH} directory should be cleaned, Otherwise, there would be similar errors like below if the do_install_ptest_base task is rerun. ln: failed to create symbolic link `xxx': File exists [YOCTO #5129] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10ptest.bbclass: fix error on ubuntu hostChen Qi
The do_install_ptest_base function uses 'type -t' command to check whether do_install_ptest is a function and acts correspondingly. However, the 'type' command is a shell builtin and its behavior is not all the same across Linux distros. On ubuntu, if we use #!/bin/sh as the interpreter for the scripts, as in the case of our intermediate scripts, the '-t' option for the 'type' command is not supported. So the check always fails and the do_install_ptest function, even if defined, is not run. The same problem also applies to the do_configure_ptest_base and the do_compile_ptest_base functions. This patch fixes this problem by avoiding using the 'type' builtin command. [YOCTO #5128] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11ptest bug fixesBjörn Stenberg
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are packaged in the -ptest package. Add QA exclusions to insane.bbclass to ensure -ptest packages can contain any files they need. Disable ptest for native packages. Don't emit errors on missing _ptest functions. Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Anders Roxell <anders.roxell@enea.com> Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07ptest: Move ptest checks from recipes to ptest.bbclassBjörn Stenberg
This patch cleans up ptest implementation in recipes by moving ptest specific code parts into dedicated *_ptest functions. Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-22ptest: Add missed .debug pathBjörn Stenberg
Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-01-18ptest.bbclass: don't add to PACKAGES if disabledChristopher Larson
Without this, we have excessive dependencies leaking into the build. In particular, glib-2.0 was sucking in python modules even if ptest wasn't in DISTRO_FEATURES. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-25Add a new distro feature "ptest".Björn Stenberg
This patch creates a new distro feature "ptest", which creates -ptest packages containing the test suite of the package for running on the target. Test files are installed in /usr/lib/<pkg>/ptest. The patch also includes a change to automake, splitting the "make check" target into separate steps for building and running the tests. Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>