SHA256
1
0
forked from pool/systemd

- Rework the test (sub)package:

- it's been renamed into 'systemd-testsuite'
  - it includes the extended tests too
  - the relevant commits have been backported to SUSE/v249 so no SUSE
    specific patch is needed to run the extended tests (see below)
  - the deps needed by the extended tests have been added
- Import commit 7f23815a706cf2b2df3eac2eb2f8220736b8f427
  ad216581b6 test: if haveged is part of initrd it needs to be installed in the image too
  088fbb71d0 test: adapt install_pam() for openSUSE
  4d631c1f0c Revert "test: adapt TEST-13-NSPAWN-SMOKE for SUSE"
  ef956eb8a2 test: on openSUSE the static linked version of busybox is named "busybox-static"
  6f7ce633b0 TEST-13-*: in busybox container sleep(1) takes a delay in seconds only
  278baaa3ec test: don't try to find BUILD_DIR when NO_BUILD is set
  3bba2f876a test: add support for NO_BUILD=1 on openSUSE
  d77cbc1b64 test: make busybox TEST-13-only dependency

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1178
This commit is contained in:
Franck Bui 2021-08-31 20:44:53 +00:00 committed by Git OBS Bridge
parent 865899907d
commit d3ae6b510a
6 changed files with 201 additions and 35 deletions

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Mon Aug 23 15:12:10 UTC 2021 - Franck Bui <fbui@suse.com>
- Rework the test (sub)package:
- it's been renamed into 'systemd-testsuite'
- it includes the extended tests too
- the relevant commits have been backported to SUSE/v249 so no SUSE
specific patch is needed to run the extended tests (see below)
- the deps needed by the extended tests have been added
- Import commit 7f23815a706cf2b2df3eac2eb2f8220736b8f427
ad216581b6 test: if haveged is part of initrd it needs to be installed in the image too
088fbb71d0 test: adapt install_pam() for openSUSE
4d631c1f0c Revert "test: adapt TEST-13-NSPAWN-SMOKE for SUSE"
ef956eb8a2 test: on openSUSE the static linked version of busybox is named "busybox-static"
6f7ce633b0 TEST-13-*: in busybox container sleep(1) takes a delay in seconds only
278baaa3ec test: don't try to find BUILD_DIR when NO_BUILD is set
3bba2f876a test: add support for NO_BUILD=1 on openSUSE
d77cbc1b64 test: make busybox TEST-13-only dependency
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 2 12:54:44 UTC 2021 - Franck Bui <fbui@suse.com> Mon Aug 2 12:54:44 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -26,7 +26,8 @@
##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! #####
%define mini -mini %define mini -mini
%define min_kernel_version 4.5 %define min_kernel_version 4.5
%define suse_version +suse.21.gc0bb2fcbc2 %define suse_version +suse.30.g7f23815a70
%define _testsuitedir /usr/lib/systemd/tests
%bcond_with gnuefi %bcond_with gnuefi
%if 0%{?bootstrap} %if 0%{?bootstrap}
@ -39,7 +40,7 @@
%bcond_with resolved %bcond_with resolved
%bcond_with sysvcompat %bcond_with sysvcompat
%bcond_with experimental %bcond_with experimental
%bcond_with tests %bcond_with testsuite
%else %else
%bcond_without coredump %bcond_without coredump
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
@ -53,7 +54,7 @@
%bcond_without resolved %bcond_without resolved
%bcond_without sysvcompat %bcond_without sysvcompat
%bcond_without experimental %bcond_without experimental
%bcond_without tests %bcond_without testsuite
%endif %endif
Name: systemd-mini Name: systemd-mini
@ -488,22 +489,77 @@ This package contains systemd-journal-gatewayd,
systemd-journal-remote, and systemd-journal-upload. systemd-journal-remote, and systemd-journal-upload.
%endif %endif
%if %{with tests} %if %{with testsuite}
%package tests %package testsuite
Summary: Unit tests for systemd Summary: Testsuite for systemd
# Unit tests dependencies
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
Recommends: python3 Recommends: python3
Recommends: python3-colorama Recommends: python3-colorama
# Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped) # Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped)
Recommends: dosfstools Recommends: dosfstools
# The following deps on libs are for test-dlopen-so whereas the
# pkgconfig ones are used by test-funtions to find the libs on the
# host and install them in the image, see install_missing_libraries()
# for details.
%if %{with resolved}
Requires: libidn2 pkgconfig(libidn2)
%endif
%if %{with experimental}
Requires: libpwquality1 pkgconfig(pwquality)
Requires: libqrencode4 pkgconfig(libqrencode)
%endif
Requires: %{name} = %{version}-%{release}
Requires: attr
Requires: busybox-static
Requires: cryptsetup
Requires: dhcp-client
Requires: dosfstools
Requires: libcap-progs
Requires: lz4
Requires: net-tools-deprecated
Requires: qemu-kvm
Requires: quota
Requires: socat
Requires: squashfs
Requires: systemd-container
Requires: libfido2 pkgconfig(libfido2)
Requires: libtss2-esys0 pkgconfig(tss2-esys)
Requires: libtss2-mu0 pkgconfig(tss2-mu)
Requires: libtss2-rc0 pkgconfig(tss2-rc)
%if %{with coredump}
Requires: systemd-coredump
%endif
%if %{with experimental}
Requires: systemd-experimental
%endif
%if %{with journal_remote}
Requires: systemd-journal-remote
%endif
%if %{with portabled}
Requires: systemd-portable
%endif
Requires: xz
%description tests %description testsuite
This package contains the unit tests used to check various internal This package contains the unit tests as well as the extended
functions used by systemd and all its components. testsuite. The unit tests are used to check various internal functions
used by systemd whereas the extended testsuite is used to test various
functionalities of systemd and all its components.
The python script /usr/lib/systemd/tests/run-unit-tests.py can be used Note that the extended testsuite only works with UID=0.
to run all unit tests at once.
Run the following python script to run all unit tests at once:
$ %{_testsuitedir}/run-unit-tests.py
To run the full extended testsuite do the following:
$ NO_BUILD=1 %{_testsuitedir}/test/run-integration-tests.sh
Or to run one specific integration test:
$ NO_BUILD=1 make -C %{_testsuitedir}/test/TEST-01-BASIC clean setup run
For more details on the available options to run the extended
testsuite, please refer to %{_testsuitedir}/test/README.testsuite.
%endif %endif
%if %{with experimental} %if %{with experimental}
@ -626,7 +682,7 @@ Have fun with these services at your own risk.
-Dsysvinit-path= \ -Dsysvinit-path= \
-Dsysvrcnd-path= \ -Dsysvrcnd-path= \
%endif %endif
%if %{with tests} %if %{with testsuite}
-Dtests=unsafe \ -Dtests=unsafe \
-Dinstall-tests=true \ -Dinstall-tests=true \
%else %else
@ -838,6 +894,10 @@ cat %{S:14} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map
rm -f %{buildroot}%{_unitdir}/systemd-journald-audit.socket rm -f %{buildroot}%{_unitdir}/systemd-journald-audit.socket
rm -f %{buildroot}%{_unitdir}/sockets.target.wants/systemd-journald-audit.socket rm -f %{buildroot}%{_unitdir}/sockets.target.wants/systemd-journald-audit.socket
%if %{with testsuite}
cp -a test %{buildroot}%{_testsuitedir}/
%endif
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%find_lang systemd %find_lang systemd
%endif %endif
@ -1760,9 +1820,11 @@ fi
%{_mandir}/man*/systemd-portabled* %{_mandir}/man*/systemd-portabled*
%endif %endif
%if %{with tests} %if %{with testsuite}
%files tests %files testsuite
%{_prefix}/lib/systemd/tests %defattr(-,root,root)
%{_testsuitedir}
%doc %{_testsuitedir}/test/README.testsuite
%endif %endif
%if %{with experimental} %if %{with experimental}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4dbd19ef62b17dcffe27bd3ac926652a682cf62847f46ebca5161a596d42955e
size 7264460

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:519c5a3481d0f75e9893ad7370a6764ccb084de446cc130dd6e525391a090154
size 7264156

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Mon Aug 23 15:12:10 UTC 2021 - Franck Bui <fbui@suse.com>
- Rework the test (sub)package:
- it's been renamed into 'systemd-testsuite'
- it includes the extended tests too
- the relevant commits have been backported to SUSE/v249 so no SUSE
specific patch is needed to run the extended tests (see below)
- the deps needed by the extended tests have been added
- Import commit 7f23815a706cf2b2df3eac2eb2f8220736b8f427
ad216581b6 test: if haveged is part of initrd it needs to be installed in the image too
088fbb71d0 test: adapt install_pam() for openSUSE
4d631c1f0c Revert "test: adapt TEST-13-NSPAWN-SMOKE for SUSE"
ef956eb8a2 test: on openSUSE the static linked version of busybox is named "busybox-static"
6f7ce633b0 TEST-13-*: in busybox container sleep(1) takes a delay in seconds only
278baaa3ec test: don't try to find BUILD_DIR when NO_BUILD is set
3bba2f876a test: add support for NO_BUILD=1 on openSUSE
d77cbc1b64 test: make busybox TEST-13-only dependency
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 2 12:54:44 UTC 2021 - Franck Bui <fbui@suse.com> Mon Aug 2 12:54:44 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -24,7 +24,8 @@
%define bootstrap 0 %define bootstrap 0
%define mini %nil %define mini %nil
%define min_kernel_version 4.5 %define min_kernel_version 4.5
%define suse_version +suse.21.gc0bb2fcbc2 %define suse_version +suse.30.g7f23815a70
%define _testsuitedir /usr/lib/systemd/tests
%bcond_with gnuefi %bcond_with gnuefi
%if 0%{?bootstrap} %if 0%{?bootstrap}
@ -37,7 +38,7 @@
%bcond_with resolved %bcond_with resolved
%bcond_with sysvcompat %bcond_with sysvcompat
%bcond_with experimental %bcond_with experimental
%bcond_with tests %bcond_with testsuite
%else %else
%bcond_without coredump %bcond_without coredump
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
@ -51,7 +52,7 @@
%bcond_without resolved %bcond_without resolved
%bcond_without sysvcompat %bcond_without sysvcompat
%bcond_without experimental %bcond_without experimental
%bcond_without tests %bcond_without testsuite
%endif %endif
Name: systemd Name: systemd
@ -486,22 +487,77 @@ This package contains systemd-journal-gatewayd,
systemd-journal-remote, and systemd-journal-upload. systemd-journal-remote, and systemd-journal-upload.
%endif %endif
%if %{with tests} %if %{with testsuite}
%package tests %package testsuite
Summary: Unit tests for systemd Summary: Testsuite for systemd
# Unit tests dependencies
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
Recommends: python3 Recommends: python3
Recommends: python3-colorama Recommends: python3-colorama
# Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped) # Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped)
Recommends: dosfstools Recommends: dosfstools
# The following deps on libs are for test-dlopen-so whereas the
# pkgconfig ones are used by test-funtions to find the libs on the
# host and install them in the image, see install_missing_libraries()
# for details.
%if %{with resolved}
Requires: libidn2 pkgconfig(libidn2)
%endif
%if %{with experimental}
Requires: libpwquality1 pkgconfig(pwquality)
Requires: libqrencode4 pkgconfig(libqrencode)
%endif
Requires: %{name} = %{version}-%{release}
Requires: attr
Requires: busybox-static
Requires: cryptsetup
Requires: dhcp-client
Requires: dosfstools
Requires: libcap-progs
Requires: lz4
Requires: net-tools-deprecated
Requires: qemu-kvm
Requires: quota
Requires: socat
Requires: squashfs
Requires: systemd-container
Requires: libfido2 pkgconfig(libfido2)
Requires: libtss2-esys0 pkgconfig(tss2-esys)
Requires: libtss2-mu0 pkgconfig(tss2-mu)
Requires: libtss2-rc0 pkgconfig(tss2-rc)
%if %{with coredump}
Requires: systemd-coredump
%endif
%if %{with experimental}
Requires: systemd-experimental
%endif
%if %{with journal_remote}
Requires: systemd-journal-remote
%endif
%if %{with portabled}
Requires: systemd-portable
%endif
Requires: xz
%description tests %description testsuite
This package contains the unit tests used to check various internal This package contains the unit tests as well as the extended
functions used by systemd and all its components. testsuite. The unit tests are used to check various internal functions
used by systemd whereas the extended testsuite is used to test various
functionalities of systemd and all its components.
The python script /usr/lib/systemd/tests/run-unit-tests.py can be used Note that the extended testsuite only works with UID=0.
to run all unit tests at once.
Run the following python script to run all unit tests at once:
$ %{_testsuitedir}/run-unit-tests.py
To run the full extended testsuite do the following:
$ NO_BUILD=1 %{_testsuitedir}/test/run-integration-tests.sh
Or to run one specific integration test:
$ NO_BUILD=1 make -C %{_testsuitedir}/test/TEST-01-BASIC clean setup run
For more details on the available options to run the extended
testsuite, please refer to %{_testsuitedir}/test/README.testsuite.
%endif %endif
%if %{with experimental} %if %{with experimental}
@ -624,7 +680,7 @@ Have fun with these services at your own risk.
-Dsysvinit-path= \ -Dsysvinit-path= \
-Dsysvrcnd-path= \ -Dsysvrcnd-path= \
%endif %endif
%if %{with tests} %if %{with testsuite}
-Dtests=unsafe \ -Dtests=unsafe \
-Dinstall-tests=true \ -Dinstall-tests=true \
%else %else
@ -836,6 +892,10 @@ cat %{S:14} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map
rm -f %{buildroot}%{_unitdir}/systemd-journald-audit.socket rm -f %{buildroot}%{_unitdir}/systemd-journald-audit.socket
rm -f %{buildroot}%{_unitdir}/sockets.target.wants/systemd-journald-audit.socket rm -f %{buildroot}%{_unitdir}/sockets.target.wants/systemd-journald-audit.socket
%if %{with testsuite}
cp -a test %{buildroot}%{_testsuitedir}/
%endif
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%find_lang systemd %find_lang systemd
%endif %endif
@ -1758,9 +1818,11 @@ fi
%{_mandir}/man*/systemd-portabled* %{_mandir}/man*/systemd-portabled*
%endif %endif
%if %{with tests} %if %{with testsuite}
%files tests %files testsuite
%{_prefix}/lib/systemd/tests %defattr(-,root,root)
%{_testsuitedir}
%doc %{_testsuitedir}/test/README.testsuite
%endif %endif
%if %{with experimental} %if %{with experimental}