summaryrefslogtreecommitdiffstats
path: root/meta/classes/ptest.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* Globally replace 'base_contains' calls with 'bb.utils.contains'Otavio Salvador2014-04-251-2/+2
| | | | | | | | | | | 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. (From OE-Core rev: d83b16dbf0862be387f84228710cb165c6d2b03b) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: Don't enable ptest for nativesdk and cross-canadian packagesTudor Florea2014-03-111-0/+2
| | | | | | | | | | | The ptest is useful in context of deployment to the target hence we don't need ptest for nativesdk and cross-canadian packages (From OE-Core rev: c0c96df9f6d571b6d1e26013822375942003e3b9) 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>
* meta/recipes: Remove virtclass referencesRichard Purdie2014-02-131-2/+2
| | | | | | | | | 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. (From OE-Core rev: d1c073d2813bd913617990cd047507353ea0c09e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: d.keys() is slow, use a list insteadRichard Purdie2014-01-141-1/+1
| | | | | | | | | | 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. (From OE-Core rev: 5901189f0442cefc4d17623547f7358ffc2d37a6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bblass: Fix package QA issues when disabledNathan Rossi2014-01-141-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: def21f3f0bedae51651f1f0fc58b62b8aaaf37ae) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: Disable for native recipesRichard Purdie2013-12-201-0/+1
| | | | | | | | | | | 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) (From OE-Core rev: 16dd4cd5564a19b0a221661205430e01c35673af) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: Fix dependency/ordering issueRichard Purdie2013-12-201-1/+1
| | | | | | | | | | | | 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) (From OE-Core rev: 96aa9bf8880088c9a710c86cc8ee106138152a98) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: ensure do_install_ptest_base task runs in fakeroot contextRoss Burton2013-12-031-0/+5
| | | | | | | | | | As this task is installing files into $D it needs to run inside pseudo so that special permissions and owners are preserved. (From OE-Core rev: 64f0a0bc408d8e32d5e795aeb9fffee0539f5e22) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/ptest: do not set EXCLUDE_FROM_WORLDPaul Eggleton2013-10-301-4/+0
| | | | | | | | | | Various normal recipes that we expect to build during a world build now inherit this class; it cannot therefore set EXCLUDE_FROM_WORLD. (From OE-Core rev: 80f29b04b1d0a9357f193085224ccf2bf8f530fa) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/ptest: fix quotingPaul Eggleton2013-10-301-1/+1
| | | | | | | | | | | 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. (From OE-Core rev: 0af9cf31851896276a219170001047406f45de50) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bbclass: add cleandirs flag to do_install_ptest_baseChen Qi2013-09-101-0/+2
| | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 25885d3b4f679c33a514d858bc20b0e21aa63721) 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>
* ptest.bbclass: fix error on ubuntu hostChen Qi2013-09-101-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: d5a4f031b460437e9501e4e65194ce94d3641130) 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>
* ptest bug fixesBjörn Stenberg2013-04-111-12/+5
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978) 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>
* ptest: Move ptest checks from recipes to ptest.bbclassBjörn Stenberg2013-03-071-6/+29
| | | | | | | | | | | This patch cleans up ptest implementation in recipes by moving ptest specific code parts into dedicated *_ptest functions. (From OE-Core rev: 1e4d267a3cbd2135a5de10519814087050b766b7) Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: Add missed .debug pathBjörn Stenberg2013-02-221-1/+2
| | | | | | | | (From OE-Core rev: f8bf3c65327c6e04c19a7dda623c7433f5d97417) Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bbclass: don't add to PACKAGES if disabledChristopher Larson2013-01-181-1/+1
| | | | | | | | | | | | 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. (From OE-Core rev: 7bf5ee91aa84a6fa85d6da361b64139889faa172) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add a new distro feature "ptest".Björn Stenberg2012-12-261-0/+34
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. (From OE-Core rev: 6f92e7f8891008dd3c89325d3fbe2da853372326) Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>