SHA256
1
0
forked from pool/systemd

- Introduce subpackage systemd-tests

This subpackage is mainly used before submitting a new version of
  the systemd packages. As such it's not intended for regular users
  hence can be removed/renamed at any time. One might wonder why the
  unit tests are not executed during package builds (%check)... the
  reason is that the environment used to build package (chroot) is too
  limited and therefore only a subset of the unit tests would be
  executed in this environment.
  To disable the build of the subpackage, use "--without=tests".

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1155
This commit is contained in:
Franck Bui 2021-05-19 06:52:49 +00:00 committed by Git OBS Bridge
parent 57ff2224b1
commit 9dc8113ab8
4 changed files with 96 additions and 0 deletions

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue May 18 18:31:20 UTC 2021 - Franck Bui <fbui@suse.com>
- Introduce subpackage systemd-tests
This subpackage is mainly used before submitting a new version of
the systemd packages. As such it's not intended for regular users
hence can be removed/renamed at any time. One might wonder why the
unit tests are not executed during package builds (%check)... the
reason is that the environment used to build package (chroot) is too
limited and therefore only a subset of the unit tests would be
executed in this environment.
To disable the build of the subpackage, use "--without=tests".
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 18 10:04:16 UTC 2021 - Franck Bui <fbui@suse.com> Tue May 18 10:04:16 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -39,6 +39,7 @@
%bcond_with resolved %bcond_with resolved
%bcond_with sysvcompat %bcond_with sysvcompat
%bcond_with experimental %bcond_with experimental
%bcond_with tests
%else %else
%bcond_without coredump %bcond_without coredump
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
@ -52,6 +53,7 @@
%bcond_without resolved %bcond_without resolved
%bcond_without sysvcompat %bcond_without sysvcompat
%bcond_without experimental %bcond_without experimental
%bcond_without tests
%endif %endif
%bcond_with parentpathid %bcond_with parentpathid
@ -500,6 +502,25 @@ 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}
%package tests
Summary: Unit tests for systemd
License: LGPL-2.1-or-later
Group: System/Base
Requires: %{name} = %{version}-%{release}
Recommends: python3
Recommends: python3-colorama
# Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped)
Recommends: dosfstools
%description tests
This package contains the unit tests used to check various internal
functions used by systemd and all its components.
The python script /usr/lib/systemd/tests/run-unit-tests.py can be used
to run all unit tests at once.
%endif
%if %{with experimental} %if %{with experimental}
%package experimental %package experimental
Summary: Experimental systemd features Summary: Experimental systemd features
@ -619,6 +640,13 @@ Have fun with these services at your own risk.
%if %{without sysvcompat} %if %{without sysvcompat}
-Dsysvinit-path= \ -Dsysvinit-path= \
-Dsysvrcnd-path= \ -Dsysvrcnd-path= \
%endif
%if %{with tests}
-Dtests=unsafe \
-Dinstall-tests=true \
%else
-Dtests=false \
-Dinstall-tests=false \
%endif %endif
-Dadm-group=false \ -Dadm-group=false \
-Dwheel-group=false \ -Dwheel-group=false \
@ -1730,6 +1758,11 @@ fi
%{_mandir}/man*/systemd-portabled* %{_mandir}/man*/systemd-portabled*
%endif %endif
%if %{with tests}
%files tests
%{_prefix}/lib/systemd/tests
%endif
%if %{with experimental} %if %{with experimental}
%files experimental %files experimental
%defattr(-,root,root) %defattr(-,root,root)

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue May 18 18:31:20 UTC 2021 - Franck Bui <fbui@suse.com>
- Introduce subpackage systemd-tests
This subpackage is mainly used before submitting a new version of
the systemd packages. As such it's not intended for regular users
hence can be removed/renamed at any time. One might wonder why the
unit tests are not executed during package builds (%check)... the
reason is that the environment used to build package (chroot) is too
limited and therefore only a subset of the unit tests would be
executed in this environment.
To disable the build of the subpackage, use "--without=tests".
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 18 10:04:16 UTC 2021 - Franck Bui <fbui@suse.com> Tue May 18 10:04:16 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -37,6 +37,7 @@
%bcond_with resolved %bcond_with resolved
%bcond_with sysvcompat %bcond_with sysvcompat
%bcond_with experimental %bcond_with experimental
%bcond_with tests
%else %else
%bcond_without coredump %bcond_without coredump
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
@ -50,6 +51,7 @@
%bcond_without resolved %bcond_without resolved
%bcond_without sysvcompat %bcond_without sysvcompat
%bcond_without experimental %bcond_without experimental
%bcond_without tests
%endif %endif
%bcond_with parentpathid %bcond_with parentpathid
@ -498,6 +500,25 @@ 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}
%package tests
Summary: Unit tests for systemd
License: LGPL-2.1-or-later
Group: System/Base
Requires: %{name} = %{version}-%{release}
Recommends: python3
Recommends: python3-colorama
# Optional dep for mkfs.vfat needed by test-loop-block (otherwise skipped)
Recommends: dosfstools
%description tests
This package contains the unit tests used to check various internal
functions used by systemd and all its components.
The python script /usr/lib/systemd/tests/run-unit-tests.py can be used
to run all unit tests at once.
%endif
%if %{with experimental} %if %{with experimental}
%package experimental %package experimental
Summary: Experimental systemd features Summary: Experimental systemd features
@ -617,6 +638,13 @@ Have fun with these services at your own risk.
%if %{without sysvcompat} %if %{without sysvcompat}
-Dsysvinit-path= \ -Dsysvinit-path= \
-Dsysvrcnd-path= \ -Dsysvrcnd-path= \
%endif
%if %{with tests}
-Dtests=unsafe \
-Dinstall-tests=true \
%else
-Dtests=false \
-Dinstall-tests=false \
%endif %endif
-Dadm-group=false \ -Dadm-group=false \
-Dwheel-group=false \ -Dwheel-group=false \
@ -1728,6 +1756,11 @@ fi
%{_mandir}/man*/systemd-portabled* %{_mandir}/man*/systemd-portabled*
%endif %endif
%if %{with tests}
%files tests
%{_prefix}/lib/systemd/tests
%endif
%if %{with experimental} %if %{with experimental}
%files experimental %files experimental
%defattr(-,root,root) %defattr(-,root,root)