From 8ad4054d53f934f81fe83873aa5030c948ccac23a79572bea3146eb750f1a97c Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 11 Nov 2020 13:44:24 +0000 Subject: [PATCH] fool make check OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=52 --- supermin.spec | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/supermin.spec b/supermin.spec index 86c987b..8a4817f 100644 --- a/supermin.spec +++ b/supermin.spec @@ -88,11 +88,36 @@ find %{buildroot} -ls %check ls -alt /boot /lib/modules || : ls -altd /lib/modules/*/* || : + +for i in /boot/Image* /boot/vmlinu* +do + test -f "$i" || continue + if get_kernel_version "${i}" > $$ + then + if test -s $$ + then + read SUPERMIN_KERNEL_VERSION < $$ + export "SUPERMIN_KERNEL=$i" + export "SUPERMIN_KERNEL_VERSION=$SUPERMIN_KERNEL_VERSION" + export "SUPERMIN_MODULES=/lib/modules/${SUPERMIN_KERNEL_VERSION}" + break + fi + fi +done +rm -fv $$ +test -n "${SUPERMIN_KERNEL}" +test -n "${SUPERMIN_KERNEL_VERSION}" +test -d "${SUPERMIN_MODULES}" %ifnarch s390x -make check || { - cat tests/test-suite.log - exit 1 -} +if make check +then + rc=0 +else + : rc $? + rc=1 +fi +cat tests/test-suite.log +exit ${rc} %endif %files