Commit Graph

1799 Commits

Author SHA1 Message Date
Richard Purdie
f93d5a469c oeqa/qemurunner: Fix cmdline variable use before reference
This avoids some tracebacks we've seen on failed autobuilder builds which would
allow the real error to be seen.

(From OE-Core rev: a4031935a7b8ea4f61b9020c1aa5598e186e7ad7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-06 14:41:28 +00:00
Richard Purdie
055695994a oeqa/concurrencytest: Optimise for autobuilder/clobberdir
We're seeing huge delays on the autobuilder during oe-selftest builddir
deletion. For example there is a currently running selftest we could do
with the results from and its been going 13 hours, at least 8 of which
was in deletion of the builddirs.

There are a variety of ways we could solve this problem however the
autobuilder has a mechanism for deferred deletion, "clobberdir" which
it already uses for this kind of work.

Whilst in general hardcoding things like this is horrible, I believe
in this case the benefits (and resulting improvements on my sanity
if nothing else) mean this is a case where we should do it.

If/as/when someone can come up with a better solution that is fine
and this can be replaced.

(From OE-Core rev: 51a84937d32a85cbdb7d5b1d1ec69a290d0c303b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-06 14:41:28 +00:00
Ross Burton
4f82d1e59a selftest/imagefeatures: blacklist zst
The dependency isn't in OE-Core so we need to disable this test.

(From OE-Core rev: 3646499cb34e91c1d012d057eedfdeff08a4f06c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-04 12:30:58 +00:00
Alexander Kanavin
469f6ee0bb oe-selftest: extend virgl gtk test to also check the SDL option
(From OE-Core rev: 909dc047790efad8304d9c6630c39f6a6b4166fb)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-28 21:13:00 +00:00
Paul Barker
d5c1a7607f oeqa: archiver: Add basic tests for all archiver modes
6 new test cases are added to cover the various archiver modes
documented at the top of archiver.bbclass. Each test sets the
appropriate configuration options, runs the `do_deploy_archives` task
for the selftest-ed recipe and checks for the presence of the expected
archive file.

(From OE-Core rev: d3bf1012e918109e958cf78c89feda0f4dfe17c5)

Signed-off-by: Paul Barker <paul@betafive.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-27 13:25:18 +00:00
Chee Yang Lee
89288705c6 wic: 'wic cp' to copy from image
currently 'wic cp' only works for copy file from local storage to
wic image.

enhance 'wic cp' to copy file/directory from wic image to local storage.

include selftest and 'wic help' updates.

[YOCTO#12169]

(From OE-Core rev: bd669c1809a378f93580eb9e0679a26ec6746cb8)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-27 13:25:18 +00:00
Nathan Rossi
95bd5a3961 oeqa/selftest/cases/gcc.py: Split 'gcc' and 'g++' testsuites
Split the GccCrossSelfTest testcase into separate testcases for 'gcc'
and 'g++' respectively. In order to split them use the "check-gcc-*"
language make check targets.

(From OE-Core rev: 84cc08942fd3d17fb603e90f362a1ee5653a225d)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-27 13:25:18 +00:00
Nathan Rossi
6cde67d0a8 oeqa/utils/qemurunner.py: Handle QEMU machines with a single serial
Not all QEMU machines are capable of having more than one serial port,
this is due to the machine emulating a physical device/board.

Rework QemuRunner to handle machines that only have 1 serial port, where
the serial port shares output of the kernel log buffer and a login
console. In this case the output is mixed but enables the machine to
boot and have QemuRunner detect the login prompt.

QemuTarget uses SERIAL_CONSOLES to determine the number of available
serial ports.

(From OE-Core rev: 333897c4a00b41681ffe34312a08cae09274327e)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-27 13:25:18 +00:00
Richard Purdie
2cca43e060 oeqa/selftest/sstatetests: Ensure we don't use hashequiv for sstatesigs tests
(From OE-Core rev: 6af559467f869afabad16cd84ae1af4bc7af0950)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-22 23:13:06 +00:00
Alexander Kanavin
7081beeb18 selftest: check that 'devtool upgrade' correctly drops backported patches
There was a regression in this functionality that went unnoticed
due to lack of tests.

(From OE-Core rev: a75e4eceb703b2b13ddd4ba3dea3a86af0b0a9eb)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:20 +00:00
Richard Purdie
91fdad8c16 oeqa/devtool: Avoid unbound variable errors
inherits can be unset resulting in:

UnboundLocalError: local variable 'inherits' referenced before assignment

which can mask real errors. Avoid this.

(From OE-Core rev: 29a0502e101ed0667e960f9f8591b0a2d60a4bcb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
56c530c291 /oeqa/manual/compliance-test: remove obsolete test
ltpstress was removed in Oct 2018

e752f7c196 (diff-5231627fc8640e0adb955f9e69c3c08d)

Remove LTP stress tests
ltpstress.sh runs stress.part[1-3]. But these runtest files just
duplicate definitions:
* stress.part1: fs, mm, nfs
* stress.part2: ipc, math, nptl
* stress.part3: net.multicast, pty, syscalls

The definitions are outdated anyway. There is no point trying
to keep them sync.

(From OE-Core rev: 85b3f9ef568a8a11569898c6637b0e80c057fbfb)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
5834f2ff44 oeqa/manual/compliance-test: move crashme to runtime
[v3]
remove fork12 from crashme. runs forever
missed in v2 resend

(From OE-Core rev: 5d32ff52a36bdcc6abe55b89bf81c3312a03160a)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
bd67c56d36 oeqa/manual/compliance-test: remove crashme tests
(From OE-Core rev: 9739259a8c169b5bc47fe93158a276eda0195ecf)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
bd2a3c7b2b manual/bsd-hw: remove bash tests
done as part of IncompatibleLicensePerImageTests

(From OE-Core rev: b6e66d388001cdbb833a18056781f69a6f8c82fb)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
b9b46b6625 oeqa/manual/bsp-hw: remove usb and SDmicro tests
(From OE-Core rev: fe1063ae76a503327fe9cc13e9bf753ea2ae79f2)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
5b5b75a5bf oeqa/manual/bsp-hw: move storage tests to runtime
move usb mount, r/w and umount tests to runtime
move SD card mount, r/w and umount tests to runtim

(From OE-Core rev: 246d73b35f6be7880d98274e87033a14cdced9ba)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
6f36e626e1 oeqa/manual/bsp-hw: remove reboot test
(From OE-Core rev: f30a3e18a47bc2b3307cc5080f18cce7e3a736a1)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
7ad0876086 oeqa/runtime/boot: add reboot test
(From OE-Core rev: c8ddebee04a7c752986b407b98f4d0175f447d01)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
18ad61198f oeqa/manual/bsp-hw: remove rpm -ivh test
done via runtime

def test_rpm_install(self):

(From OE-Core rev: 1be4471d664c9445d0599d57c4366a86f8352b07)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Chee Yang Lee
b8c34f9a24 selftest/wic: test wic rm with -r flag
selftest to make sure wic rm with -r flag for ext partition
could remove directory and all its content.

(From OE-Core rev: d7ccbb393a71501424b7c0d4c1d78e4bac1ecccf)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21 23:08:19 +00:00
Armin Kuster
85c18be8f4 oeqa/manual/oe-core: remove crosstab test from manual
(From OE-Core rev: fb76404edddb5a6739447bcfa046732b7fa5144b)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
ef1f6cab65 oeqa/selftest/runtime_test: add crosstab selftest
(From OE-Core rev: fd83e9aa35fa2553a8afd975e5405ea22f318eab)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
f23f766920 oeqa/manua/oe-core: remove manual PACKAGECONFIG_FLAGS tests
(From OE-Core rev: 77a0371284280c39731a4a0630ba6959969d850f)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
7fcb703894 oeqa/selftest/oescripts: move list-packageconfig-flags tests from manual to self
(From OE-Core rev: f55bfde64bd7b6f862ca7b59eb075b862d221f12)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
9eab3f9926 oeqa/manual/bsp-qemu: remove manual useradd test
useradd tested is done via:
test_non_root_user_can_connect_via_ssh_without_password and
test_non_root_user_can_connect_via_ssh_without_password

(From OE-Core rev: 0ab30c0386bf86b2e2101c18208b76200c665051)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
d2a28aa65e oeqa/manual/bsp-qemu: remove manual bash test
(From OE-Core rev: 29127d5a6ff9eb09a11dc4157006dc4098b01963)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
fdd96ad304 oeqa/manual/bsp-qemu: remove postinit test done w/selftest runtime
(From OE-Core rev: 63293d1c67736ea8dcb2872e7157b1f5db93c9fa)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
9fc88bf924 oeqa/manual/bsp-qemu: remove only_one_connmand_in_background test done at runtime
(From OE-Core rev: e0aa0c195ae233c3c28a7e1bc415839171062f42)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
2890aafb13 oeqa/manual/bsp-qemu: drop xserver test done at runtime
xserver testing is done at runtime and selftest via sato image

(From OE-Core rev: 0146b3a0b60f54fa6ea84461e4ced6fae59aafa7)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
81bc4bbb59 oeqa/manual/bsp-qemu: remove KVM enabled which is already done in selftest runqemu
(From OE-Core rev: 378bcbc47bac718b7228506f010c26045114d421)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
b524ddfd7c oeqa/manual/bsp-qemu: remove rpm tests already done in runtime
(From OE-Core rev: 3f71afb23d409f56175341f4b7ac2c84c112b383)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
97c2021b8a oeqa/core: Add qemu checks
Some test should not be run in QEMU systems so
add some checks to make that easier

(From OE-Core rev: 1b1e53c4ad33a71d526887d1133598f255a476ec)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Armin Kuster
1351614b8d oeqa/core: Add a check for MACHINE
(From OE-Core rev: e69f963e548e2f6f211a56406694c029111d7203)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:21:00 +00:00
Denys Dmytriyenko
d71fb563c1 buildhistory: fix "version went backwards" QA error message
Fix parentheses placement in the message from:
Package version for package X went backwards which would break package feeds from (Y to Z)
to this one:
Package version for package X went backwards which would break package feeds (from Y to Z)

(From OE-Core rev: 3a5a61fb6b3f811bd4f7232ba902afcfd2019154)

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14 13:20:59 +00:00
Joshua Watt
57ea3e78bd oeqa: reproducible: Add option to capture bad packages
Adds an option that can be used to copy the offending packages to a temp
directory for later evaluation. This is useful on the Autobuilder to
investigate failures.

(From OE-Core rev: 54b29bae78d1711074fbd18f0350ef0b83b555d1)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-07 22:30:39 +00:00
Richard Purdie
320049c058 selftest/signing: Fix test_locked_signatures to use a temporary layer
Tests shouldn't be writing to layers during tests as this could corrupt
other tests running in parallel.

Modify the test to write the bbappend to a separate temporary layer
which is added and removed by the test. This avoids race failures
on the autobuilder.

(From OE-Core rev: 467c72ff2c9fe00c40d04d5d859d860fb267499e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-07 15:12:00 +00:00
Alexander Kanavin
222f6b3319 selftest: add a test for gpl3-free images
Existing tests check that adding a specific gpl3 package (bash)
to core-image-minimal results in expected behaviour.

These tests check the ability to build two common images
without gpl3 components in them:

1. core-image-minimal needs no further tweaks and works
out of the box.

2. core-image-full-cmdline requires dropping the GNU packages
that it pulls in; for good measure this tweaked image is
verified with runtime tests.

These two tests allow dropping meta-gplv2 from being tested
on the autobuilder, however there should be a community consensus
first.

(From OE-Core rev: a181f46b8aae066a4b8a26a8045797c38a63e834)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-04 13:39:05 +00:00
Alexander Kanavin
d1fb08991e selftest: skip virgl test on centos 7 entirely
With the sdl frontend, qemu isn't able to even boot fully,
so let's skip the test early.

(From OE-Core rev: 7b0708da20e4f04070837e5696e4fa3ee5990e8f)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-04 13:39:05 +00:00
Ross Burton
ce0b46650f oeqa/selftest: add test for oe-run-native
A small test to verify that oe-run-native is correctly working.

(From OE-Core rev: 1b577bcc44cbf7a9e94f8770f21841a16ad50c64)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-04 13:39:04 +00:00
André Draszik
f0f2a492f3 oeqa/runtime/context.py: ignore more files when loading controllers
When loading controllers as (external) modules, the code currently
tries to load all files ending with .py. This is a problem when
during development using an editor that creates a lock-file
in the same directory as the .py file, as the lock file is
typically called '.#xxxx.py'.
Python will try to load the lock file and fail miserably with
an exception:

    The stack trace of python calls that resulted in this exception/failure was:
    File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
         0001:
     *** 0002:do_testimage(d)
         0003:
    File: 'poky/meta/classes/testimage.bbclass', lineno: 114, function: do_testimage
         0110:    netstat -an
         0111:}
         0112:
         0113:python do_testimage() {
     *** 0114:    testimage_main(d)
         0115:}
         0116:
         0117:addtask testimage
         0118:do_testimage[nostamp] = "1"
    File: 'poky/meta/classes/testimage.bbclass', lineno: 294, function: testimage_main
         0290:
         0291:    # the robot dance
         0292:    target = OERuntimeTestContextExecutor.getTarget(
         0293:        d.getVar("TEST_TARGET"), logger, d.getVar("TEST_TARGET_IP"),
     *** 0294:        d.getVar("TEST_SERVER_IP"), **target_kwargs)
         0295:
         0296:    # test context
         0297:    tc = OERuntimeTestContext(td, logger, target, host_dumper,
         0298:                              image_packages, extract_dir)
    File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 116, function: getTarget
         0112:            # XXX: Don't base your targets on this code it will be refactored
         0113:            # in the near future.
         0114:            # Custom target module loading
         0115:            target_modules_path = kwargs.get('target_modules_path', '')
     *** 0116:            controller = OERuntimeTestContextExecutor.getControllerModule(target_type, target_modules_path)
         0117:            target = controller(logger, target_ip, server_ip, **kwargs)
         0118:
         0119:        return target
         0120:
    File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 128, function: getControllerModule
         0124:    # ImportError raised if a provided module can not be imported.
         0125:    @staticmethod
         0126:    def getControllerModule(target, target_modules_path):
         0127:        controllerslist = OERuntimeTestContextExecutor._getControllerModulenames(target_modules_path)
     *** 0128:        controller = OERuntimeTestContextExecutor._loadControllerFromName(target, controllerslist)
         0129:        return controller
         0130:
         0131:    # Return a list of all python modules in lib/oeqa/controllers for each
         0132:    # layer in bbpath
    File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 163, function: _loadControllerFromName
         0159:    # Raise ImportError if a provided module can not be imported
         0160:    @staticmethod
         0161:    def _loadControllerFromName(target, modulenames):
         0162:        for name in modulenames:
     *** 0163:            obj = OERuntimeTestContextExecutor._loadControllerFromModule(target, name)
         0164:            if obj:
         0165:                return obj
         0166:        raise AttributeError("Unable to load {0} from available modules: {1}".format(target, str(modulenames)))
         0167:
    File: 'poky/meta/lib/oeqa/runtime/context.py', lineno: 173, function: _loadControllerFromModule
         0169:    @staticmethod
         0170:    def _loadControllerFromModule(target, modulename):
         0171:        obj = None
         0172:        # import module, allowing it to raise import exception
     *** 0173:        module = __import__(modulename, globals(), locals(), [target])
         0174:        # look for target class in the module, catching any exceptions as it
         0175:        # is valid that a module may not have the target class.
         0176:        try:
         0177:            obj = getattr(module, target)
    Exception: ImportError: No module named 'oeqa.controllers.'

Simply ignore those when collecting the list of files to try
to load.

(From OE-Core rev: 682f223cf2e2dabe8cf60634b6779bb2d5e359bd)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 16:30:36 +01:00
Ola x Nilsson
864c8d67f2 oeqa/selftest/recipetool: Use with to control file handle lifetime
(From OE-Core rev: 890fbd77315474fbd582f8bbeb26925c6a42d8d4)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 16:30:36 +01:00
Ross Burton
9b607c58ff oeqa/selftest: use specialist assert* methods
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 16:30:36 +01:00
André Draszik
ee9d2f4fcf oeqa/runtime/systemd: skip unit enable/disable on read-only-rootfs
This doesn't work on read-only-rootfs:
    AssertionError: 1 != 0 : SYSTEMD_BUS_TIMEOUT=240s systemctl disable avahi-daemon.service
    Failed to disable unit: File /etc/systemd/system/multi-user.target.wants/avahi-daemon.service: Read-only file system

This patch does two things:
1) Decorate the existing test to be skipped if the rootfs is
   read-only
2) add a new test to be executed only if the rootfs is
   read-only. This new test remounts the rootfs read-write
   before continuing to execute the existing test, making
   sure to clean up correctly after itself (remount r/o
   again).

(From OE-Core rev: ec856301887b1139f93aa54d04bed9b842357b4f)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19 23:18:33 +01:00
André Draszik
568fd6ea47 oeqa/runtime/opkg: skip install on read-only-rootfs
Images can have package management enabled, but be
generally running as read-only. In this case, the
test fails at the moment with various errors due to
that.

Use the new @skipIfFeature decorator to also skip
this test in that case.

(From OE-Core rev: 84640e2b4daf4cf22c5b0324c22332f59e4d51e3)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19 23:18:33 +01:00
André Draszik
34cce61ece oeqa/core/decorator: add skipIfFeature
skipIfFeature will skip a test if a given DIST_FEATURE
or IMAGE_FEATURE is enabled.

(From OE-Core rev: ff2218f7cc3992725dd35499c14ec3396120dcc5)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19 23:18:33 +01:00
André Draszik
077c3bbf2f oeqa/runtime/df: don't fail on long device names
When device names are long (more than 20 characters), the
df test will fail with an exception:
    self.assertTrue(int(output)>5120, msg=msg)
    ValueError: invalid literal for int() with base 10: ''
at least when busybox is in use.

The reason is that busybox breaks the line in that case:
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/disk/by-partuuid/8e991e5a-cebd-4f88-9494-c9db4f30cb02
                           1998672     87024   1790408   5% /
and the code tries to extract the fourth field from the
second line, which is empty of course.

df can be told not to break lines, though, using the -P
flag, which turns on the POSIX output format, and is
supported by busybox df and coreutils df:
    Filesystem           1024-blocks    Used Available Capacity Mounted on
    /dev/disk/by-partuuid/8e991e5a-cebd-4f88-9494-c9db4f30cb02   1998672     87024   1790408   5% /

(From OE-Core rev: 8c23c1476d0c64b9bc8806db03414fa914c1e658)

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19 23:18:33 +01:00
Alexander Kanavin
25df405d4b license_image.bbclass: check and reject packages which have incompatible licenses
The use case is setting INCOMPATIBLE_LICENSE per image,
rather than as an awkward, and too strict global setting.

This for example would allow building development images with gplv3 tools,
but production images without them, and checking that nothing gpl3-licensed
gets into the latter.

Examples are provided via the selftest: four scenarios are tested:

- bash is added to the image, with a default gpl3 license; this is rejected
- bash is added to the image, with a "gpl3 & other" license; this is also rejected
- bash is added to the image, with a "gpl3 | other" license; this is accepted, but
only 'other' is added to the license manifest (this was already handled correctly
previously).
- bash is added to the image with a default gpl3 license, and is additionally
whitelisted for that image; this is accepted.

Eventually, this would allow deprecating the meta-gplv2 layer, while still
enforcing the no-gpl3 rule where possible and needed.

(From OE-Core rev: fd50395bc0783a3cce7b5b0d7398f22783ebbeca)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-15 14:16:10 +01:00
Ross Burton
cfc27f68fb oeqa/selftest/imagefeatures: improve test_hypervisor_fmts
If this test fails then the output doesn't help in any meaningful way, so
improve the test to output the unparsable JSON and display unexpected output.

(From OE-Core rev: 6a710ad0b445295991b17545f634684f4f317099)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-09 14:07:43 +01:00
Kai Kang
ff4b1d7ba7 dnf.py: check busybox for case test_dnf_installroot
Check package busybox which is required by cases test_dnf_installroot
and test_dnf_installroot_usrmerge.

(From OE-Core rev: 0f09c5b7a9a66af825951354b436b69dd9a596a4)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-09 14:07:43 +01:00