summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/target
Commit message (Collapse)AuthorAgeFilesLines
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-06-183-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: 3248a9e3c5a197321b1c4417509b9309cc3bae97) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/target/ssh: Replace suggogatepass with ignoring errorsRichard Purdie2019-05-201-2/+2
| | | | | | | | | | | We continued to see encoding problems with ssh commands run in oeqa. After much research the conclusion was we should use ignore the errors since some occasional bad locale encoding is better than the unicode decoding issues we were seeing which crashed large parts of tests. (From OE-Core rev: e4037c6911592700799d207ca8c3976afba18e25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/ssh: Avoid unicode decode exceptionsRichard Purdie2019-05-201-2/+2
| | | | | | | | | | | | | | | | | This code really needs to be rewritten to not split potential multibyte characters, for now work around it to avoid exceptions like: File "/home/pokybuild/yocto-worker/qa-extras2/build/meta/lib/oeqa/core/target/ssh.py", line 211, in run data = reader.read(1024, 4096) File "/usr/lib64/python3.6/codecs.py", line 503, in read newchars, decodedbytes = self.decode(data, self.errors) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 0: invalid start byte (From OE-Core rev: 918e15e22c797d52d33c3399324e480aa1a2cc7f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage.bbclass: add support for passing runqemu paramsAlexander Kanavin2019-01-261-2/+2
| | | | | | | | | This is particularly useful when setting up GL tests. (From OE-Core rev: 167a46775059b782c6f82ce8c5a47b27262e95d4) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemu: Add support for slirpYeoh Ee Peng2018-11-231-3/+19
| | | | | | | | | | | | Enable qemu for slirp. Initialize Qemurunner with slirp. Setup ip and port attribute to enable connection with qemu running with slirp. [YOCTO#10713] (From OE-Core rev: 815e05ac4abb42238d6fdeb15d7426759e059ce1) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemu & runtime: qemu do not need ip input from externalYeoh Ee Peng2018-11-231-3/+2
| | | | | | | | | | | Qemu do not use the ip input from external. It will retrieve ip from QemuRunner instance and assign ip value. (From OE-Core rev: 14d99dc6c39c963ba3e0d9a30274846bd5369210) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/target/ssh.py: increase maximum read bytes from 1024 to 4096Chen Qi2018-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When running testimage task for core-image-sato-sdk, the following error appeared. UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 at position 0: invalid start byte Checking the codes, I found it's caused by setting a 1024 limit for the read method of the StreamReader object. Comments from the manual: """ The chars argument indicates the number of decoded code points or bytes to return. The read() method will never return more data than requested, but it might return less, if there is not enough available. """ When running `systemctl status --full' on target, this error occurs. This patch increase the bytes limit to 4096 to fix the error. (From OE-Core rev: f1fad60ae3be4450aca6058d5665fb10a9148b44) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemu: remove elf image typeSaul Wold2018-01-021-1/+1
| | | | | | | | | | | Since we are depercating the ELF image type, we should not test it here either. (From OE-Core rev: c0c10ae9f7e206ee156a68ddbed73c8820c37824) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/target/ssh: Drop command/output logging to debug levelRichard Purdie2017-11-091-1/+1
| | | | | | | | | This ensures the console is kept clear of confusing output but that the main logs contain good debugging information. (From OE-Core rev: caeb5dcfbd3c1d71f8e0eb78b3dd45d5ce349d25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Clean up logger handlingRichard Purdie2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | The logger handling in oeqa was confused at best. This patch: a) Passes in a logger through various qemu runner pieces b) Uses that logger consistently in the code c) Creates a logger for QemuRunner outside the bitbake namespace meaning we don't conflict with the tinfoil logging changes The result of this is more consistency. For runtime tests in testimage, the logs always contain the debug info, nothing is shwon on the console. For the oe-selftests, logs are intercepted and only shown if the test fails. (From OE-Core rev: 4ff678137a55b93c9ba2cbffda34335ba859f704) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core/target/ssh.py: use reader to handle partial dataRobert Yang2017-08-241-2/+3
| | | | | | | | | This can avoid UnicodeDecodeError error. (From OE-Core rev: baa78420d8d8e716935852c9c7b749af0161395a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core/target/ssh.py: replace decode errorsRobert Yang2017-08-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There might be wild strings when read from target (especially when reading ptest results), replace the errors to avoid breaking the test. Fixed: (Not always happen) $ bitbake core-image-sato -ctestimage [snip] status, output = self.target.run('ptest-runner', 0) File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 84, in run status, output = self._run(sshCmd, processTimeout, True) File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 55, in _run status, output = SSHCall(command, self.logger, timeout) File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 258, in SSHCall run() File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 236, in run output = process.communicate()[0].decode("utf-8") UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 4906: invalid continuation byte [YOCTO #11547] (From OE-Core rev: d0d2f892f0bed6adb5ec6fb59d64efcc97c83e19) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/context.py: Fix use of getTarget() with testexportMariano Lopez2017-02-231-1/+1
| | | | | | | | | | | | | | | | The idea on getTarget is to use kwargs to send custom variables to different targets, instead of this, a new variable was added (just used for custom targets) and this broke testexport. So in order to fix it, just add the custom variable to kwargs. This fixes the use of getTarget() in testexport class that was introduced in 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf. (From OE-Core rev: cf138029a1f18f991fc7a28c81d85884942e9d56) 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>
* qemu.py: add 'elf' as supported fstypeJuro Bystricky2017-02-151-1/+1
| | | | | | | | | Add 'elf' as also supported by OEQemuTarget. (From OE-Core rev: c1ec42ee9beb1603012db5cf990cdbf1596b2a3d) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core/target/qemu.py Adds qemu targetMariano Lopez2017-01-231-0/+45
| | | | | | | | | | | | | This adds qemu target to be used in testimage. It uses the current QemuRunner class in order to boot and control qemu. [YOCTO #10231] (From OE-Core rev: 44d4e9d0bb31fbc28d8c1fad8860ff56e5ae043a) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/target Add OESSHTarget to sent commands to targets using SSHMariano Lopez2017-01-232-0/+299
With this commit now it is possible to add targets with SSH for testing. Most of it was imported for existing code, with improvements in log handling. [YOCTO #10234] (From OE-Core rev: 3bc13548df4adb85f09467d200530a9c9f60da04) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>