diff options
author | Thomas Haller <thaller@redhat.com> | 2017-07-19 10:26:46 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-07-26 18:47:53 +0200 |
commit | b77b259ff4bd8aaf99c7eab778323f13f8b52d8b (patch) | |
tree | e6f5d54a03fe711eb1370a1fbb82d68a3de2cbca | |
parent | 75efe912c802e98b874b69312be3bddcefa64c5b (diff) | |
download | NetworkManager-b77b259ff4bd8aaf99c7eab778323f13f8b52d8b.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
(cherry picked from commit c528a89519333c05a137a2fd8af5633361afdade)
-rw-r--r-- | contrib/fedora/rpm/NetworkManager.spec | 4 | ||||
-rwxr-xr-x | 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[@]}" |