Gris Ge
2015-04-01 12:24:28 UTC
* In order to save time on debugging automake and rpm spec,
allowing user to skip the 'make check' with this command:
rpmbuild -ba libstoragemgmt.spec --without test
* By default, the 'make check' will still be kicked off as old days.
Signed-off-by: Gris Ge <***@redhat.com>
---
packaging/libstoragemgmt.spec.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/packaging/libstoragemgmt.spec.in b/packaging/libstoragemgmt.spec.in
index 38e0d28..967826b 100644
--- a/packaging/libstoragemgmt.spec.in
+++ b/packaging/libstoragemgmt.spec.in
@@ -1,5 +1,6 @@
%bcond_with rest_api
%bcond_without megaraid
+%bcond_without test
# Use one-line macro for OBS workaround:
# https://bugzilla.novell.com/show_bug.cgi?id=864323
@@ -9,6 +10,9 @@
%{?_with_megaraid: %global with_megaraid 1 }
%{?_without_megaraid: %global with_megaraid 0 }
+%{?_with_test: %global with_test 1 }
+%{?_without_test: %global with_test 0 }
+
%define libsoname libstoragemgmt
%if 0%{?suse_version} || 0%{?fedora} >= 15 || 0%{?rhel} >= 7
@@ -288,12 +292,14 @@ install -m 755 tools/udev/scan-scsi-target \
%clean
rm -rf %{buildroot}
+%if 0%{?with_test}
%check
if ! make check
then
cat test/test-suite.log || true
exit 1
fi
+%endif
%pre -n %{libstoragemgmt}
if [ $1 -eq 1 ]; then
allowing user to skip the 'make check' with this command:
rpmbuild -ba libstoragemgmt.spec --without test
* By default, the 'make check' will still be kicked off as old days.
Signed-off-by: Gris Ge <***@redhat.com>
---
packaging/libstoragemgmt.spec.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/packaging/libstoragemgmt.spec.in b/packaging/libstoragemgmt.spec.in
index 38e0d28..967826b 100644
--- a/packaging/libstoragemgmt.spec.in
+++ b/packaging/libstoragemgmt.spec.in
@@ -1,5 +1,6 @@
%bcond_with rest_api
%bcond_without megaraid
+%bcond_without test
# Use one-line macro for OBS workaround:
# https://bugzilla.novell.com/show_bug.cgi?id=864323
@@ -9,6 +10,9 @@
%{?_with_megaraid: %global with_megaraid 1 }
%{?_without_megaraid: %global with_megaraid 0 }
+%{?_with_test: %global with_test 1 }
+%{?_without_test: %global with_test 0 }
+
%define libsoname libstoragemgmt
%if 0%{?suse_version} || 0%{?fedora} >= 15 || 0%{?rhel} >= 7
@@ -288,12 +292,14 @@ install -m 755 tools/udev/scan-scsi-target \
%clean
rm -rf %{buildroot}
+%if 0%{?with_test}
%check
if ! make check
then
cat test/test-suite.log || true
exit 1
fi
+%endif
%pre -n %{libstoragemgmt}
if [ $1 -eq 1 ]; then
--
1.8.3.1
1.8.3.1