Commit Graph

10 Commits

Author SHA1 Message Date
Alexandre Detiste
fb69627ad3
Use unittest.mock from core python everywhere
mock was an independent module that has been merged into the Python standard library.
2024-02-18 22:15:30 +01:00
Marcus Schäfer
a344c540dc
Increase scope of kernel lookup
So far kiwi was looking up kernels only on /boot. Including
other bootloaders it's no longer required that the kernel
packages of the distributions provides the kernel in /boot
Thus kiwi's lookup needs to be extended to other places
which is done by this commit.
2022-11-15 09:04:57 +01:00
Marcus Schäfer
9c9250ebc4
Support nose and xunit style tests
The modifications in this commit allows the unit tests
to run on both, pytest 6.x (nose test layout) and the new
pytest 7.x (xunit test layout). This Fixes #2072 in a
much nicer way. Thanks much to @smarlowucf
2022-02-26 20:26:18 +01:00
Marcus Schäfer
1f869e7ca8
Revert "Unit test adaptions to pytest v7"
This reverts commit 0dc2e803e0.
The pytest interface from version v6 to v7 has received
changes which requires the tests to be adapted to work for
either the old or the new interface. As there are still many
distributions which uses v6 as the standard we decided to
revert back the adaptions done to support v7 and create
a version requirement to v6 in .virtualenv.dev-requirements.txt
This Fixes #2072
2022-02-26 20:19:42 +01:00
Marcus Schäfer
0dc2e803e0
Fixed unit tests
The pytest interface setup() method call has changed
in a way that an additional parameter is passed to
the method which leads to a python error at invocation
time if the setup method does not define it.
2022-02-07 21:27:39 +01:00
Marcus Schäfer
6a53c6a606
Fixed image builds without kernel
If an image is build without a kernel kiwi fails due to
some code paths expecting the presence of kernel modules
and or kernel binaries. This commit fixes this and allows
creating an image without installing a kernel.
2022-01-14 20:08:17 +01:00
Jesus Bermudez Velazquez
1f015aee8a
Add strong typing for the following API methods
* kiwi/system/kernel.py
* kiwi/system/result.py
* kiwi/system/shell.py

This references issue #1644
2021-01-22 17:25:17 +00:00
Marcus Schäfer
775b9a6c8f
Fixed ppc kernel lookup
On power the kernel is named e.g vmlinux-4.12.14-197.29-default
kiwi was missing that name match. Related to Issue #1325
2020-01-28 11:27:30 +01:00
Marcus Schäfer
550cccdbea
Refactor kernel version lookup
For the lookup of the kernel version kiwi provided a small
C program that reads the first bytes of the kernel binary
and extracts the version information. Given the various
compression formats and also the problem of kernel files
that contains the decompressor code which could be anything
it has turned out to be difficult to provide a stable tool
to read the version from the binary. Therefore the code in
kiwi was refactored to read the version via regexp match
from the filename which also makes kversion an obsolete
tool. This Fixes #1308
2020-01-11 22:31:02 +01:00
David Cassany
4b3a105026
Re-structure unit tests folders
This commit relocates unit tests to a folder structure that matches
the source code structure.

Fixes #1128
2019-10-21 14:00:05 +02:00