From 5d77188db83d04b4bee87d9d929f124ab4e8dce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 16 Jun 2015 14:58:07 +0000 Subject: [PATCH] tests optional on non-suse OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build?expand=0&rev=256 --- build.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.spec b/build.spec index 317ca0c..cc0509a 100644 --- a/build.spec +++ b/build.spec @@ -151,6 +151,15 @@ if [ `whoami` != "root" ]; then echo "WARNING: Not building as root, tests did not run!" exit 0 fi +if [ -e $RPM_BUILD_ROOT/usr/lib/build/configs/default.conf ]; then +%if 0%{?suse_version} + echo "ERROR: No default build conf, tests did not run!" + exit 1 +%else + echo "WARNING: No default build conf, tests did not run!" + exit 0 +%endif +fi # get back the default.conf link cp -av $RPM_BUILD_ROOT/usr/lib/build/configs/default.conf configs/ # do not get confused when building this already with build: