From b77b259ff4bd8aaf99c7eab778323f13f8b52d8b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 19 Jul 2017 10:26:46 +0200 Subject: [PATCH] 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 c528a89519333c05a137a2fd8af5633361afdade) --- contrib/fedora/rpm/NetworkManager.spec | 4 ++++ contrib/fedora/rpm/build_clean.sh | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 46b311206e..acf2ca03fb 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -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} diff --git a/contrib/fedora/rpm/build_clean.sh b/contrib/fedora/rpm/build_clean.sh index 0bf1fc875d..7b9f80e309 100755 --- a/contrib/fedora/rpm/build_clean.sh +++ b/contrib/fedora/rpm/build_clean.sh @@ -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[@]}"