1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

Merge pull request #25389 from fbuihuu/update-test-for-opensuse

Update test/ for openSUSE
This commit is contained in:
Yu Watanabe 2022-11-19 05:58:51 +09:00 committed by GitHub
commit 8077dc9657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 12 deletions

View File

@ -3977,7 +3977,7 @@ exe = custom_target(
install_dir : bindir)
public_programs += exe
if want_tests != 'false'
if want_tests != 'false' and want_kernel_install
test('test-kernel-install',
test_kernel_install_sh,
args : [exe.full_path(), loaderentry_install])

View File

@ -88,10 +88,10 @@ NSPAWN_ARGUMENTS='...'
Specify additional arguments for systemd-nspawn
QEMU_TIMEOUT=infinity
Set a timeout for tests under qemu (defaults to infinity)
Set a timeout for tests under qemu (defaults to 1800 sec)
NSPAWN_TIMEOUT=infinity
Set a timeout for tests under systemd-nspawn (defaults to infinity)
Set a timeout for tests under systemd-nspawn (defaults to 1800 sec)
INTERACTIVE_DEBUG=1
Configure the machine to be more *user-friendly* for interactive debuggung

View File

@ -955,6 +955,8 @@ install_modules() {
if get_bool "$LOOKS_LIKE_SUSE"; then
instmods ext4
# for TEST-54-CREDS
instmods dmi-sysfs
fi
}
@ -1148,7 +1150,6 @@ install_debian_systemd() {
}
install_suse_systemd() {
local testsdir=/usr/lib/systemd/tests
local pkgs
dinfo "Install SUSE systemd"
@ -1159,6 +1160,9 @@ install_suse_systemd() {
systemd-coredump
systemd-experimental
systemd-journal-remote
# Since commit fb6f25d7b979134a, systemd-resolved, which is shipped by
# systemd-network sub-package on openSUSE, has its own testsuite.
systemd-network
systemd-portable
udev
)
@ -1174,15 +1178,21 @@ install_suse_systemd() {
done < <(rpm -ql "$p")
done
# we only need testsdata dir as well as the unit tests (for
# TEST-02-UNITTESTS) in the image.
dinfo "Install unit tests and testdata directory"
# Embed the files needed by the extended testsuite at runtime. Also include
# the unit tests needed by TEST-02-UNITTESTS. This is mostly equivalent to
# what `ninja install` does for the tests when '-Dinstall-tests=true'.
#
# Why? openSUSE ships a package named 'systemd-testsuite' which contains
# the minimal set of files that allows to run the testsuite on the host (as
# long as it runs an equivalent version of systemd) getting rid of the
# hassles of fetching, configuring, building the source code.
dinfo "Install the files needed by the tests at runtime"
image_install "${SOURCE_DIR}"/test-*
inst_recursive "${SOURCE_DIR}/testdata"
inst_recursive "${SOURCE_DIR}/manual"
mkdir -p "$initdir/$testsdir"
cp "$testsdir"/test-* "$initdir/$testsdir/"
cp -a "$testsdir/testdata" "$initdir/$testsdir/"
# On openSUSE, these dirs are not created at package install for now on.
# On openSUSE, this directory is not created at package install, at least
# for now.
mkdir -p "$initdir/var/log/journal/remote"
}