Adrian Schröter 2020-02-03 09:48:14 +00:00 committed by Git OBS Bridge
parent 7c12216bab
commit ef3aeb1f06

View File

@ -50,11 +50,13 @@ BuildRequires: tar
%if 0%{?fedora} %if 0%{?fedora}
Requires: perl-MD5 Requires: perl-MD5
Requires: perl-TimeDate Requires: perl-TimeDate
BuildRequires: perl-TimeDate
%endif %endif
Conflicts: bsdtar < 2.5.5 Conflicts: bsdtar < 2.5.5
%if 0%{?suse_version} > 1000 %if 0%{?suse_version} > 1000
# None of them are actually required for core features. # None of them are actually required for core features.
# Perl helper scripts use them. # Perl helper scripts use them.
BuildRequires: perl(Date::Parse)
Recommends: perl(Date::Language) Recommends: perl(Date::Language)
Recommends: perl(Date::Parse) Recommends: perl(Date::Parse)
Recommends: perl(LWP::UserAgent) Recommends: perl(LWP::UserAgent)
@ -199,12 +201,16 @@ test -e baselibs_global.conf || exit 1
%check %check
for i in build build-* ; do bash -n $i || exit 1 ; done for i in build build-* ; do bash -n $i || exit 1 ; done
# expect unit tests
LANG=C prove -I. -v t/*.t
if [ `whoami` != "root" ]; then if [ `whoami` != "root" ]; then
echo "WARNING: Not building as root, tests did not run!" echo "WARNING: Not building as root, build test did not run!"
exit 0 exit 0
fi fi
if [ ! -f "%{buildroot}/usr/lib/build/configs/default.conf" ]; then if [ ! -f "%{buildroot}/usr/lib/build/configs/default.conf" ]; then
echo "WARNING: No default config, tests did not run!" echo "WARNING: No default config, build test did not run!"
exit 0 exit 0
fi fi
# get back the default.conf link # get back the default.conf link
@ -213,6 +219,8 @@ cp -av %{buildroot}/usr/lib/build/configs/default.conf configs/
export BUILD_IGNORE_2ND_STAGE=1 export BUILD_IGNORE_2ND_STAGE=1
# use our own build code # use our own build code
export BUILD_DIR=$PWD export BUILD_DIR=$PWD
# simple chroot build test
cd test cd test
# target is autodetected # target is autodetected
%if 0%{?sles_version} %if 0%{?sles_version}