summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* lib/oeqa: move skeletoninit.py where it belongsStefan Stanacar2013-08-301-0/+0
| | | | | | | | | | | | | OE-core commit fcc59cbcdb1550489d372edf9f465efa7165245f / poky commit 748ddc39e56623f4e48987f0467f4722f6e162f2 added a new test, but in the wrong location. I took the patch from Alex's branch but renamed it from meta/lib/oeqa/runtime/skeleton.py to meta/lib/oeqa/skeletoninit.py before sending. This was unintentional, it should have been under meta/lib/oeqa/runtime. (From OE-Core rev: f12c346ef48cb44be2e356e4cf4f28d015c3f507) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testimage: add support for finding tests in other layersStefan Stanacar2013-08-281-0/+3
| | | | | | | | | | | | | 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. (From OE-Core rev: e1e347a2d509303e1c566450b0f2b485d3d6629f) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: remove some unnecessary checks from setUpModuleStefan Stanacar2013-08-284-8/+1
| | | | | | | | | | | | | | These checks are unnecessary. setUpModule is run when a module is loaded and we shouldn't run commands on the target here, (plus if ssh doesn't work we error out in setup multiple times, instead of skipping the real test, which might depend on test_ssh). (From OE-Core rev: 188acd0a75e188fd7c0d2979acaf13fd18b12106) 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/runtime: smart: add checks for smart outputStefan Stanacar2013-08-261-5/+5
| | | | | | | | | | | | | | | | | | | | | Sometimes smart throws: Committing transaction... Preparing... ######################################## [ 0%] 1:Removing psplash-default ######################################## [100%] error: Couldn't fork %postun: Cannot allocate memory and returns a 0 exit code (it thinks it succesfully removed the package, when in reality it didn't), so we need to catch those specifically. Also, sometimes output from download command is: Saving cache...http://192.168.7.1:49456/rpm/x86_64_x32/psplash-default-0.1+git0+afd4e228c6-r15.x86_64_x32.rpm and that tricks our smart download test, so use a regex there. (From OE-Core rev: 2ac7783e04f5e8e6005f967e1a6dd65d2fc6a19a) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: multilib: fix typoStefan Stanacar2013-08-261-1/+1
| | | | | | | | | | The check was obviously wrong and it surfaced with the recent change in behaviour for skipping tests. (From OE-Core rev: 4a14535cd493cb2bdd46b2a5f2a1cd2b38161f0a) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: change behaviour for unskippable testsStefan Stanacar2013-08-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a test module wants to be skipped because it doesn't apply to the image but it was nevertheless a required test (one in TEST_SUITES), we issued an warning that it was a required test and went on with running the module. Usually all tests in the module failed (e.g gcc tests on a non-sdk image), but this allowed us to know that something went wrong with the image (some package/feature didn't make it). However, instead of just issuing an warning and running the tests it's better to throw an exception. The traceback will tell us what's wrong, and we don't run every single test method. Output will look like this: --snip-- | NOTE: Test modules ['oeqa.runtime.ping', 'oeqa.runtime.ssh', 'oeqa.runtime.gcc'] | NOTE: Found 5 tests | test_ping (oeqa.runtime.ping.PingTest) ... ok | test_ssh (oeqa.runtime.ssh.SshTest) ... ok | ERROR | | ====================================================================== | ERROR: setUpModule (oeqa.runtime.gcc) | ---------------------------------------------------------------------- | Traceback (most recent call last): | File "/mnt/back/yocto/poky/meta/lib/oeqa/runtime/gcc.py", line 8, in setUpModule | skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES") | File "/mnt/back/yocto/poky/meta/lib/oeqa/oetest.py", line 108, in skipModule | "\nor the image really doesn't have the requred feature/package when it should." % (modname, reason)) | Exception: | Test gcc wants to be skipped. | Reason is: Image doesn't have tools-sdk in IMAGE_FEATURES | Test was required in TEST_SUITES, so either the condition for skipping is wrong | or the image really doesn't have the requred feature/package when it should. | | ---------------------------------------------------------------------- | Ran 2 tests in 1.036s | | FAILED (errors=1) | NOTE: Sending SIGTERM to runqemu --snip-- (From OE-Core rev: fd51cecf8b258d9f839a0ecebde69d09f75dc468) 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/runtime: add iptables, cvs and sudoku projects build tests on targetMihai Prica2013-08-263-0/+93
| | | | | | | | | | | Downloads iptables/cvs/sudoku-savant sources and builds them on target. (From OE-Core rev: df4568205c3a7e0b20c6299e29f96bd30560146b) Signed-off-by: Mihai Prica <mihai.prica@intel.com> 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/utils: targetbuild: Add helper class for building packages on targetMihai Prica2013-08-261-0/+63
| | | | | | | | | | | | This class can be used for test cases that configure and build packages on target. (From OE-Core rev: 4b15e82c4fcb0c40b0e316ef2050944eee4418ef) Signed-off-by: Mihai Prica <mihai.prica@intel.com> 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: make it possible to restart the targetStefan Stanacar2013-08-262-7/+28
| | | | | | | | | | | | | Tweak QemuRunner so we can actually restart the qemu target in a test (if we want more memory for example). Also add a restart method to the base test class so that tests can use it. (From OE-Core rev: 9de7fe11967576f4a8b24e653c6b9a02e5f6d85b) 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/runtime: smart: add new smart testsMihai Lindner2013-08-261-11/+91
| | | | | | | | | | | | Add class to be inherited by smart tests, along with more basic tests and tests using a rpm repository. (From OE-Core rev: f6186b4204dcc421b4e616774315c8a2a77fb5c5) Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> 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/utils: decorators: return the decorated methodMihai Lindner2013-08-261-3/+3
| | | | | | | | | | | Decorators should return whatever the decorated methods return. (From OE-Core rev: c92513d6ff3f8f06d937a5cdf4d94708f27c3850) Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> 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/utils: qemurunner: save host IP addressMihai Lindner2013-08-261-8/+3
| | | | | | | | | | | | | | Save host IP address to host_ip. Read /proc/PID/cmdline on host to look for IPs of target and host; instead of running 'ps'. Also removed some extra empty lines from file. (From OE-Core rev: 1fcf10db10fa36430e37c95c9fee27197e73f7a5) Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> 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/utils: new file: httpserver.py useful for serving files over HTTP ↵Mihai Lindner2013-08-261-0/+32
| | | | | | | | | | | | | to the target It can be used by smart repo/channel tests to serve deploy_dir. (From OE-Core rev: e38e18d6923cc3db50b56fa3fc64081fe4aa8669) Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> 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/runtime: rpm: add install and erase testsStefan Stanacar2013-08-261-3/+27
| | | | | | | | | | | | | | Copies to target rpm-doc file from deploy_dir and tries to install and then remove that package. rpm-doc was chosen because it's small, it only adds a few files to target, and it's almost always found in deploy_dir for images with package-management/rpm. (From OE-Core rev: a2d2f2b7b111863d3c50dedded37aab813d9634f) 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/runtime: add vncserver for target testMihai Prica2013-08-261-0/+22
| | | | | | | | | (From OE-Core rev: 56bc5d717b34563ed36c0618305e4ec5080c3a27) Signed-off-by: Mihai Prica <mihai.prica@intel.com> 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/runtime: add adjust date and time testMihai Prica2013-08-261-0/+27
| | | | | | | | | (From OE-Core rev: ede300f44f1770b1e3e5c59f65cf5079379a2bc1) Signed-off-by: Mihai Prica <mihai.prica@intel.com> 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/runtime: add new scp testAlexandru Palalau2013-08-261-0/+22
| | | | | | | | | | | | Copies a 5MB to target using scp, more of an network test than a scp one. (From OE-Core rev: 2ec4a0686b9a91e56dfba3fa2e574c0c531508ff) Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> 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/runtime: add new PAM support testAlexandru Palalau2013-08-261-0/+24
| | | | | | | | | | | New test which verifies some usual commands functionality with PAM support (From OE-Core rev: 06c7914e3354ff4e430a6b664f40e5a71e212761) Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> 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/runtime: add new skeletoninit testAlexandru Palalau2013-08-261-0/+28
| | | | | | | | | | | New test which verifies the usage of skeleton init script available with meta-skeleton layer (From OE-Core rev: fcc59cbcdb1550489d372edf9f465efa7165245f) Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> 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/runtime: add new logrotate testAlexandru Palalau2013-08-261-0/+27
| | | | | | | | | | | | New logrotate test which verifies the log directory change in logrotate.conf. Needs an image with logrotate installed. (From OE-Core rev: 186d79a603b5cbf5a93e6f5dbba5f62ed8d4d8d8) Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> 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/runtime: add a test for lddCornel Stoicescu2013-08-261-0/+19
| | | | | | | | | | | This test checks that at least one path in RTLDLIST exists. (From OE-Core rev: d53ffbf21a6b17f0f0537929a95a502958d82a09) Signed-off-by: Cornel Stoicescu <corneliux.stoicescu@intel.com> 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/runtime: add test for perlCornel Stoicescu2013-08-262-0/+30
| | | | | | | | | | | This test runs a perl script on the target and checks the output. (From OE-Core rev: 95abdbf2d715c9e7e3368f5193167feb5efc6261) Signed-off-by: Cornel Stoicescu <corneliux.stoicescu@intel.com> 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/runtime: add basic test for x32 imagesAlexandru Georgescu2013-08-261-0/+17
| | | | | | | | | | | Checks that an x86-64-x32 image has the right binaries. (From OE-Core rev: da42e38b2bc4a606b717ac302cfc77aefb1a5795) Signed-off-by: Alexandru Georgescu <alexandru.c.georgescu@intel.com> 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.types: add 'path' typeChristopher Larson2013-08-261-0/+18
| | | | | | | | | | | | - path normalization ('normalize' flag, defaults to enabled) - existence verification for paths we know should exist ('mustexist' flag) - supports clean handling of relative paths ('relativeto' flag) (From OE-Core rev: a598242197312fa6d43179c283da2d0873de2919) 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>
* lib/oeqa/runtime: add new systemd testsAlexandru Palalau2013-08-131-0/+35
| | | | | | | | | | | New systemd runtime tests for enable/disable service, start/stop service and list services. (From OE-Core rev: 6386dc718f85210c9b6b9f69878ec9a7847b78de) Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> 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/runtime: rework syslog testStefan Stanacar2013-08-131-7/+16
| | | | | | | | | | | | | Add separate tests for restarting syslog and using logger, and skip the configuration test for systemd images which always fail because syslog's systemd service doesn't read a config by default (see YB#4860). (From OE-Core rev: c75f3e2385dde44ee96e33f4e5d064894dfb7d52) 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: get ip old fashioned way and use tcp serial consoleStefan Stanacar2013-08-132-87/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | The way we read data from the serial console was unreliable and blocking (AutoBuilder seems to hit that often), so change the serial console type from unix socket to tcp and reverse the connection - don't let qemu act as server (wait for a connection). So now the serial console is used to save the boot log and make sure that we reached the login prompt. Until a better way is found this should solve some of the AutoBuilder failures (one being YB#4904). Also we need to use the same method as the old qemuimagetest to get the ip (from the qemu process arguments), because that it's more reliable. The first version used here was to log into the target and use the output of "ip addr show eth0" but then systemd decides that it should rename interfaces, so that was changed to get the ip of the interface that has the default gw, but if there is no default gw we'll get the loopback ip and we end up trying to ssh into the host machine (some recent AutoBuilder runs showed that). Changed in V2: - use -ww for ps, as output might get truncated (From OE-Core rev: 55e78185110937b7e2b143cf1020426d8df58b72) 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: fix wrong var in messageStefan Stanacar2013-08-061-1/+1
| | | | | | | | | | | | | | If nothing matches we should print the text not the match, else we get a nice traceback. Changed in V2: - commit message (From OE-Core rev: 601738fee3e9b7909b63714ca725576c10eec1e3) 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/xorg: use the right ps command for xorg testStefan Stanacar2013-08-031-2/+2
| | | | | | | | | | Use our determined ps command, otherwise test fails for images with procps. (From OE-Core rev: 18e4d014bea3a5748f42e6dac648fa9b02230344) 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: tweak console bootparam and ip commandStefan Stanacar2013-08-031-2/+2
| | | | | | | | | | | | | | Sync serial baud rate with default inittab which should help with apparent boot fails. Also keep a console on tty1. Also we shouldn't assume eth0 it the right interface. (systemd images can rename interfaces to something else). (From OE-Core rev: d5620c0b6782b88f3e6de97b1ddadcf21207fc57) 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: add comment and headerStefan Stanacar2013-08-031-0/+7
| | | | | | | | | | One of the files was missing comment/header, unlike the others. (From OE-Core rev: 054dba3b7b96349e1e20e3a58acd98bb68ab2536) 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: increase and log timeout in outputStefan Stanacar2013-08-031-4/+6
| | | | | | | | | | | | Increase a bit the timeout for ssh commands and also write in the output that the command timed out (it's easier to see that in a test fail than checking the ssh log) (From OE-Core rev: 652a1762c8adc3b8cb1c6db2ee4a5234a7436c8d) 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/oe/terminal.py: add support for MATE desktop terminalsAndre McCurdy2013-07-311-0/+4
| | | | | | | | | | | | A simple clone of the corresponding Gnome class. Without this, devshell fails completely on a default installation of MATE desktop Linux Mint 15. (From OE-Core rev: 8cc078a9c679845464c59028f584d7aba098cc1f) Signed-off-by: Andre McCurdy <andre.mccurdy@entropic.com> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: fix dependecy checkStefan Stanacar2013-07-162-1/+4
| | | | | | | | | | | Adds missing skip for smart test and fix the check (which I somehow broke a while ago). (From OE-Core rev: cf1790d992f067be8d5f9894458f55f6f1bdc61f) 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.bbclass, lib/oeqa: add headers and commentsStefan Stanacar2013-07-163-0/+26
| | | | | | | | | | | Adds some comments to testimage.bbclass and the files it calls, just to give an ideea of what it does. (From OE-Core rev: 8bbb7116cf02466dfc59a17dc7bb51287aeea55b) 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>
* classes/testimage.bbclass: use a copy of rootfs for testsStefan Stanacar2013-07-161-1/+1
| | | | | | | | | | | Make a copy of the rootfs and test that. We can now drop the snapshot option. (From OE-Core rev: ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1) 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/runtime: add tests for syslog and dfAlexandru Palalau2013-07-162-0/+50
| | | | | | | | | | | | | | | Add tests for free space and syslog. Changed in v2: - limit df's output to / - syslog: fix restart in case of systemd (From OE-Core rev: 1b39d57e7b5c9b69d565cf4d188ebc2f14e66ae6) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/oetest.py: provide a ps command for all testsStefan Stanacar2013-07-162-8/+2
| | | | | | | | | | | | Many tests will use 'ps' but we need to know if it's busybox or standard ps. Drop the existing check from the connman test. (From OE-Core rev: 1515d33d2c5b7275a3ac20e07c1db1d8273de796) 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/runtime/multilib.py: use readelf instead of fileStefan Stanacar2013-07-161-3/+6
| | | | | | | | | | | | | file was pulled by rpm in sato images, readelf comes with binutils so it's in ipk/deb too. Also the test was looking at connmand instead of connman-applet (which is what the testcase says and the AB nightly-multilib target installs) (From OE-Core rev: c2c47a002996b8dbcf9b311dff677202b1f11a64) 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.bbclass, lib/oeqa/utils/qemurunner.py: make boot timeout ↵Stefan Stanacar2013-07-161-5/+5
| | | | | | | | | | | | | | 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 (From OE-Core rev: e828571683333e6f18ed56a84e114b5e54975bc7) 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/utils/sshcontrol.py: fix passing command to subprocessStefan Stanacar2013-07-161-23/+17
| | | | | | | | | | | | | | | Don't use shlex.split in subprocess call and also prepend . /etc/profile, because PATH over ssh is always /usr/bin:/bin which isn't what many tests expect. Changed in v2: We now need to use a separate call for scp command. (From OE-Core rev: 1988de2fad86e8e34070ed6573a7be09fff5c0a2) 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/runtime/dmesg.py: whitelist dmesg message for systemd net interface ↵Stefan Stanacar2013-07-161-1/+1
| | | | | | | | | | | | | | | name Messages such as: "systemd-udevd[79]: error changing net interface name eth0 to enp0s3: Device or resource busy" are harmless as systemd can't rename interfaces in qemu (the interface is already active). Alternatively, passing net.ifnames=0 to the kernel will stop systemd renaming the interfaces. (From OE-Core rev: c072fed6531f2ce3c687f8342a97f593ebf37653) 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/runtime: add gcc testStefan Stanacar2013-07-093-0/+67
| | | | | | | | | gcc compile test and support files. (From OE-Core rev: ccbce75335971abf5098a492755e92ca60cf67bd) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: image sanity testsStefan Stanacar2013-07-0910-0/+185
| | | | | | | | | | | | These are basic sanity tests. A test can be force run by setting TEST_SUITES = "ping ssh <module-name>" in local.conf. By default there are suites for minimal, sato and sato-sdk images. (From OE-Core rev: dd3dc2804395f050df74fa936e65ce5e911442eb) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/utils/decorators.py: decorators for test methodsRadu Moisan2013-07-091-0/+40
| | | | | | | | | | | | | Some skip decorators meant only for test methods, providing some kind of test methods dependency. They are used together with a test method name not a condition. These are complementary to python's unittest skip decorators. (From OE-Core rev: 79cb89648702aa80ec986e0026c62948de905b87) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/utils/qemurunner.py: class to handle qemu instanceRadu Moisan2013-07-091-0/+164
| | | | | | | | | | | | | Handles qemu instances (launch, kill, restart, serial connection, logging) Launch is blocking until login prompt and returns to the task. A qemu serial connection is used to save the boot log and get the ip from the image. Changed runqemu script not to error out when using custom serial option. (From OE-Core rev: ee7d64dfcc02ba8f568b17d181e0a58d3c810076) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/utils/oeqemuconsole.py: handle qemu serial console connectionStefan Stanacar2013-07-091-0/+45
| | | | | | | | | | | | | Python's telnetlib Telnet class connects only to AF_INET sockets, but we want to use Unix domain socket for the qemu serial connection, so that's why we override it. Also we add a new read_all_timeout method similar to Telnet's read_all, that read until a match or timeout and logs all output. (From OE-Core rev: 1cfec2f0a1a1ee84cc6b2b6ad890688da85c5e81) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/utils/sshcontrol.py: helper module for running remote commandsStefan Stanacar2013-07-092-0/+100
| | | | | | | | | | Provides a class for setting up ssh connections, running commands and copying files to/from a target. (From OE-Core rev: 683cac9768e0d38fa15ddc5451e6b2333f184033) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/oetest.py: base module for all runtime unittestsStefan Stanacar2013-07-092-0/+101
| | | | | | | | | | | This module contains the base class for all runtime tests and some helper methods. (From OE-Core rev: 7765c27705e90381975fb2b89ea2181287517761) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* TmuxRunning: handle multi-word commandsTyler Hall2013-07-021-1/+1
| | | | | | | | | | | | | | | | Just as in f8ed7446755eeb88191e16749350efa1e7e6197c, tmux wants a single argument for its command. This applies to the "split-window" command as well as "new." Note that this alone is not enough to fix the TmuxRunning devshell when using pseudo because tmux does not preserve the environment that pseudo requires. (From OE-Core rev: 36fb9799d6a449d86acca3be354af56ad87c3151) Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
OpenPOWER on IntegriCloud