Skip to content

Commit 87e2e8c

Browse files
committed
Allow to run test at build time
1 parent c98ec19 commit 87e2e8c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

package/python-kiwi-spec-template

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ Source1: %{name}-rpmlintrc
6969
## PATCH-FIX-OPENSUSE kiwi-revert-bls-default-for-suse.patch -- temporary until opensuse has bls
7070
Patch1001: kiwi-revert-bls-default-for-suse.patch
7171
BuildRoot: %{_tmppath}/%{name}-%{version}-build
72+
BuildRequires: kiwi-systemdeps
73+
BuildRequires: python%{python3_pkgversion}-pytest
74+
BuildRequires: python%{python3_pkgversion}-pip
75+
BuildRequires: python%{python3_pkgversion}-anymarkup-core
76+
BuildRequires: python%{python3_pkgversion}-toml
77+
BuildRequires: python%{python3_pkgversion}-xmltodict
7278
%if 0%{?fedora} || 0%{?suse_version}
7379
BuildRequires: fdupes
7480
%endif
@@ -704,6 +710,11 @@ make -C doc man
704710
# Build application wheel
705711
%{__python3} -m build --no-isolation --wheel
706712

713+
# Run tests
714+
pip install --break-system-packages dist/kiwi-%{version}-py3-none-any.whl
715+
cd test/unit
716+
pytest
717+
707718
%install
708719
# Install application
709720
%{__python3} -m installer --destdir %{buildroot} %{?is_deb:--no-compile-bytecode} dist/*.whl

0 commit comments

Comments
 (0)