Skip to content

Commit

Permalink
fips-check.sh: always check out the master FIPS branch, for the tooli…
Browse files Browse the repository at this point in the history
…ng, and make sure it's up to date.
  • Loading branch information
douzzer committed Dec 14, 2024
1 parent 6173c1a commit 635e47a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions fips-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,21 @@ if [ -d ../fips/.git ]; then
fi
done

if ! $GIT clone --shared --no-checkout . "${TEST_DIR}/fips"; then
# The current tooling for the FIPS tests is in the master branch and must be
# checked out here.
if ! $GIT clone --shared --branch master . "${TEST_DIR}/fips"; then
echo "fips-check: Couldn't clone current working directory." 1>&2
exit 1
fi

# Make sure master is up-to-date:
pushd "${TEST_DIR}/fips" 1>/dev/null || exit 2
if ! $GIT pull "$FIPS_REPO" master; then
echo "Can't refresh master FIPS tag" 1>&2
exit 1
fi
popd 1>/dev/null || exit 2

FIPS_TAGS_CACHED_LOCALLY=y

popd 1>/dev/null || exit 2
Expand All @@ -532,7 +542,9 @@ fi
pushd "$TEST_DIR" 1>/dev/null || exit 2

if [ ! -d fips ]; then
if ! $GIT clone --depth 1 --branch "${FIPS_TAGS_NEEDED[0]}" "$FIPS_REPO" fips; then
# The current tooling for the FIPS tests is in the master branch and must be
# checked out here.
if ! $GIT clone --depth 1 --branch master "$FIPS_REPO" fips; then
echo "fips-check: Couldn't check out FIPS repository."
exit 1
fi
Expand Down

0 comments on commit 635e47a

Please sign in to comment.