aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
AgeCommit message (Collapse)Author
2014-08-29testimage: Add parselogs to the default tests for sato imagesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27classes/testimage.bbclass: add more fields to the sdk TestContextCorneliu Stoicescu
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. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18meta/classes/testimage.bbclass: add testsdk task and enable functionality ↵Corneliu Stoicescu
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> Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30classes/testimage: if start fails, don't try to stopPaul Eggleton
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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05testimage: add task level lockStefan Stanacar
For machines other than qemu it will not be okay to run multiple testimage tasks in parallel. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11testimage: fail if no package manifest is foundStefan Stanacar
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. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-08testimage: add ability to export testsStefan Stanacar
Add the ability to export the tests so that they can run independently of the build system, as is required if you want to be able to hand the test execution off to a scheduler. Booting/deployment of the target is still handled by the build system, as before, only the execution of the tests happens outside of the build system. Tests exported are the ones defined in TEST_SUITES. No tests have been changed as interesting parts of the data store have been exported and tests can continue to query them as before. Small adjustments were made for a couple of oeqa modules though. [YOCTO #5613] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-01-06lib/oeqa/runtime: add test for pythonTing Wang
Run a python script on the target 1)checks the output. 2)Call os.system method create a testfile Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-20testimage: include traceback when loading a test failsStefan Stanacar
Makes it much easier to figure out where a syntax error is. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-03testimage: use the new targetcontrol.py module for running testsStefan Stanacar
This patch makes the necessary changes for using the targetcontrol.py module so that one can run the same tests on a qemu instance or a remote machine based on the value of TEST_TARGET variable: "qemu" or "simpleremote". The default value is "qemu" which starts a qemu instance and it's the with what we currently have. With "simpleremote", the remote machine must be up with network and ssh and you need to set TEST_TARGET_IP with the IP address of the remote machine (it can still be a qemu instance that was manually started). Basically testimage.bbclass now does something along the lines of: - load tests -> deploy (prepare) / start target -> run tests. There were a couple of changes necessary for tests and also some cleanups/renames that were needed to adjust this change. (use ip everywhere when refering to target and server_ip when refering to host/build machine) Also two unnecessary and unsed methods were dropped from sshcontrol. [ YOCTO #5554 ] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18lib/oeqa/runtime: build kernel module on target testStefan Stanacar
Builds a simple Hello World module on target. Added to the defaults for core-image-sato-sdk. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-26testimage: Exclude BB_ORIGENV variableRichard Purdie
The BB_ORIGENV variable isn't picklable and causes failures when generating the task signature for the autorun image mode. We don't want to depend on its contents anyway so lets exclude it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24classes/testimage: add informational messages about tests and do some ↵Stefan Stanacar
cleanup/formatting Adds info about tests run even if they passed (in case of errors log will be printed anyway). Also some style change for qemu object. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-20classes/testimage: remove odd characters in commentsPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-12bitbake.conf: include machine name in DEPLOY_DIR_IMAGEPaul Eggleton
This allows a clean seperation between image outputs from different machines, and makes it possible to have convenience symlinks to make the output ready to deploy. This did require some surgery in runqemu; if explicit paths to the image and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined from bitbake or set in the environment. However the script does try to avoid requiring it unless it really is needed. Corresponding changes were made in the automated testing code as well. Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-28classes/testimage: add support for finding tests in other layersStefan Stanacar
A layer can add tests in lib/oeqa/runtime (provided it extends BBPATH as normal) and enable them with TEST_SUITES_append = " testname". Test module names shouldn't collide though. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-28classes/testimage: increase default boot timeoutStefan Stanacar
While I can't reproduce on local builds, sometimes images fail to boot on AB (which runs many builds at once). Assuming there isn't something weird going on, let's just give it more time. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26classess/testimage: change default test suitesStefan Stanacar
Some new tests were added, safe to have them in the defaults for sato-sdk and sato. Not all of the new tests are here though, either because they aren't applicable to default images or take too long. (like build iptables/cvs/sudoky ones, they can be enabled in local.conf and a special target on AB setups.). Also reorder them a bit. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-13classes/testimage: create a link for qemu boot logStefan Stanacar
The full name for the log is confusing when there are multiple files. Also move the ssh log path stuff where it's needed. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15testimage.bbclass, lib/oeqa: add headers and commentsStefan Stanacar
Adds some comments to testimage.bbclass and the files it calls, just to give an ideea of what it does. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15classes/testimage.bbclass: use a copy of rootfs for testsStefan Stanacar
Make a copy of the rootfs and test that. We can now drop the snapshot option. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15lib/oeqa/runtime: add tests for syslog and dfAlexandru Palalau
Add tests for free space and syslog. Changed in v2: - limit df's output to / - syslog: fix restart in case of systemd Signed-off-by: Alexandru Palalau <alexandru.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15testimage.bbclass, lib/oeqa/utils/qemurunner.py: make boot timeout ↵Stefan Stanacar
configurable and increase it On a loaded host (such as an AB setup where multiple builds run) the 200 seconds timeout might not be enough to reach the login prompt. Also make it configurable so we can set it from local.conf/auto.conf Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09classes/testimage.bbclass: new class for image testsStefan Stanacar
Replacement class for imagetest-qemu.bbclass. It launches a qemu instance and runs test modules defined in TEST_SUITES. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Radu Moisan <radu.moisan@intel.com>