Do not include unit-tests by default

unit-test.py requires pexpect which may be not packaged.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
Jan Friesse 2021-05-17 17:19:29 +02:00
parent bf4f3fab1d
commit 9919f4ac31

View File

@ -22,6 +22,7 @@
%bcond_with html_man
%bcond_with glue
%bcond_with run_build_tests
%bcond_with include_unit_test
# set following to the result of `git describe --abbrev=128 $commit`
# This will be used to fill booth_ver, booth_numcomm and booth_sha1.
@ -179,7 +180,9 @@ Requires: %{name}-arbitrator = %{version}-%{release}
Requires: %{name}-site = %{version}-%{release}
Requires: gdb
Requires: %{__python3}
%if 0%{?with_include_unit_test}
Requires: python3-pexpect
%endif
# runtests.py suite (for perl and ss)
Requires: perl-interpreter iproute
@ -220,7 +223,11 @@ rm -rf %{buildroot}/%{_pkgdocdir}/COPYING
mkdir -p %{buildroot}/%{test_path}
# Copy tests from tarball
cp -a -t %{buildroot}/%{test_path} \
-- conf test unit-tests script/unit-test.py
-- conf test
%if 0%{?with_include_unit_test}
cp -a -t %{buildroot}/%{test_path} \
-- unit-tests script/unit-test.py
%endif
chmod +x %{buildroot}/%{test_path}/test/booth_path
chmod +x %{buildroot}/%{test_path}/test/live_test.sh
mkdir -p %{buildroot}/%{test_path}/src