summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-07-19 10:26:46 +0200
committerThomas Haller <thaller@redhat.com>2017-07-25 06:18:36 +0200
commitc528a89519333c05a137a2fd8af5633361afdade (patch)
tree386346173711c66de0cc63b65d2944ab95e2d2ed
parent1ac92ac3559c483ba3ed6efaf11843dc3a49adae (diff)
downloadNetworkManager-c528a89519333c05a137a2fd8af5633361afdade.tar.gz
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
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec4
-rwxr-xr-xcontrib/fedora/rpm/build_clean.sh6
2 files changed, 8 insertions, 2 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index 53b05a637d..56638b4c66 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[@]}"