contrib/rpm: skip tests for -Q build option

Previously, the --quick option only mattered when creating
the source tarball, to run `make dist` instead of the slower
`make distcheck`.

Extend its meaning to also skip unit tests while building the RPM.
You still can enable them with

  $ ./contrib/fedora/rpm/build_clean.sh -Q -w test

(cherry picked from commit c528a89519)
This commit is contained in:
Thomas Haller 2017-07-19 10:26:46 +02:00
parent 75efe912c8
commit b77b259ff4
2 changed files with 8 additions and 2 deletions

View file

@ -430,7 +430,11 @@ intltoolize --automake --copy --force
--with-systemdsystemunitdir=%{systemd_dir} \
--with-system-ca-path=/etc/pki/tls/cert.pem \
--with-dbus-sys-dir=%{dbus_sys_dir} \
%if %{with test}
--with-tests=yes \
%else
--with-tests=no \
%endif
--with-valgrind=no \
--enable-ifcfg-rh=yes \
%if %{with ppp}

View file

@ -69,9 +69,7 @@ for A; do
SOURCE_FROM_GIT=1
;;
-Q|--quick)
NO_DIST=0
QUICK=1
SOURCE_FROM_GIT=0
;;
-N|--no-dist)
NO_DIST=1
@ -147,6 +145,10 @@ if [[ $NO_DIST != 1 ]]; then
fi
fi
if [[ $QUICK == 1 ]]; then
WITH_LIST=(--without test "${WITH_LIST[@]}")
fi
export SOURCE_FROM_GIT
export BUILDTYPE
export NM_RPMBUILD_ARGS="${WITH_LIST[@]}"