unity-test-runner/dist/entrypoint.sh

49 lines
943 B
Bash
Raw Normal View History

2019-11-30 15:36:27 +00:00
#!/usr/bin/env bash
#
# Create directory for license activation
#
ACTIVATE_LICENSE_PATH="$GITHUB_WORKSPACE/_activate-license"
mkdir -p "$ACTIVATE_LICENSE_PATH"
2019-11-30 15:36:27 +00:00
#
# Run steps
2019-11-30 15:36:27 +00:00
#
source /steps/activate.sh
source /steps/set_gitcredential.sh
source /steps/run_tests.sh
source /steps/return_license.sh
2019-11-30 15:36:27 +00:00
#
# Remove license activation directory
#
rm -r "$ACTIVATE_LICENSE_PATH"
2020-09-27 19:19:29 +00:00
#
# Instructions for debugging
#
if [[ $TEST_RUNNER_EXIT_CODE -gt 0 ]]; then
echo ""
echo "###########################"
echo "# Failure #"
echo "###########################"
echo ""
echo "Please note that the exit code is not very descriptive."
echo "Most likely it will not help you solve the issue."
echo ""
echo "To find the reason for failure: please search for errors in the log above."
echo ""
fi;
2019-11-30 15:36:27 +00:00
#
# Exit with code from the build step.
2019-11-30 15:36:27 +00:00
#
if [[ $USE_EXIT_CODE == true || $TEST_RUNNER_EXIT_CODE -ne 2 ]]; then
exit $TEST_RUNNER_EXIT_CODE
2021-02-27 18:13:19 +00:00
fi;