From 9919f4ac3198680882eb157e26dceb12540fe2d2 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 17 May 2021 17:19:29 +0200 Subject: [PATCH] Do not include unit-tests by default unit-test.py requires pexpect which may be not packaged. Signed-off-by: Jan Friesse --- booth.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index ac133ff..5964e21 100644 --- a/booth.spec +++ b/booth.spec @@ -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