Skip to content

Commit

Permalink
Add flag for STOP_ON_ERROR.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmds committed Oct 4, 2023
1 parent 3c16e81 commit 019c163
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ print_usage()
echo ""
echo "Arguments:"
echo " --base-os <os> Choose between different Dockerfiles"
echo " --continue-on-error Don't stop executing tests when an error occurs"
echo " --no-build Skip building the image"
echo " --no-test Skip running the tests"
echo " --test-port <port> Local TCP port used for tests"
Expand All @@ -35,12 +36,14 @@ if [ $# -eq 0 ]; then
if [ "${FORCE:-}" != "false" ]; then
RUN_BUILD=true
fi
STOP_ON_ERROR=${STOP_ON_ERROR:-true}
else
DEBUG=
BASE_OS=
VERSIONS=""
TEST_PORT=8080
RUN_BUILD=true
STOP_ON_ERROR=true
fi

while [ $# -ne 0 ]
Expand Down Expand Up @@ -69,6 +72,9 @@ do
set -x
DEBUG=true
;;
--continue-on-error)
STOP_ON_ERROR=false
;;
--ci)
CI=true
;;
Expand Down Expand Up @@ -163,7 +169,7 @@ test_images() {
local image_os=$(echo "$base_os" | tr '[:lower:]' '[:upper:]')

echo "Running tests..."
DEBUG=$DEBUG IMAGE_OS=${image_os} SKIP_VERSION_CHECK=$CI IMAGE_NAME=${test_image} RUNTIME_IMAGE_NAME=${runtime_image} ${path}/run
STOP_ON_ERROR=$STOP_ON_ERROR DEBUG=$DEBUG IMAGE_OS=${image_os} SKIP_VERSION_CHECK=$CI IMAGE_NAME=${test_image} RUNTIME_IMAGE_NAME=${runtime_image} ${path}/run
check_result_msg $? "Tests FAILED!"
}

Expand Down

0 comments on commit 019c163

Please sign in to comment.