Skip to content

Commit 02d3575

Browse files
committed
Run unit tests at RPM build time
1 parent 9df5e0c commit 02d3575

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

puppet-jens.spec

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
1111
BuildArch: noarch
1212

1313
BuildRequires: systemd-rpm-macros, python3-devel, epel-rpm-macros
14+
# The following requires are for the %check
15+
BuildRequires: python3-pyyaml, python3-urllib3, python3-configobj
16+
BuildRequires: python3-dirq, python3-flask, python3-GitPython, git
1417

1518
Requires: git
1619
Requires(pre): shadow-utils
@@ -50,6 +53,12 @@ mkdir -p %{buildroot}%{_unitdir}
5053
install -p -m 644 systemd/jens-update.service %{buildroot}%{_unitdir}/jens-update.service
5154
install -p -m 644 systemd/jens-purge-queue.service %{buildroot}%{_unitdir}/jens-purge-queue.service
5255

56+
%check
57+
export EMAIL="[email protected]"
58+
export GIT_AUTHOR_NAME="RPM build"
59+
export GIT_COMMITTER_NAME="RPM build"
60+
%{__python3} -m unittest
61+
5362
%clean
5463
%{__rm} -rf %{buildroot}
5564

0 commit comments

Comments
 (0)