From c1f2e8ec036235294af2131c3dd591faacd83dc6 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 29 Jul 2024 12:31:04 +0200 Subject: [PATCH] specs: Skip the 'check' (test) phase when `BUILDER_SKIP_CHECKS` is set --- helpers/build-specs.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/helpers/build-specs.sh b/helpers/build-specs.sh index 012c93d..2c7ffc2 100755 --- a/helpers/build-specs.sh +++ b/helpers/build-specs.sh @@ -103,6 +103,11 @@ function new_rpms { diff -u /tmp/rpms-before /tmp/rpms-after | tee /tmp/rpms-diff | grep -v '^[+][+]' | grep '^[+]' | sed 's/^[+]//' } +rpmbuild_options="" +if [ -n "${BUILDER_SKIP_CHECKS}" ]; then + rpmbuild_options="--nocheck" +fi + for spec in "${specs[@]}"; do echo "===================================================================" echo "-> $spec" @@ -123,12 +128,13 @@ for spec in "${specs[@]}"; do # Download sources spectool -g -R "$spec" - + # Build the rpm and record which files are new rpm_file_list > /tmp/rpms-before # NOTE: source_date_epoch_from_changelog is always overridden by SOURCE_DATE_EPOCH if that is set. # See https://fossies.org/linux/rpm/build/build.c#l_298 rpmbuild \ + ${rpmbuild_options} \ --define "_sdistdir /sdist" \ --define "_buildhost reproducible" \ --define "source_date_epoch_from_changelog Y" \ @@ -147,4 +153,3 @@ for spec in "${specs[@]}"; do echo "Skipping spec (BUILDER_SKIP or in cache)" fi done -