Commit Graph

1485 Commits

Author SHA1 Message Date
Ross Burton
696cf580a5 oeqa/recipetool: change the CMake test to use taglib
The current test builds Navit, which uses GTK+ 2.  As GTK+ 2 is being removed
from oe-core, change the test to build taglib instead.

(From OE-Core rev: f627bce009dd275df807ffbc53b880c2490559ae)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-11 09:32:50 +01:00
Richard Purdie
2a6094ca8c oeqa/bbtests: Tweak test bitbake output pattern matching
The output from bitbake will change slightly soon due to runqueue changes,
adpat the test now to account for both the old and new cases.

(From OE-Core rev: 78fcea74517de4793cc0ecc97bce7f5c7dcd44c0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-09 23:30:44 +01:00
Chen Qi
5fc7930064 devtool.py: track to clean devtool.conf in test_create_workspace
`devtool create-workspace' would create devtool.conf, so track to
clean it up. Otherwise, this devtool.conf file would mess things up.

e.g.
oe-selftest -r devtool && oe-selftest -r devtool -j 2
AssertionError: '/PROJ_DIR/build-selftest-st-15753/workspace/conf/layer.conf' does not exist : Workspace directory not created

This is because the devtool.conf is also copied to build-selftest-st-xxxx
directory, resulting in devtool to create and use workspace specified
in this file.

(From OE-Core rev: a0a96db23686a38235fb0373e75e8b2951216c18)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03 17:00:57 +01:00
Joshua Watt
17268ae841 oeqa: Test bitbake --skip-setsecene
Tests the bitbake --skip-setscene option to verify that it correctly
reuses tasks previously restored from sstate, but doesn't execute new
sstate tasks

(From OE-Core rev: af10c620b1496bf5224d0628a92cb42e9cd362a8)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03 17:00:57 +01:00
Robert Yang
15cdacb8c0 oeqa: Cleanup /usr/bin/env python
(From OE-Core rev: eb79217b8761816a21c8f7bed3c5379c1b9230ea)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-30 22:40:52 +01:00
Richard Purdie
897639d7dc oeqa/runtime/syslog: Add delay to test to avoid failures
On a loaded builder we've seen the log message not make it to the log file
before the ssh command completes. Add a short delay to try and ensure
this does happen. There is unforunately no way to flush syslog in all
cases we test.

(From OE-Core rev: 66322b689e46520647e2d94d5e3f3ce282a41247)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Richard Purdie
2e91163d59 oeqa/runtime/oesyslog: systemd syslog restart doesn't change pid
The systemd-journald process doesn't restart/change the way syslog
does, don't test/error in this case.

(From OE-Core rev: be48190dca0643df4881624d29c2eae453395919)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Richard Purdie
abfe4b3d5c oeqa/runtime/syslog: Improve test debug messages
Its useful to test whether the restart command returned an error code and
exit early from the test if so.

Also add different messages to tell if the syslog processes didn't
die or didn't restart.

(From OE-Core rev: f19e95b8571a0d8213c4dec0da056e3d243fbbd1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Jon Mason
3e2ab10159 oe_syslog.py: Handle syslogd/klogd restart race
syslogd and klogd can occasionally take too long to restart, which
causes tests to fail by starting before the log daemons are ready.  To
work around this problem, poll for up to 30 seconds on the processes to
verify the old ones are killed and the new ones are up and running.
Similarly, add checks for rsyslogd and systemd-journald to possibly
catch issues with those daemons.

[YOCTO #13379]

(From OE-Core rev: dc73872b828ea271678fa624c15199364a5cba9e)

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Ross Burton
bb75a12425 oeqa/buildoptions: check that Fortran code actually cross-compiles
Don't just test that we can build the cross-compiler, but test that it actually
can cross-compile some Fortran.

The quadmath dependency is now handled in gcc-runtime and isn't needed in this
test (as per local.conf.sample.extended changes).

There's also no need to build libgfortran explicitly, as fortran-helloworld depends on it.

(From OE-Core rev: 4b43c655ed5ff8b9d2662730526811220b21ff8c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-27 12:20:36 +01:00
Chen Qi
4a36552ef9 oeqa: avoid class setup method to run when skipping the whole class
For now, even if we have specified to skip the whole module/class via
command line, e.g., `oe-selftest -R gotoolchain', the class setup method
is still run. This at least results in unnecessary builds, and at worst
results in ERROR, if the setup method fails.

So improve the skipping mechanism to avoid class setup method to run
when specified to skip.

(From OE-Core rev: b0b79bf65f5e5e65958090a4a88622b42df896bf)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-21 15:32:36 +01:00
Chen Qi
44d5ec6d74 context.py: avoid skipping tests by meaningless command argument
Currently `oe-selftest -R a' will skip 'archiver' tests. This is
not expected. Fix it so that the '-R' should be followed by actual
module/class/test names.

(From OE-Core rev: de3b070fc2ddd0b63a324679ec5adbe30142fc22)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-21 15:32:36 +01:00
Ross Burton
85075b80d6 oeqa/logparser: ignore test failure commentary
The output format for Python and GLib both can be of this form:

FAIL: foobar (Segmentation fault)

In this case the test is called foobar not foobar_segmentation_fault.

(From OE-Core rev: 0219e9bd0273661b4b70df97e5762f77b3ac3e8c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-20 13:14:21 +01:00
Anuj Mittal
4782ccbbde runtime/cases/logrotate: make test more reliable
By default logrotate uses 'dateext' in logrotate.conf which results in a
date string being appended at the end of log name. In cases when a test
that installs configuration in logrotate.d is executed first (dnf for
example), it might result in errors when logrotate test is executed:

error: destination /var/log/dnf.librepo.log-20190528 already exists, skipping rotation
error: destination /var/log/dnf.rpm.log-20190528 already exists, skipping rotation
error: destination /var/log/hawkey.log-20190528 already exists, skipping rotation

Tweak the test to use it's own temporary configuration that doesn't
enable dateext.

Fixes [YOCTO #13363]

(From OE-Core rev: d0a30c1c57edc9a724658e2ed312b34eed3af5a9)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19 22:13:39 +01:00
Chen Qi
f25d8604ea manifest.py: fix test_SDK_manifest_entries
TOOLCHAIN_OUTPUTNAME could be overridden. So use this variable directly
instead of its default value ${SDK_NAME}-toolchain-${SDK_VERSION}.

(From OE-Core rev: 35a13468f551fff6305ba1ebbcb5dd28e99ec050)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19 12:46:43 +01:00
Chen Qi
1a6d32833e context.py: fix skipping function
The current codes to skip test cases are logically correct, but they
do not work correctly in reality. It does skip the tests as the command
line argument specifies, but the related information is wrong.
e.g.
$ oe-selftest -R archiver bblayers runtime_test
2019-06-17 09:24:53,764 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2019-06-17 09:25:06,309 - oe-selftest - INFO - Adding layer libraries:
2019-06-17 09:25:06,310 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta/lib
2019-06-17 09:25:06,310 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib
2019-06-17 09:25:06,310 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-selftest/lib
2019-06-17 09:25:06,312 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf
2019-06-17 09:25:10,521 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2019-06-17 09:25:10,522 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2019-06-17 09:25:10,522 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "runtime_test"'
2019-06-17 09:25:10,522 - oe-selftest - INFO - Skip by the command line argument "runtime_test"
2019-06-17 09:25:10,523 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver)
2019-06-17 09:25:10,523 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "runtime_test"'
2019-06-17 09:25:10,523 - oe-selftest - INFO - Skip by the command line argument "runtime_test"

The archiver.Archiver.xxx tests should be skipped by 'archiver' command line
argument, not 'runtime_test'.

Change to use a function generator to achieve the desired effect. After the change,
the effect is as follows.

$ oe-selftest -R archiver bblayers runtime_test
2019-06-17 09:19:06,223 - oe-selftest - WARNING - meta-selftest layer not found in BBLAYERS, adding it
2019-06-17 09:19:19,598 - oe-selftest - INFO - Adding layer libraries:
2019-06-17 09:19:19,599 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta/lib
2019-06-17 09:19:19,599 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-yocto-bsp/lib
2019-06-17 09:19:19,599 - oe-selftest - INFO - 	      /buildarea5/chenqi/SWAT/poky/meta-selftest/lib
2019-06-17 09:19:19,602 - oe-selftest - INFO - Running bitbake -e to test the configuration is valid/parsable
2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/chenqi/SWAT/poky/build-selftest/conf/local.conf
2019-06-17 09:19:24,368 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_allows_to_filter_on_recipe_name (archiver.Archiver)
2019-06-17 09:19:24,369 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,369 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,369 - oe-selftest - INFO - test_archiver_filters_by_type (archiver.Archiver)
2019-06-17 09:19:24,370 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,370 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,370 - oe-selftest - INFO - test_archiver_filters_by_type_and_name (archiver.Archiver)
2019-06-17 09:19:24,370 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,371 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,371 - oe-selftest - INFO - test_archiver_srpm_mode (archiver.Archiver)
2019-06-17 09:19:24,371 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "archiver"'
2019-06-17 09:19:24,372 - oe-selftest - INFO - Skip by the command line argument "archiver"
2019-06-17 09:19:24,372 - oe-selftest - INFO - test_bitbakelayers_add_remove (bblayers.BitbakeLayers)
2019-06-17 09:19:24,373 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "bblayers"'
2019-06-17 09:19:24,373 - oe-selftest - INFO - Skip by the command line argument "bblayers"
2019-06-17 09:19:24,373 - oe-selftest - INFO - test_bitbakelayers_createlayer (bblayers.BitbakeLayers)
2019-06-17 09:19:24,373 - oe-selftest - INFO -  ... skipped 'Skip by the command line argument "bblayers"'
2019-06-17 09:19:24,374 - oe-selftest - INFO - Skip by the command line argument "bblayers"
[snip]

(From OE-Core rev: 50004f431a71c71af4acf0f25403fee5a8447eab)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-18 11:23:48 +01:00
Oleksandr Kravchuk
ca9c738053 selftest/devtool: fix URI to MarkupSafe package
PyPi packages are now hosted at files.pythonhosted.org.

[YOCTO #13243]

(From OE-Core rev: 384e2c3765c77c29527a43f2e0bffbc41170eeb6)

Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-14 22:48:22 +01:00
Chen Qi
d9b0adbce8 oescripts.py: avoid error when cairo module is not available
When running 'oe-selftest -r oescripts', the following error appeared.

    cls.skipTest('Python module cairo is not present')
    TypeError: skipTest() missing 1 required positional argument: 'reason'

This is because the host does not have the cairo python module installed.
Fix this problem by using unittest's SkipTest exception.

(From OE-Core rev: 785bb108ceb9dc137ec8d75d887b6a3869cbfb9c)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-14 22:48:22 +01:00
Quentin Schulz
e3d0dd9163 selftests: add tests for INCOMPATIBLE_LICENSE
One bug went unnoticed without these selftests: an INCOMPATIBLE_LICENSE
with a non-SPDX license for a package with that non-SPDX license wasn't
enforcing the denial of build for said package. See
4b6ce4604c ("meta: license: fix non-SPDX
license being removed from INCOMPATIBLE_LICENSE")

While adding a test for that particular case, let's add a few more so
that we cover a handful more use cases of INCOMPATIBLE_LICENSE.

(From OE-Core rev: 6c2ca52218c196e7ccf6b3275bffc3e3a04193c6)

Signed-off-by: Quentin Schulz <quentin.schulz@streamunlimited.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-12 10:54:40 +01:00
Maciej Pijanowski
bb59bcd016 recipetool: add python3 support
Add support for generating python3 recipes using the recipetool / devtool.
Drop python2 support at the same time.

Tested with:

oe-selftest -r recipetool.RecipetoolTest

[YOCTO #13264]

(From OE-Core rev: d8b2f58974482b3b1ccc65c5f93104d0d7ba87bc)

Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-10 17:38:10 +01:00
Joshua Watt
e5217b6c10 oeqa: Add reproducible build selftest
Adds an initial test for reproducible builds to the OE selftest. This
initial test builds core-image-minimal using sstate, then does a clean
build without sstate in another build directory, and finally does a
binary comparison of the resulting package files between the two builds.

The test is currently always skipped since it doesn't pass yet, but it
can easily be enabled locally

(From OE-Core rev: 2e591bdf93ec9e59b900562263dfe8e72b163baa)

Signed-off-by: Joshua Watt <JPEWHacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-10 14:46:38 +01:00
Adrian Freihofer
d6c4039e3f qemurunner: fix undefined variable
While hacking on this I got an Exception. It's better to define
variables also in python.

Signe:-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
(From OE-Core rev: 1ea225a86cdee4ed932ede509d3351d5aecae497)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-08 16:01:41 +01:00
Tim Orling
716dff0b2f oeqa/runtime: add simple test for scons
This test simply compiles a hello world program using scons.

(From OE-Core rev: bf6e3f0f3a7a134e8e3cb16366ef01b8c956e4c8)

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-08 16:01:41 +01:00
Richard Purdie
1334b064d3 gpg_sign/selftest: Fix secmem parameter handling
We keep seeing "cannot allocate memory" errors from rpm when signing packages
on the autobuilder. The following were tried:

* checking locked memory use (isn't hitting limits)
* Restricting RPM_GPG_SIGN_CHUNK to 1
* Limiting to 10 parallel do_package_write_rpm tasks
* Allowing unlimied memory overcommit
* Disabling rpm parallel compression

and the test still failed. Further invetigation showed that the --auto-expand-secmem
wasn't being passed to gpg-agent which meant the secmem couldn't be expanded hence the
errors when there was pressure on the agent.

The reason this happens is that some of the early gpg commands can start the agent
without the option and it sticks around in memory so a version with the correct
option may or may not get started.

We therefore add the option to all the key gpg calls.

(From OE-Core rev: c7e131a76e522503df55e211dd261829feacfa28)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-07 09:11:49 +01:00
Kevin Hao
720474ee8d oeqa/utils/qemurunner: Set both the threadport&serverport with tcpserial parameter
After the commit ad522ea6a6 ("runqemu: Let qemuparams override default
settings"), the order of the two "-serial" parameters when running the
qemu have been switched. The effect of this is that the logging thread
will use ttyS1 (of course can't capture the kernel boot message anymore),
and the test command will run on the ttyS0. So the output of the test
command may be mangled by the kernel message (such as call trace), and
let the test command produce a fake timeout error message. We can't fix
it by just adjusting the order of the threadport and serverport, since
it will break some machines such as qemuarm64 which use the virtio
serial. So using the tcpserial to setup both the threadport and
serverport.

[YOCTO Bug 13309]

(From OE-Core rev: 9f2005dee41b1ef5a0d1f7b69bcd6c8352dac016)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-07 09:11:48 +01:00
Jon Mason
cb153e8da8 resulttool: modify to be multi-machine
Currently, the code will sum all of the different machine results into a
single report of the tests results.  This can lead to confusion as to
which machine may be experiencing issues.  Modify the code to store the
results in a per machine basis and report them accordingly.

(From OE-Core rev: 16d4031ea5df8a4ddfdb937d35464c09e1abd10e)

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-04 09:09:42 +01:00
Alistair Francis
ebedc1511d gdb: Upgrade from 8.2.1 to 8.3
Bump GDB and change the oeqa selftest expression to allow ptests to
pass.

(From OE-Core rev: f31986ed9f82c48834b2f25979c93697228acbf7)

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-21 12:56:33 +01:00
Hongxu Jia
d0d0d3e20f oeqa/targetcontrol.py: fix qemuparams not work in runqemu with launch_cmd
As runqemu with launch_cmd means directly run the command, don't need set
rootfs or env vars.

Since commit [a847dd7202 runqemu: Let qemuparams override default settings]
applied in oe-core, if launch_cmd contains "qemuparams='***'", it does not
work, which is overridden by latter qemuparams="-serial tcp:127.0.0.1" in
QemuRunner.launch();

So we set qemuparams as a parameter in runqemu, the fix makes it work

(From OE-Core rev: 4f0a576fd5b9373cff4ca5ac92ec6af29499df89)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15 17:53:29 +01:00
Richard Purdie
66ef365ba6 oeqa/target/ssh: Replace suggogatepass with ignoring errors
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: b3bae8aba5b897c1afcc8bf4ad8929251812d2b5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-13 20:50:05 +01:00
Richard Purdie
5a16dee75f oeqa/selftest: Automate manual pybootchart tests
Automate the current manual pybootchart tests. This includes a check
for the cairo dependency, skipping the test if appropriate.

Based on original patch from Armin Kuster <akuster808@gmail.com>

(From OE-Core rev: ff5370a381a4996b7da56aaaa7055f7a1786c823)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12 09:04:26 +01:00
Richard Purdie
4970590ecd oeqa/concurrenttest: Patch subunit module to handle classSetup failures
Currently setupClass errors were not being mapped back to the failing tests
and they were hence being marked as UNKNOWN and the test statistics were
inaccurate.

This is because whilst the errors were being encoded into the test results
stream, the decoder doesn't cope with an error outside a testStart event.

We patch in an addError handler to the outsideTest parser so that this
does get handled in a way similar to the non-concurrent case.

It would be nice if we didn't have to do this but there doesn't seem
to be any other way to fix this other than forking subunit.

We also make a minor change so another of our changes can cope with
tests without a start time.

(From OE-Core rev: 8f7352ed9c1a3e82689b842b7f87e469ebf2e48f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12 09:04:26 +01:00
Richard Purdie
52f1b4050b oeqa/runner: Fix subunit setupClass/setupModule failure handling
The string format for subunit setupClass/setupModule failures is slightly
different, tweak the regex to correctly handle both cases.

(From OE-Core rev: 425fbba9348420df72de5c6292f50acaf2023d0b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-12 09:04:26 +01:00
Mikko Rapeli
796b9089c5 oeqa/sdk: use bash to execute SDK test commands
The commands only work with with bash. If /bin/sh is
dash like in Debian, the command execution fails with
errors like:

Standard Output: /bin/sh: 5: export: --sysroot: bad variable name

and all SDK tests fail.

(From OE-Core rev: ba5bee46131bbb31efba766c4d29e5bf71c664a7)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:56 +01:00
Richard Purdie
970b53370d oeqa/core/runner: Handle unexpectedSucesses
Instead of showing:
RESULTS - ptest.PtestRunnerTest.test_ptestrunner - Testcase 1600: UNKNOWN (32.30s)

map unexpectedSuccesses to PASSED and improve the way they're displayed. We
expect/allow ptest runner to fail but if it passes we should handle it correctly.

(From OE-Core rev: 7885939ca3dea9704185e93469fe515c17eb8017)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
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: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
c7592b0147 oeqa: Drop OETestID
These IDs refer to testopia which we're no longer using. We would now use the test
names to definitively reference tests and the IDs can be dropped, along with their
supporting code.

(From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Richard Purdie
ec3c2d4650 oeqa/ssh: Avoid unicode decode exceptions
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: 17e87510378f2729208a8262695f28e1efe5eb4c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-01 23:10:52 +01:00
Armin Kuster
37af0d00f0 manual compliance: remove bits done at runtime
(From OE-Core rev: 434618bec47efdda90981d248bc481f45da093b4)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Armin Kuster
b49916c252 ltp_compliance: add new runtime
test runtimes in sec.
AIO: 14
MEM: 94
MSG: 89
SEM: 30
SIG: 194
THR: 399
TMR: 867
TPS: 23

(From OE-Core rev: e099204c34d1cf90ae4bb44fb0f56e72904c664a)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Armin Kuster
65b50feabe logparser: Add LTP compliance section
(From OE-Core rev: 0e02eee4041828608bd64610538551646160fd5e)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Armin Kuster
f45d63b484 ltp: add runtime test
This adds the framework for running ltp tests.

Here are some times:
math: 61
syscalls: 3957
dio: 18472
io: 29
mm: 551
ipc: 48
sched: 165
nptl: 46
pty: 37
containers: 52
controllers: 9625
filecaps: 27
cap_bounds: 27
fcntl-locktests: 29
connectors: 27
timers: 37
commands: 165
net.ipv6_lib: 30
input: 29
fs_perms_simple: 31
fs: 3476
fsx: 30
fs_bind: 28
fs_ext4: 28
cve: 675

(From OE-Core rev: 1ec677549d490a29a7c713610db4a56be7b55e26)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Armin Kuster
9640fa3b22 logparser: Add decoding ltp logs
(From OE-Core rev: 9be041fbaab71a40a2a7422221d8bd5637d6655c)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Mardegan, Alberto
e03d103e10 oeqa/core/runner: dump stdout and stderr of each test case
Some CI pipelines might perform further processing of the test output
(for instance, to plot some metrics into a chart). However, Since `thud`
we switched away from the XML-based jUnit reporting, and at the same
time we lost the ability of collecting the stdout and stderr of the
various tests.

We now restore this functionality by adding `stdout` and `stderr` keys
to the JSON reports. This behavior is off by default; in order to enable
it, one must set the `TESTREPORT_FULLLOGS` variable in the bitbake
configuration.

(From OE-Core rev: fd0048630ece5b21efb3a79e97046be0ab2a1514)

Signed-off-by: Alberto Mardegan <amardegan@luxoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-26 10:09:08 +01:00
Richard Purdie
3c67567ece oeqa/utils/qemurunner: Fix typo in previous commit
(From OE-Core rev: e2b4b0580cd719cf9d48576aa7d0b88e4a286921)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-09 16:04:09 +01:00
Richard Purdie
7f98d0ffaf oeqa/qemurunner: Dont mix binary and non-binary strings
self.msg is a str(), bootlog is b'' so this code clearly doesn't work. Add
in a decode since its being used as a string.

(From OE-Core rev: e7546759d3102b576974bbab52594796f084721e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-25 23:19:53 +00:00
Yeoh Ee Peng
a9b2f3561e oeqa/manual/toaster: updated test id naming
All test id (eg. @alias) inside manual testcase file shall follow the same
test id naming convention from oeqa automated tests (eg. selftest,
runtime, sdk, etc), where the test id consists of
<test_module>.<test_suite>.<test_function>. Furthermore, there shall be
only 1 unique test_module per each manual testcases file, where
test_module match the file name itself.

This file was using test_module name that does not match the file name
itself. Fixed test_module name as well as the test_suite name.

(From OE-Core rev: f24178993e7b0830510900e80e879c7f9f8e28f0)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-19 10:40:35 +00:00
Yeoh Ee Peng
aeb87d0139 oeqa/manual/toaster: transfer manual toaster test cases to oeqa
As part of the solution to replace Testopia, manual test cases
need to be migrated to OEQA. These manual test case json files
will serve two use cases.

Use case#1: as input to the future commandline-based manual test
runner script, where this script will display actions and expected
result information in user friendly text, then it will capture
user input for test result and log, finally it will write test
result and log into existing standardize test result json format
from OEQA framework for automated tests.

Use case#2: QA will open and read these json file manually for
planning manual test execution. Any reader interested in
understanding manual test cases will open and read these files.

(From OE-Core rev: fbeecb059d9c006f50a2a11bed5a42740722e3e8)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18 22:59:58 +00:00
sangeeta jain
66c4001422 oeqa/manual/kernel-dev.json: test id updated
All test id (eg. @alias) inside manual testcase file shall follow the same test id
naming convention from oeqa automated tests (eg. selftest, runtime, sdk, etc), where
the test id consists of  <test_module>.<test_suite>.<test_function>. Furthermore,
there shall be only 1 unique test_module per each manual testcases file.

This file was using more than 1 unique test_module for testcases. Furthermore,
some of the testcases were defined using different test_suite where it was not needed.
This patch fix the manual testcases file to have only 1 unique test_module
as well as test_suite to simplify test id naming.

(From OE-Core rev: be7cbe86f046bf29082c3da574377f9828aff5f4)

Signed-off-by: sangeeta jain <sangeeta.jain@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18 11:12:26 +00:00
sangeeta jain
8b6c8ec14b oeqa/manual/compliance-test.json: test id updated and missing test cases added
Two changes made in oeqa/manual/compliance-test.json:

1. All test id (eg. @alias) inside manual testcase file shall follow the same test id
naming convention from oeqa automated tests (eg. selftest, runtime, sdk, etc), where
the test id consists of  <test_module>.<test_suite>.<test_function>. Furthermore,
there shall be only 1 unique test_module per each manual testcases file.

This file was using more than 1 unique test_module for testcases. Furthermore, some of
the testcases were defined using different test_suite where it was not needed. This patch
fix the manual testcases file to have only 1 unique test_module as well as test_suite to
simplify test id naming.

2. Added 2 missing test cases for Beaglebone Stress Test.

(From OE-Core rev: 5c5402bc6e6505da0203ca9245a3599bd4940dad)

Signed-off-by: sangeeta jain <sangeeta.jain@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18 11:12:26 +00:00
sangeeta jain
437dcb901d oeqa/manual/bsp-hw.json: test id updated and obsolete test cases removed
Two changes made in oeqa/manual/bsp-hw.json:

1. All test id (eg. @alias) inside manual testcase file shall follow the same test id naming
convention from oeqa automated tests (eg. selftest, runtime, sdk, etc), where the
test id consists of  <test_module>.<test_suite>.<test_function>. Furthermore,
there shall be only 1 unique test_module per each manual testcases file.

This file was using more than 1 unique test_module for testcases.
Furthermore, some of the testcases were defined using different test_suite where it was not
needed. This patch fix the manual testcases file to have only 1 unique
test_module as well as test_suite to simplify test id naming.

2. As per review by Intel and Windriver team, 7 testcases were found obsolete. Removed 7 testcases.

(From OE-Core rev: e1136bae81672894a277512d7084d27f4e3416b9)

Signed-off-by: sangeeta jain <sangeeta.jain@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-18 11:12:26 +00:00