summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
* selftest: DiskMonTest: use POSIX output for dfAlexandru Palalau2014-04-101-1/+1
| | | | | | | | | Without "-P" df splits the output on multiple lines and breaks the test (From OE-Core rev: 81a81807d34e4b2ea28d8ba9c29e5b48a14bbc1f) Signed-off-by: Alexandru Palalau <alexandrux.palalau@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetests.py: Added 'populate_lic' to ignore_patternsCorneliu Stoicescu2014-04-041-2/+2
| | | | | | | | | | | Because the sstate-cache-management script does not remove populate_lic sstate files, we should ignore them when checking for removed files. (From OE-Core rev: 5debc2af6672841c126cec5d747e2e3c6407c8be) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: add a test target controller for EFI targetsStefan Stanacar2014-03-312-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this module is to deploy a test image on a EFI-enabled hardware and run our runtime tests. A bit of background: - testimage.bbclass uses the concept of TEST_TARGET which is a class name that is responsible for target deploying. A layer can provide it's own TEST_TARGET. Right now has OE-core has a QemuTarget and a SimpleRemoteTarget (ssh into an already up and running machine and run tests), the default one being qemu. - basically testimage does something like: target.deploy() try: target.start() runTests() finally: target.stop() This module assumes a running EFI machine with gummiboot as bootloader and core-image-testmaster installed (or similar). Also your hardware under test has to be in a DHCP-enabled network that gives it the same IP for each reboot. One time setup (master image): - build core-image-testmaster with EFI_PROVIDER = "gummiboot" - install the image on the target Test image setup: - build your test image, e.g core-image-sato as you usually do, but with these in local.conf: IMAGE_FSTYPES += "tar.gz" - Now run the tests: INHERIT += "testimage" TEST_TARGET = "GummibootTarget" TEST_TARGET_IP = "192.168.2.3" bitbake core-image-sato -c testimage Other notes: - TEST_POWERCONTROL_CMD (togheter with TEST_POWERCONTROL_EXTRA_ARGS) can be a command that runs on the host and does power cycling. The test code passes one argument to that command: off, on or cycle (off then on). In my case I use something like TEST_POWERCONTROL_CMD="powercontrol.exp test 10.11.12.1 nuc1" in local.conf. Basically my expect script does: 'ssh test@10.11.12.1 "pyctl nuc1 <arg>" and runs a python script there that controls power for a label called nuc1'. The reason why my expect script has to ssh into another machine is because of network topology, and that machine is the one actually connected to the test rack and the power strip. That's why TEST_POWERCONTROL_CMD and _ARGS need to be customized for one's setup, the only requirement being that it accepts: on/off/cycle as the last argument. - if no command is defined it would use classic reboot. This is fine as long as the machine actually reboots (as in the ssh test hasn't failed), but it's useful for "simple-setup-with-one-board-on-the-desk" scenario, where some manual interaction is okay from time to time. [YOCTO #5614] (From OE-Core rev: e00f888a88d0851b088c232dec66418e575a2e90) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bbtests.py: Fixed regex and added bitbake output to ↵Corneliu Stoicescu2014-03-271-4/+4
| | | | | | | | | | | | test_warnings_errors The test failed when more than 1 error or 1 warning is present. Also pasting the bitbake output when the test fails. (From OE-Core rev: abc691026592b406e69f8bf9e4fffe2e6a17fffc) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/qemurunner: search for login string in the entire boot logStefan Stanacar2014-03-111-2/+1
| | | | | | | | | | | | If some service is to spammy we might miss the login, so search in the entire log instead of just the last few lines. Use qemu in regex too (to avoid a login string from some service). (From OE-Core rev: 1117d25fdfabbf1afdc7030e05efc6a32df871e3) 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>
* oeqa/targetcontrol: fix loading a controller using a class nameStefan Stanacar2014-03-111-1/+2
| | | | | | | | | | | | This was wrong and if one would do TEST_TARGET = "SimpleRemoteTarget" instead of TEST_TARGET = "simpleremote" it would complain that there is no such controller when there is. (From OE-Core rev: 47d2049d13ab71e0310e9eedaf307d6c3e530b44) 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>
* oeqa/targetcontrol: allow a custom port for SimpleRemoteTargetStefan Stanacar2014-03-111-2/+7
| | | | | | | | | | | We had the ability to use a custom port for the ssh connection, but we weren't using it. (From OE-Core rev: c1f2a3c41969df0b7f08cf314b2cb7c9a6030092) 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>
* oeqa/utils/qemurunner: use the right kill call so we don't send SIGTERM to ↵Stefan Stanacar2014-03-111-2/+2
| | | | | | | | | | | | | | | | | bitbake-worker After recent bitbake-worker changes [1] this was killing the bitbake-worker, which isn't what we want and kill(-pid) was the wrong call anyway. runqemu.pid is the right PGID as the process was started with preexec_fn=setpgrp (so no need to do os.getpgid(self.runqemu.pid)) [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=15688798520896690561824b2fdc227c8a365c82 (From OE-Core rev: f4bf21b40ec6fa07c4a7bb450e3cfae12128dc2c) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: force some values in local.conf for _sstatetests_noauto.pyCorneliu Stoicescu2014-03-071-0/+10
| | | | | | | | | | | | | | 1) Some values should have default values in order for tests like sstate relocation to be relevant - SSTATE_DIR needs to have default value - SSTATE_MIRRORS need to be unset (we need the sstate files to be created) - TMPDIR needs to be in default location 2) Added conf/auto.conf to list of ported files to secondary build directories (From OE-Core rev: 3b98de79e14c44e70fd72ed94493a674444bdba2) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: optimize code in _sstatetests_noauto.py moduleCorneliu Stoicescu2014-03-071-15/+4
| | | | | | | | | | | | | | | | | 1) Some of the checks made when creating new directories are unnecessary beacause the test will fail anyway if os.mkdir() fails, with the appropriate error message. Removing this code. 2) Moved the adding to tracked paths for deletion of temporary build directories and sstate-cache directories to after they are created. This makes more sense and prevents deletion of these directories if they allready exist and may contain useful data. (From OE-Core rev: d002bcf7f80fd9652d3f310957c99bd1e6c8b3a1) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image-basic / packagegroup-core-basic: rename to *-full-cmdlinePaul Eggleton2014-03-071-1/+1
| | | | | | | | | | | | | | | This more accurately represents what this image and packagegroup are intended to provide (a more complete command-line environment similar to what you would find on a traditional Linux system), and avoids confusion with the similarly named core-image-base and packagegroup-base. Fixes [YOCTO #2424]. (From OE-Core rev: 959396d5319df6d6599cc74077e85182768b92af) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add test for image manifest file creationAlexandru Palalau2014-03-051-0/+7
| | | | | | | (From OE-Core rev: 1542470fa66884d0f7bf67d92916675a8a9820cc) Signed-off-by: Alexandru Palalau <alexandrux.palalau@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/dmesg: Ignore DMA timeout errorsRichard Purdie2014-03-021-1/+1
| | | | | | | | | We see these from qemu images on servers under load. They're not interesting and clutter the build output so lets ignore them. (From OE-Core rev: 053eba4885ab4016f7efc7899ec9e02df3384d11) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: Fix test_sstate_cache_management_script*Corneliu Stoicescu2014-03-021-6/+11
| | | | | | | | | | | Fixed tests for sstate-cache-management.sh that ware failing due to: - recent changes to sstate-cache structure - recent changes to the script itself (From OE-Core rev: 17b518caf253b77101b357564f8ef9e07961f12c) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/targetcontrol: make BaseTarget an abstract classStefan Stanacar2014-02-281-0/+16
| | | | | | | | | | | This should make it clear what methods a subclass needs to redefine. (From OE-Core rev: a4e4de4189cec3076a863c32c98e02766187ab48) 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>
* oe-selftest: Fix for test_rm_old_imageCorneliu Stoicescu2014-02-281-3/+9
| | | | | | | | | | | After recent changes in poky this test was not working as it should. This commit fixes and improves the test logic. (From OE-Core rev: 45709d1eae28fc567c5dca9a48393d56d28f785d) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/targetcontrol: properly get the host ipStefan Stanacar2014-02-251-1/+1
| | | | | | | | | | | | For the SimpleRemote target where we need the host ip and it wasn't set in conf, we tried to determine it automatically. However ip route output isn't the same for every network, we need the last field from the first line. (From OE-Core rev: 19af3ac53690b1bd2fee54827090f59c525d2236) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: smart: don't run in auto mode when rpm is not the pmStefan Stanacar2014-02-131-0/+2
| | | | | | | | | | TEST_SUITES = "auto" would run smart tests even for non-rpm images, which is pointless. (From OE-Core rev: 1913f38d79a56f7d21999b6839835f967ca28abd) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils: targetbuild: take proxy into accountStefan Stanacar2014-02-114-5/+21
| | | | | | | | | | A previous commit broke downloads when proxies are involved, let's fix it. (From OE-Core rev: 97e263b99cbe8184a74f80738fd471cfdef29e0c) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils: targetbuild: don't use bb.fetch anymoreStefan Stanacar2014-02-091-19/+8
| | | | | | | | | | | | | When running tests outside of the build system we can't use bb.fetch anymore. It was nice but tests and their modules need to rely on the data storage only as that gets exported. This module is used by the oeqa/runtime/build* tests. (From OE-Core rev: 3caf8e244ea94f62a93f3b40e73e15ea78fc2880) 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>
* lib/oeqa: add module for running tests outside of the build systemStefan Stanacar2014-02-091-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script will run the exported tests outside of the build system. Simplest way to test this is with a qemu image that you manually start. For an already build image use this in local.conf: TEST_EXPORT_ONLY = "1" TEST_TARGET = "simpleremote" TEST_TARGET_IP = "192.168.7.2" TEST_SERVER_IP = "192.168.7.1" Export the tests: bitbake core-image-sato -c testimage Then: runqemu core-image-sato And: cd build/tmp/testimage/core-image-sato ./runexported.py testdata.json The contents of build/tmp/testimage/core-image-sato can be moved on another machine as long as some paths are updated in the json. The exported data contains paths to the build dir. We only care about DEPLOY_DIR/rpm ( if the rpm and smart tests are enabled), so running the tests on other machine means that the user has to move the contents and call runexported with --deploy-dir PATH: ./runexported.py --deploy-dir /path/on/another/machine testdata.json runexported.py accepts other arguments as well, see --help. [YOCTO #5613] (From OE-Core rev: 087ee840ad642bada6fe0b02311f05a595ea2e65) 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>
* testimage: add ability to export testsStefan Stanacar2014-02-091-11/+6
| | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 155dd52e0f707e06f50756584a50f744ba6b7844) 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>
* oeqa/runtime/systemd: remove race in settle()Ross Burton2014-02-041-14/+8
| | | | | | | | | | | | The settle() function had a race where services could still be activating at two minutes but then when the final log is output, they've activated. Remove this race and generally clean up the code. (From OE-Core rev: 8d107e0a828868702cfe035104c1f0b51da4291e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: allow multiple layers to provide their own TEST_TARGET classSipke Vriend2014-02-023-6/+79
| | | | | | | | | | | | | | | | | | | | | Use a python module "folder" rather than a single module within layers to ensure multiple layers can define a TEST_TARGET class. Current implementation using controllers.py module will only allow a single layer to define test targets. Add a controllers folder as well as a TestTargetLoader class whose job is to load the given TEST_TARGET class from any number of python modules within the oeqa/controllers/ directory of any layer. The only condition will be that layers will need to ensure the TEST_TARGET class name they provide is unique otherwise there is no guarantee which class is instantiated. a bb.warn is used to alude to this if it happens. (From OE-Core rev: 3f25705f4a986e06cbd397aaea52b841c1a1e054) Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: syslog: update --help testStefan Stanacar2014-02-021-1/+1
| | | | | | | | | | | | | | | busybox 1.22 now returns exitcode 0 instead of 1 for --help options, so this test needs to be updated when busybox gets upgraded to 1.22. https://bugs.busybox.net/show_bug.cgi?id=5612 http://git.busybox.net/busybox/commit/?id=efd0698f74caab0a0c8a51228b923ee142e8e278 (From OE-Core rev: 1e560d234b6d3040a7a9f0eb023f1e4a654be1ea) 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>
* oeqa/utils: sshcontrol: rewrite the SSHControl classStefan Stanacar2014-02-021-83/+92
| | | | | | | | | | | | | | | | | | Split the class in two, one to handle the process and the timeout based on output and one for the actual ssh/scp commands. The ssh/scp methods now use the same run method. It does the same thing as before but: - it looks cleaner. - adds support for using a different user than root - optionally, raises an exception when exit code != 0 (that's useful for code outside of tests, where you wouldn't want to check the return code every time as the tests do) (From OE-Core rev: bb14a7598d3c0636dc249f719bde0d9d65b2694d) 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>
* oeqa/runtime: smart: fix adding channelsStefan Stanacar2014-01-291-1/+1
| | | | | | | | | | Without this it won't add core2-64 and similar channels, as the directory name in deploy_dir/rpm uses _ not - as the package arch. (From OE-Core rev: 14e3a8f58e309121760fec70619633281dd9d88c) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: drop restartTarget methodStefan Stanacar2014-01-294-10/+0
| | | | | | | | | | | | | | | Restart is a property of a specific target, not of a test class, should a test really need to restart the target the direct method should be called. Also some tests used this to enforce more ram, which makes sense only for qemu targets only (and the inital reason this was needed isn't valid anymore, qemu machines had the default ram size bumped a while ago). (From OE-Core rev: 333a4326082e500bdbcd323af37e183e74adf617) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: rpm: fix finding the test rpm fileStefan Stanacar2014-01-281-5/+6
| | | | | | | | | | | | | | Translate TUNE_PKGARCH to find the right file (this used to work because tune for qemux86-64 used to be x86_64 now it's core2-64) Also, while using packagedata was nice, it's harder to make the test exportable and runnable outside of the build system. (where oe.packagedata isn't available) (From OE-Core rev: fd0e9ad4d295ca11b33c3e3e11069421dee834e8) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: sshcontrol: Allow alternate port for SSHControlSipke Vriend2014-01-281-1/+3
| | | | | | | | | | Add an optional parameter to SSHControl so the user can specify and alternate port to the default (22). (From OE-Core rev: 091d395e43836575587112ee1696a18c401505bb) Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: New tests for sstate relocationCorneliu Stoicescu2014-01-281-0/+96
| | | | | | | | | | | | Added new tests: - sstate relocation stress testing - rebuild from sstate stress testing (From OE-Core rev: 461ae0bd06da89d31cba2459fb1e6f7e57ad6519) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: sshcontrol: fix false timeout failuresStefan Stanacar2014-01-221-2/+2
| | | | | | | | | | | | | Ocasionally AB shows odd false fails like: http://autobuilder.yoctoproject.org/main/builders/nightly-arm/builds/1/steps/Running%20Sanity%20Tests/logs/stdio This should fix that by checking for eof instead of polling the return code of the ssh process, because the process might still be there. (From OE-Core rev: 3a22b5df5aa38a98b35bc2931d646a2b7702fbec) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: Patch sstate tests to work with new sstate-cache naming and contentCorneliu Stoicescu2014-01-191-13/+15
| | | | | | | | | | | Made modifications to account for: - .siginfo files present in sstate-cache from non sstate-enabled tasks - new naming format for sstate files (From OE-Core rev: d23ad4255ad7465383286fa7805392aa70845ace) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: allow a layer to provide it's own TEST_TARGET classStefan Stanacar2014-01-192-4/+22
| | | | | | | | | | | | Allows a layer to define new classes in <layer>/lib/oeqa/utils/controllers.py and completely control or extend deployment of a target. (core currently has QemuTarget and SimpleRemoteTarget). The value of TEST_TARGET must be the name of the new class. (From OE-Core rev: 9b81aff0aca42353d448b1e9522f89842e23c7b2) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: separated the SStateBase and SStateTests in different modulesCorneliu Stoicescu2014-01-162-42/+54
| | | | | | | | | - SStateBase now has its own module to be imported by itself by other modules like sstatetests.py (From OE-Core rev: 8163854adf87ac42a8f08ee25685d0ce1efb4724) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: renamed sstate.py module to sstatetests.pyCorneliu Stoicescu2014-01-161-0/+0
| | | | | | | (From OE-Core rev: 91115cf06b009427a444abfd4cf0317ae5215c6b) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: New object SStateBase cut off from SStateTests.Corneliu Stoicescu2014-01-161-1/+2
| | | | | | | | | | - SStateBase object contains basic methods used to run sstate related tests - SStateTests now contains only sstate-related tests (From OE-Core rev: 78e929bbcdce1f9a544b230433b93f4fc1f841e2) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/systemd: wait for services to start/failRoss Burton2014-01-141-0/+28
| | | | | | | | | | | | When checking that no services have failed to start, actually wait for services to finish starting by waiting for there not be no units in the "activating" state. (From OE-Core rev: 4d6422a84eba005a6fd788ce18c9dd42b079e2a8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: add test for pythonTing Wang2014-01-062-0/+39
| | | | | | | | | | | Run a python script on the target 1)checks the output. 2)Call os.system method create a testfile (From OE-Core rev: 4465c9368b0c37a3a2c41b68f65de08690a8179b) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: New tests for sstate related operationsCorneliu Stoicescu2014-01-061-0/+226
| | | | | | | | (From OE-Core rev: 014bb6a891ccc7701df3b1f18dadee967ed06c3f) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: rewrite the systemd test moduleStefan Stanacar2013-12-201-48/+45
| | | | | | | | | | | | | | They are basically the same tests but: - they look cleaner, using one single method / assert - output from unittest will be cleaner (and includes a verbose status when needed) - they are better grouped and use a real, active, enabled service (machineid will be dropped and hostnamed was a static service) (From OE-Core rev: 0aa5b97f9e0d8941ce342e9f162dd3b19d4b49bb) 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>
* oe-selftest: added buildhistory buildtime tests in module buildoptions.pyCorneliu Stoicescu2013-12-201-0/+20
| | | | | | | (From OE-Core rev: 0e462295d9db0201fb1ba2b6247ecb05fa7fcee1) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: New test module for OE scripts.Corneliu Stoicescu2013-12-201-0/+60
| | | | | | | | | | Added a new module meta/lib/oeqa/selftest/oescripts.py containing tests for scripts from ${COREBASE}/scripts (From OE-Core rev: 685879739017317f234824689cbd89388d236816) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: New BuildhistoryBase object for buildhistory testing.Corneliu Stoicescu2013-12-201-0/+45
| | | | | | | (From OE-Core rev: 8c77911b0924dfb5b966bc40a541a02a29568603) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: systemd failure case improvementsRoss Burton2013-12-141-3/+7
| | | | | | | | | | | If the hostnamed service can't be started or stopped, show the output from systemctl status to assist debugging. (From OE-Core rev: 024cc1cee3a9954272ecbbff1ba7153725c56dce) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: Add track_for_cleanup method to be used in cleanup tasksCorneliu Stoicescu2013-12-141-0/+15
| | | | | | | | | | | | Added a track_for_cleanup(path) method that removes the given path in the tearDown method. This mechanism can be used to make sure a file or directory we created will be removed at the end of a test, regardless of what happens. (From OE-Core rev: 358415cf604089cc2dab547e231d062b9dc068ee) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: implement add_command_to_tearDown methodCorneliu Stoicescu2013-12-141-1/+17
| | | | | | | | | | | | | Add a new method that can be used by the tester to add a command to the executed in the tearDown stage of the test. This mechanism can be used to make sure certain test-specific cleanup tasks are done in the case of a test failure. (From OE-Core rev: b59466ec341e6596b7ade7f1813b25e454b11a32) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: output more logging from systemd when services have failedRoss Burton2013-12-051-1/+3
| | | | | | | | | | If some services have failed to start, get the status of them and some of their log to help debug the problem. (From OE-Core rev: e371765431be25b81dbdb385233e3db5851e59d0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: print connman status if connman failed to startRoss Burton2013-12-051-1/+10
| | | | | | | | | | If connman isn't running and we're running under systemd, use systemctl to get the state according to systemd and the end of the connman log. (From OE-Core rev: e77bcc8e4baf11701b105d071a979a21a2a303d5) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/selftest: add tests for PR serviceCorneliu Stoicescu2013-12-051-0/+113
| | | | | | | | (From OE-Core rev: 162cfffb32d909f9cac88b4f872173d21524d8ed) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>