Age | Commit message (Collapse) | Author | Files |
|
When using syslog-ng as the syslog provider, oe_syslog test case fails
because it cannot find the syslog daemon. This is because it greps for
'syslogd' but syslog-ng's daemon is 'syslog-ng'. So fix it to check both
'syslogd' and 'syslog-ng'.
Also, when the test case fails, what I get is:
| AssertionError: 1 != 0 : No syslogd process; ps output:
<empty here>
This does not help user. The output is actually from the 'PS | GREP' command.
And when the 'PS | GREP' command fails, the output is always empty. So also fix
this problem. After the change, it looks like:
| AssertionError: False is not true : No syslog daemon process; ps output:
| PID USER VSZ STAT COMMAND
| 1 root 16476 S {systemd} /sbin/init
| 2 root 0 SW [kthreadd]
| 3 root 0 IW [kworker/0:0]
...
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The build target won't cause the package task to run if things were already
built and in sstate. Ensure we run the package task explicitly to ensure
the test works as intended.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add a new SDK testcase that builds assimp, a project that uses cmake.
Using TARGET_ARCH and TARGET_OS which is now exported into the environment,
check that the generated binaries match the ELF headers we expect.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This patch enables multiconfig dependencies (mcdepends) to be used on
recipes using the following format:
task[mcdepends] = "multiconfig:FROM-MC:TO-MC:PN:task-to-depend-on"
For the sake of simplicity consider the following example:
Assuming we have set up multiconfig builds, one for qemux86 and one for
qemuarm, named x86 and arm respectively.
Adding the following line to an image recipe (core-image-sato):
do_image[mcdepends] = "multiconfig:x86:arm:core-image-minimal:do_rootfs"
Would state that core-image-sato:do_image from x86 will depend on
core-image-minimal:do_rootfs from arm so it can be executed.
This patch makes modifications to bitbake.conf to enable mcdepends, and
to sstatesig and staging.bbclass to avoid conflicts between packages from
different multiconfigs.
[YOCTO #10681]
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Some of the devtool tests make changes to files under meta/ -
legitimately since we want these tests to be working with real recipes
and associated files. Unfortunately with the new oe-selftest
parallelisation this can break other tests if files go missing at the
wrong time (among other scenarios). To avoid this issue, simply take a
copy of the core repository and use that for these tests. (We copy the
entire repository since changing the path of meta/ influences COREBASE
and thus we need to have things like scripts/ alongside as well).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
Use SYSTEMD_BUS_TIMEOUT to set default timeout to 240s to avoid
timeout problem on slow qemu machines.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
|
The following error from systemd-udevd is not harmful. It's just
because our qemu targets are using eth0.
Error changing net interface name 'eth0' to 'enp0s3': Device or resource busy
Note that systemd is using a different network interface naming scheme
from traditional ethX naming scheme. To make this error message go away,
we could symlink /etc/udev/rules.d/80-net-setup-link.rules to /dev/null
to recover traditional naming scheme. But I'm not sure if this will
cause regression in user experience for systemd users of OE.
So just ignore this error message so that parselogs.py test case does not
fail.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
|
1. For test_syslog_running, we should not restrict it to run for
only busybox-syslog and sysklogd. So extend it to all syslog
providers in oe-core and meta-openembedded.
2. For test_syslog_startup_config, fix to make it depend on the
existence of busybox-syslog. The previous condition "!sysklogd
&& busybox" is incorrect, because busybox may be compiled without
syslog support, and sysklogd and busybox-syslog conflict with
each other.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
|
We keep breaking the preservation of hardlinks during the packaging process.
Add a selftest which tests this to try and prevent this breaking again.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
rm_work if enabled leads to some tests failing that rely on artifacts
being present. Check if rm_work.bbclass is included and show an error
and exit if it is.
Fixes [YOCTO #12694]
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
These tests are intended to search for bad RPATHs and text relocations, but we
do these tests at buildtime and as pax-utils is never installed in any default
images the tests are never executed.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The code was using Wic instead of WicTestCase for image_is_ready and
native_sysroot which was confusing some tests. Fix image_is_ready.
For native_sysroot, convert the only user to just run the call itself
as there is no point in executing this for all the other tests which
don't use the value.
Whilst here, move _get_image_env_path to the base class alongside
its parent variabe and fix it to use WicTestCase.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
oe-selftest -r <invalid test name>
currently triggers a traceback. Ensure this doesn't happen and the user gets a
sensible error message.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
[YOCTO #12493]
Fixed:
- qemu started with pid 10000
- qemu exited unexpectedly
- The pid 10000 is re-used by another different process.
The is_alive() returned True in such a case because both qemu_pidfile and
/proc/10000 exist, but it's another process, this patch fixed the problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
Instead of mushing two paths together and hoping that the slashes line up
correctly, use os.path.join.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
As with the Python test, this can be both better and faster. No need to copy a
file, just run a one-liner.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The warn method is deprecated. We should use the documented warning instead.
Quoting from the python's official doc:
"""
Note: There is an obsolete method warn which is functionally identical to warning.
As warn is deprecated, please do not use it - use warning instead.
"""
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Also fix a related test's error message to match what it does.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Placing the layer in meta means the directory is in an unclean state
which may influence other tests. Use our build directory instead
since we 'own' that. This helps keep oe-selftest parallelisation
clean.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
runCmd handles checking exit 0 internally unless specified otherwise and its
error messages are much more useful including the failed command output.
Clean up the unneeded 0 exit code checks in the wic tests.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently this can fail with a message like 127 != 0 which is unhelpful.
If we remove the ignore_status=False, the debugging from runCmd is much
more helpful printing status.output.
Also remove the now unneeded exit code check.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Now we're not reporting the related fields (as of openembedded-core
8658b3677b9f7cb70806061c41570c709086ef05) we shouldn't expect to see
PR reported here since it's not monitored by buildhistory-diff. However,
with a bit of messing about we can check for the exact output that we
should now see as a result of the test changing PR to go backwards.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
After this replacement, the parent exception handling works so we don't
need subprocess wrapping with bb.error in the underlying functions.
The underlying contexts also have better module handling so the imports
can be cleaned up.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This allows the calls to is_elf (which calls file) to happen in parallel
allowing a speedup of do_package and do_populate_sysroot for native
recipes.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There are probably further cleanups needed here but this at least removes
the major code duplication between these two similar funcitons, keeping the
kernel module ".ko" extension check for efficiency to avoid opening and
reading file contents in the general case.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We don't need any functionality from the shell here, its just extra fork
overhead. Therefore remove it and use subprocess directly.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The current methods of spawning processes for parallel execution have
issues around collection of results or exceptions.
Take the code from package_ipk/deb, make it generic, add a results
collection mechanism, fix the exception handling and for it into a
standard library function.
Also add a test case which tests both the success and failure modes
of operation to stop this functionality regressiing again.
In particular, compared to multiprocess_exec, this fork off the parent
approach means we can pass in the datastore and functions work in the
same scope as the parent. This removes some of the complexities
found trying to scale multiprocess_exec to wider use.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
For the same reasons as the runtime Python test, clean up the SDK test.
Also port from Python 2 to Python 3, as that's what is supported now.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Currently this is three test cases:
1) test_python_exists. Fail if python3 isn't in PATH.
2) test_python_stdout. Run a Python script and check the output is as expected
3) test_python_testfile. Check that a file test_python_stdout wrote to exists.
(1) should be a setup and skip the test module if it isn't present.
(2) and (3) should be merged, there's no point copying over a two line Python
file, and the test doesn't verify that the file doesn't exist in the first
place.
Rewrite the test to check that Python is present in a class setup so the entire
test is skipped if it isn't and do some simple rot13 to verify that bytecode is
being executed correctly.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The FILELIST field of the package info file in the buildhistory
repository is a space-separated list of all of the files in the package.
If a name of a file packaged by a recipe contains a space character then
of course the result was that we didn't handle its name properly. To fix
that, use quotes around any filename containing spaces and at the other
end use these quotes to extract the proper entries.
Fixes [YOCTO #12742].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The original idea here was that changes to certain fields might be able
to be explained if there was a change to another field, for example if
RDEPENDS changed it might be because DEPENDS changed. Thus we were
printing this kind of thing out with each change. Unfortunately in
practice this turned out to be noisy and not particularly useful, so we
might as well remove it.
Fixes [YOCTO #7336].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
These platform specifc BSPs were removed from meta-intel and superseded by
intel-core* BSPs.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Checking if the dependency had any failure is unreliable, for example
if the underlying data doesn't get transferred and the list is empty,
success of the dependency is assumed.
Since we now have success data available, change the code to use it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This uses the new concurrenttest code to enable parallel test execution
if specified.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This isn't present on modern distros by default and doesn't work with
testtools, needing multiple code paths in the code. Remove it in favour
of finding a better replacement for results collection/analysis.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There doesn't appear to be any reason we need this _results indirection
any more so remove it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We have several options for parallel processing in oeqa, parallel
execution of modules, threading and mulitple processes for the runners.
After much experimentation is appears the most scalable and least
invasive approach is multiple processes using concurrenttestsuite
from testtools. This means we can drop the current threading code
which is only used by the sdk test execution.
oeqa/decorator/depends: Remove threading code
Revert "oeqa/sdk: Enable usage of OEQA thread mode"
This reverts commit adc434c0636b7dea2ef70c8d2c8e61cdb5c703b1.
Revert "oeqa/core/tests: Add tests of OEQA Threaded mode"
This reverts commit a4eef558c9933eb32413b61ff80a11b999951b40.
Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode"
This reverts commit d3d4ba902dee8b19fa1054330cffdf73f9b81fe7.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This allows oe-selftest to take a -j option which specifies how much test
parallelisation to use. Currently this is "module" based with each module
being split and run in a separate build directory. Further splitting could
be done but this seems a good compromise between test setup and parallelism.
You need python-testtools and python-subunit installed to use this but only
when the -j option is specified.
See notes posted to the openedmbedded-architecture list for more details
about the design choices here.
Some of this functionality may make more sense in the oeqa core ultimately.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This improves test parallelism.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Only show the output in the failure case.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This allows better parallelism between the different tests as currently
this block takes the longest time to execute. devtool tests are still
all grouped into the "devtool" module for ease of exection.
This also makes it easier to execute some subset of devtool tests for
testing devtool changes.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently some tests run in buffer mode and some don't. Those that don't can
corrupt stdout/stderr. Switch to using buffer mode everywhere so we're consistent.
If there is useful output on stdout/stderr, it will be displayed if the test
fails.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
AssertionError: Command 'wic create mkhybridiso --image-name core-image-minimal -o /var/tmp/wic.oe-selftest/' returned non-zero exit status 1:
ERROR: _exec_cmd: gzip -f -9 -c /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio > /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio.gz returned '1' instead of 0
output: gzip: /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio: No such file or directory
This is because in a clean build directory, the initramfs may not be rebuilt.
Add a call to ensure it is built to avoid the error.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Using /var/ leave wic open to races with other processes on the system, use
a subdir of builddir instead to avoid this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If dbus isn't build first the dbus dependency of dbus-wait can't be detected
through pkgconfig and the test fails:
AssertionError: {'DEPENDS': {'dbus'}} != {}
- {'DEPENDS': {'dbus'}}
+ {} : Some expected variables not found in recipe: {'DEPENDS': {'dbus'}}
Ensure dbus is built and present in the sysroot.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The main setUp function needs to be called and tests are meant to
define setUpLocal. For some reason this one didn't leading to errors
with recent code changes. Fix it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The current code assumes if something isn't a failure of some
kind, it was a pass. When test case IDs weren't matching, this lead
to very confusing output where things would fail, then be listed as
passing.
This adds code to track successes, ensuring we don't end up in this
position again with unmatched entries being listed as UNKNOWN.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
By having a consistent config for the test, a second reparse is avoided
and the test runs slightly faster.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|