github: Fail sonarcloud test if required environment variables aren't set

Closes strongswan/strongswan#330.
This commit is contained in:
Noel Kuntze 2021-04-17 07:22:39 +02:00 committed by Tobias Brunner
parent c603704bb3
commit f830e71457
1 changed files with 7 additions and 0 deletions

View File

@ -144,6 +144,13 @@ printf-builtin)
CONFIG="--with-printf-hooks=builtin"
;;
all|coverage|sonarcloud)
if [ "$TEST" = "sonarcloud" ]; then
if [ -z "$SONAR_PROJECT" -o -z "$SONAR_ORGANIZATION" -o -z "$SONAR_TOKEN" ]; then
echo "The SONAR_PROJECT, SONAR_ORGANIZATION and SONAR_TOKEN" \
"environment variables are required to run this test"
exit 1
fi
fi
CONFIG="--enable-all --disable-android-dns --disable-android-log
--disable-kernel-pfroute --disable-keychain
--disable-lock-profiler --disable-padlock --disable-fuzzing