summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* testimage: disable build tests for qemumips and qemumips64Joshua Lock2016-10-091-0/+6
| | | | | | | | | | | | | | | | | It's not uncommon for qemumips[64] builds on the Yocto Project autobuilder to fail during Sanity Tests after a very long timeout period. This is due to the MIPS emulation in QEMU being slow and some of the build tests taking a very long time on MIPS machines. This patch works around this slowness by disabling the more complex build tests for QEMU MIPS machines. [YOCTO #10340] (From OE-Core rev: 4a1c04c0d509b2cda9b2ccd5a80523c05fa279c6) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Use bb.fatal() instead of raising FuncFailedUlf Magnusson2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. (From OE-Core rev: 5f8eb6726a492d259bfe25b0bbce2333c9505504) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Add package manager dependencyMariano Lopez2016-09-231-0/+4
| | | | | | | | | | | | | | | | The feature to install packages in the target requires to build the package manager. It would fail, with very obtuse errors, if a test requires to install something and the package manager hasn't been build. This will add the package manager as dependency for testimage. [YOCTO #10260] (From OE-Core rev: cf548fd85297585cc5688eda45ee332200bbd4b7) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: add createrepo-native to testimage dependsbavery2016-09-141-0/+1
| | | | | | | | | | | The smart tests need createrepo to be in the native sysroot. It needs to be one of the depends for testimage. (From OE-Core rev: 2f1a44d33d9ecceef69d11ef92c5369314cb3bf5) Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testimage: When image is systemd, enable debug log levelAníbal Limón2016-08-011-1/+4
| | | | | | | | | | | | | In order to get more information about systemd boot process to be able to debug random failures due to high I/O. [YOCTO #9299] (From OE-Core rev: a0bb64973e767c3b8e0bae18ee84ed92693922f0) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: INHERIT -> IMAGE_CLASSESRobert Yang2016-07-201-1/+1
| | | | | | | | | | Use IMAGE_CLASSES which is only seen by image recipe. (From OE-Core rev: 7be8f1a9dad4512c3a979ad744e223edb38fccc6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: swap sudoku for galculatorRoss Burton2016-07-201-4/+1
| | | | | | | | | | Also delete the removal of suduko for qemumips, as galculator builds fine on that hardware now. (From OE-Core rev: 4a81b3f669073455c9b2ee1514c43b96df9f7faa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Make dependency of cpio when using RPMsMariano Lopez2016-06-071-0/+2
| | | | | | | | | | | | | | Exctraction of RPMs needs cpio, not all distros include cpio by default, so we need to build it. [YOCTO #8694] (From OE-Core rev: 95cd427b3887b087533fba11c67ef9bc173f9aa5) (From OE-Core rev: 5a4c73bd3f2bbba2ad5413367fa7ca2f625ffdd7) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oetest.py: Add install/uninstall functionality for DUTsMariano Lopez2016-06-071-0/+18
| | | | | | | | | | | | | | | | Add the functionality to install/unistall packages in the DUTs without the use of the package manager. This is possible with the extraction introduced in package manager class. testimage and testexport bbclasses has been modified in order to support this new feature. [YOCTO #8694] (From OE-Core rev: b7111d9e9d64d21f57729d1ac1865aea6e54cc8b) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Remove exported testMariano Lopez2016-05-191-120/+17
| | | | | | | | | | Exported tests now have their own class, so the code in testimage is not needed anymore. (From OE-Core rev: bd4dbe4f5ba334690fcb6f26eb06c793ac026b55) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: reuse generic test suitesAlex Franco2016-02-281-5/+7
| | | | | | | | | | | | | Modify existing default test suites to reuse the new generic test suites. Related to [YOCTO #8410] (From OE-Core rev: 1da1bbc88b1ec1476107003f47f7b240d0794165) Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: add generic, image test suitesAlex Franco2016-02-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Add generic test suites MINTESTSUITE, NETTESTSUITE, DEVTESTSUITE to group common test suites. Add DEFAULT_TEST_SUITES_pn- variables for: * core-image-minimal-dev * core-image-full-cmdline * core-image-x11 * core-image-lsb * core-image-lsb-dev New default test suites use generic test suites. Existing default test suites not modified. [YOCTO #8410] (From OE-Core rev: 8d194c6300964a393b6b69b7d06c0a729a5f8b5f) Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testimage: Fix exportTests function.Aníbal Limón2016-02-101-1/+1
| | | | | | | | | | | | | | With new structure of TestContext now holds suite and variable that contains unittest instances, it can't be exported using JSON causing and exception. Adds the suite variable for avoid export it. (From OE-Core rev: cecc7ec2bcb28d7d8a3277fb097efbbe13adff1c) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oetest.py/TestContext: Move loadTests and runTests inside it.Aníbal Limón2016-02-101-3/+3
| | | | | | | | | | | | Method's for loadTests and runTests make sense to define inside TestContext because it can be different around Image, SDK, SDKExt. (From OE-Core rev: 03af7b99e3ce36ce3e29dc31e33d2cc74eb14849) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage/testsdk: Move get test suites routine inside TestContext.Aníbal Limón2016-02-101-9/+2
| | | | | | | | | | | In order to provide better abstraction move functions to get the test suite inside the TestContext. (From OE-Core rev: 552285688441330440bd1bc138aeaea87549024a) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage/testsdk: Modularize TestContext.Aníbal Limón2016-02-101-37/+3
| | | | | | | | | | | | Move anonymous duplicated class TestContext from testimage/testsdk to oeqa/oetest now we have two new classes ImageTestContext and SDKTestContext with common code in TestContext class. (From OE-Core rev: 593f2fdf6ee94c5f91761a669048da3598cbe3fa) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testimage: Add defeault inherit for testsdk.Aníbal Limón2016-02-101-0/+2
| | | | | | | | | | | For compatibility adds default inherit of the new class testsdk for now, we need to review the code base. (From OE-Core rev: a9861f6a0fd10c2a56129f2f0a7cdd806912290f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testsdk: Add new class testsdk.Aníbal Limón2016-02-101-98/+0
| | | | | | | | | | | | | | | | | Moves all the testsdk code from testimage in order to have it's own class because new tests will be added for extensible SDK. The old paths for store logs "${WORKDIR}/testimage" and sdk "${WORKDIR}/testimage-sdk" was maintained for compatibility may be change to point testsdk after review the codebase. The dependency of QEMU was removed because isn't needed. (From OE-Core rev: b30edc18866865ec757b3fd86eb84de530720acf) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Modularize helper functions for get test lists.Aníbal Limón2016-02-101-74/+4
| | | | | | | | | | | | | Test lists functions can be used in other parts so modularize it and move to oeqa/oetest.py library. Testimage class was updated to meet the new sign of the functions. (From OE-Core rev: c9f771533af70e7ccb1e7064e58926cfaee7367a) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Add expand parameter to getVarFlagRichard Purdie2016-02-041-1/+1
| | | | | | | | | | | | | | | | This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g' -i `grep -ril getVar *` In this case, the default was False, but True was used since in most cases here expansion would be expected. (From OE-Core rev: 42a10788e89b07b14a150ced07113566cf99fcdd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: remove VNC test, x11vnc isn't in oe-core anymoreRoss Burton2016-01-071-3/+3
| | | | | | | | | Now that x11vnc won't be in Sato images we don't want to test it. (From OE-Core rev: 90ff7219332d9651fcdfc895d61fb73a46ffde78) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/testimage: Add support for test folder export.Lucian Musat2015-11-161-1/+13
| | | | | | | | | | | | If tests are organized in folders then it will copy the whole folder to the export location. This should keep the original directory structure for exported oeqa/runtime. (From OE-Core rev: 8fe45badd3dfe44fa5161229324b6439594123fd) Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: remove dmesg testRoss Burton2015-11-161-2/+2
| | | | | | | | | This has been obsoleted by parselogs. (From OE-Core rev: 05132fd236835db71d3e763b4d6ce01fcf14741a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Added IO commands to dumpsMariano Lopez2015-10-011-0/+2
| | | | | | | | | | | | | | This change just add two more commands to the host dumps to get more information related to the IO. [YOCTO #8412] (From OE-Core rev: 9c9fd32105bd1a5e1c01f9dd5d1a56ceef12554e) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/testimage: Add ability to run single test from suite.Lucian Musat2015-10-011-0/+7
| | | | | | | | | | | Just like we have in oe-selftest, you can add <filename>.<Class>.<testname> in TEST_SUITES in order to run just that test (From OE-Core rev: 3bf5204315fedc586fdf641583cfdb2c1a78c5c0) Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/testimage: Remove absolute path to oeqa from jsonLucian Musat2015-09-281-1/+10
| | | | | | | | | | | | In the json file the whole datastore is serialized which contains absolute path to the oeqa folder. This breaks the functionality when trying to run the tests from other machines. (From OE-Core rev: 94057ccc70aa3fe29d774f571a65f56fd1285d4c) Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Fix break introduced with SIGTERM handlingMariano Lopez2015-09-231-9/+11
| | | | | | | | | | | | | | | | | | | | The SIGTERM introduced another break into runexported test, the handler is in the class TestContext while exporting it will try to convert the singnal handler to JSON, and this will throw an exception. The SIGTERM handler is not needed in the exported test, so this change will remove the handler before exporting the test. Also when a test is exported the target is not deployed/started anymore, it is not necessary. [YOCTO #8239] (From OE-Core rev: 94ab9892e87f159840432fdbfb3873d4496d4786) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: Don't require an image manifestRandy Witt2015-09-231-5/+11
| | | | | | | | | | | | | Sometimes an "image" may not actually have a manifest file such as when using a "baremetal kernel". This change allows for a user to set a IMAGE_NO_MANIFEST flag to 1 in order to inform the code that there is no corresponding manifest that should exist for an image. (From OE-Core rev: 78f5c3cb3971c31a950deb5cab8992f3ba577440) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Handle core-image-lsb-sdk qemumips test restrictionRichard Purdie2015-09-121-4/+9
| | | | | | | | | | On qemumips, some tests are slow to the point of the autobuilder appearing hung. We therefore specifically exclude buildsudoku but to do this, we need to list the tests we expect to work on core-image-lsb-sdk. (From OE-Core rev: cf03765705c6cd26c1a904b62b9aca8f914f44aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Fix SDK extraction error handlingRichard Purdie2015-09-121-1/+4
| | | | | | | | | Currently if the SDK fails to extract, no error is shown and the test is marked as passed! Clearly this is incorrect, fix it to correctly raise an error. (From OE-Core rev: fb2235a21e45fa1a47c3b7a9a6a72c515ef10dd1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: handle SIGTERM to conclude runqemuMariano Lopez2015-09-091-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | In the current state if a SIGTERM is sent to the testimage worker, the worker will exit but runqemu and qemu won't exit and the processes need to be killed manually to free the bitbake lock. This allows to catch the SIGTERM signal in testimage, this way it is possible to stop runqemu and qemu and allow to free the bitbake lock. Also this allows to skip the rest of the tests when running the tests in qemu or real hardware. This also solves minimal breaks in the setup of the runtime test when checking if qemu is alive. [YOCTO #8239] (From OE-Core rev: 2694d2f17d597b44fcc7aed5f6836081fa88a6b3) Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: filter proper test cases by tagszjh2015-09-041-0/+3
| | | | | | | | | | | If a test case is decorate by oeqa.utils.decorators.tag, this case will by add a tag, testrunner will filter these tags by TEST_SUITES_TAGS [YOCTO #7849] (From OE-Core rev: 085589b1018ba4d950baf7bcfb499be02c1b29fc) Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runexported: Make it compatible with host dumpMariano Lopez2015-09-031-1/+5
| | | | | | | | | | | | | | Currently it is not possible to run a exported test, but this patch will allow to use the HosDumper class when running a exported test, otherwise the HostDumper class will break runexpored test. [YOCTO #8118] (From OE-Core rev: 25814dbdd12db0499e4d81876873158e1b8a4fcc) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dump: allow to have datastore vars on dump commandsMariano Lopez2015-08-301-2/+5
| | | | | | | | | | | | | | | This allows to have datastore variables in the dump commands and will get the data when a new instance it's created. Also this remove special cases from the commands. [YOCTO #8118] (From OE-Core rev: 384927eb8d52bc5f14c63c8421aa62ee859587f0) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dump: Created new classes for dump host and targetMariano Lopez2015-08-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | It makes sense to separate the dump commands from the oeRuntimeTest class, this way it can be used in all the test context. These are the changes included in this patch: - Created classes: BaseDumper, HostDumper, TargetDumper - Create an instance of HostDumper in imagetest.bbclass and add it to TestContext class, this way any class that have access to the TestContext would be able to dump logs from the host - Create an instance of TargetDumper in QemuTarget class after get the runner, this way it is accessible during the tests. [YOCTO #8118] (From OE-Core rev: ad10af6be343b5425fde43055263b0744c161cb3) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Run commands in target and host when test failsMariano Lopez2015-08-301-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modify three files altought two of them are minimal modifications. This version includes the changes proposed by Paul. testimage.bbclass: Create new vars for easy modification of the dump directory and commands to be run on host and target when a test fails TESTIMAGE_DUMP_DIR: Directory to save the dumps testimage_dump_target: Commands to run on target testimage_dump_host: Commands to run on host oetest.py: - Allow to use the vars defined in testimage class - Now able to run commands in the host and dump the results - Fix an issue with the condition where to run the dump commands (Before it run the commands every test after a failure, now it runs the commands only in tests that failed) - Fix the output to stdout [YOCTO #8118] (From OE-Core rev: 26fe645457633f90bb5ddbb12f5f7b9ca4a06cc5) (From OE-Core rev: 7b4fbbf979ed22434b8e3f83ae145139bb0d9fc7) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: testsdk fixes/improvementsRichard Purdie2015-08-011-34/+33
| | | | | | | | | | | | | | | | | | The "bitbake meta-toolchain" comment is dated and incorrect, fix to point at -c populate_sdk. If a toolchain contains multiple environment files, iterate them and run the sdk test suite on each on in turn rather than giving a fatal error and giving up. Also improve the debug output so that rather than PN, it also show the toolchain tarball under test, and the environment file name its using. Also enable the accidentally disabled cleanup code. (From OE-Core rev: 44c8b1bd58397db85e6f7bb9a57f0d57d2c69ad5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Add support for test suites manifest fileszjh2015-07-091-2/+24
| | | | | | | | | | | | Allow the list of TEST_SUITES to be read from a list of manifest files in the TEST_SUITES_MANIFEST variable. [YOCTO #7848] (From OE-Core rev: c270148b3f0e87bbaafbcffbca4ee7b965be6569) Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Support full TC path such oeqa.runtime.pnp.get_memory_size in ↵zjh2015-07-091-0/+3
| | | | | | | | | | | | | | | | | | | | TEST_SUITES If a TC name start with "oeqa", it is thought as a full TC path. if not, follow original logic (assume under oeqa.runtime) For example: TEST_SUITES = "oeqa.runtime.pnp.get_memory_size oeqa.runtime.sanity.reboot" will run these two case when bitbake -c testimage [YOCTO #7834] (From OE-Core rev: 2c3fe7351edd954230b14443f82914a3f70e8a40) Signed-off-by: zjh <junhuix.zhang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Don't test xorg/vnc on qemuarm64Richard Purdie2015-06-271-0/+4
| | | | | | | | | | | The qemuarm64 machine doesn't have graphics so don't test xorg/vnc as they won't work. [YOCTO #7103] (From OE-Core rev: 27d17c662aa103dc728f14e78cac772546a9e5dc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Handle ipk/deb packaging format tests correctlyRichard Purdie2015-06-271-2/+4
| | | | | | | | | | | The default test list only works for rpm packaging. This fixes it for deb and ipk too. (From OE-Core rev: 210c8926405fcf695ec00f5768f29ba198320d6a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Improve sdk handling of TEST_SUITESRichard Purdie2015-04-291-1/+3
| | | | | | | | | | Currently TEST_SUITES is used for both target image and sdk versions which can be confusing. This introduces TEST_SUITES_SDK for the sdk version of the code so that the different test sets can be specified independently. (From OE-Core rev: ffd84177c68a6c86e654a9ba2512c299b40ec5e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Fix sdk test manifest handlingRichard Purdie2015-04-291-1/+7
| | | | | | | | | Fix SDK_MANIFEST -> SDK_TARGET_MANIFEST and add support for host version too which is useful in SDK QA tests. (From OE-Core rev: df91dd8d064dc3e59c7f057d3f869500a233a76f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: sort modules based on dependenciesPatrick Ohly2015-04-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | TEST_SUITES="auto" is useful to run all suitable tests without having to hard-code the list. However, it did not take test dependencies into account, which can be an issue for tests which really depend on some other test to run first. To fix this, modules get loaded in the order determined by TESTS_SUITES, but then get re-ordered based on dependencies derived from @skipUnlessPassed before running them. The original order is used to break ties when there are no dependencies, so reordering only occurs when really necessary. @skipUnlessPassed gets extended such that it makes the test name a method depends on available for inspection by the test loader in oetest.py. Unfortunately Python's unittest offers no API to inspect tests in a TestSuite, so the code has to rely on implementation details to find all tests. The worst that can happen when the implementation changes is that tests are not found and reordering does not happen. (From OE-Core rev: 6e4543a35836c572b23b9f8162b19d1e038d3ed2) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Add parselogs to the default tests for sato imagesRichard Purdie2014-08-291-2/+2
| | | | | | (From OE-Core rev: d373d4332a03eb71c1112b8dd51052e56ca4fa59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testimage.bbclass: add more fields to the sdk TestContextCorneliu Stoicescu2014-08-271-0/+8
| | | | | | | | | | In order to use hasFeature and hasPackage methods in sdk test modules, we need specific fields to be set in the TestContext object. Adding pkgmanifest, imagefeatures and distrofeatures to the TestContext. (From OE-Core rev: cd342b399b2d78724032cdd7042968d3238cd548) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes/testimage.bbclass: add testsdk task and enable functionality ↵Corneliu Stoicescu2014-08-181-7/+90
| | | | | | | | | | | | | | | for it. - add new testsdk task for meta-toolchain testing. - enable the get_tests_list method to work with sdk tests. - add default TEST_SUITES value for meta-toolchain package NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: b78bc50904d53d5091729de481b99cc3ac4aaa1e) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testimage: if start fails, don't try to stopPaul Eggleton2014-04-301-1/+1
| | | | | | | | | | | | If we couldn't start the target, it doesn't make sense to try and stop it here since logically it shouldn't now be in any kind of "started" state. (It's the start function's job to clean up after itself if it fails - to that end, fix up the QemuTarget class so that it does.) (From OE-Core rev: 819ebddae6b78120e5e082423793ff988419b5c4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: add task level lockStefan Stanacar2014-03-051-0/+4
| | | | | | | | | | For machines other than qemu it will not be okay to run multiple testimage tasks in parallel. (From OE-Core rev: 9560305a9e28316438cb57421afc7877890c4b76) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: fail if no package manifest is foundStefan Stanacar2014-02-111-2/+5
| | | | | | | | | | | | | Sometimes we may forget to actually build the image we want to test (when testimage task is called manually). Instead of an ugly traceback we should fail nicely. The manifest is written after the rootfs so this ensures the image was actually built. (From OE-Core rev: 85c8dd4170a88a5d7f3d9ca181e75720302727c5) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>