Skip to content

Commit

Permalink
specs: Skip the 'check' (test) phase when BUILDER_SKIP_CHECKS is set
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Jul 29, 2024
1 parent f2c8c68 commit c1f2e8e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions helpers/build-specs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" \
Expand All @@ -147,4 +153,3 @@ for spec in "${specs[@]}"; do
echo "Skipping spec (BUILDER_SKIP or in cache)"
fi
done

0 comments on commit c1f2e8e

Please sign in to comment.