
In some cases, when the daemon launched by a test panics and quits, the cleanup code would end with an error when trying to kill it by its pid. In those cases the whole suite will end up waiting for the daemon that we start in .integration-daemon-start to finish and we end up waiting 2 hours for the CI to cancel after a timeout. Using process substitution makes the integration tests quit. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
27 lines
583 B
Bash
Executable file
27 lines
583 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e -o pipefail
|
|
|
|
source hack/make/.integration-test-helpers
|
|
|
|
if [ ! -z "${TEST_SKIP_INTEGRATION}" ] && [ ! -z "${TEST_SKIP_INTEGRATION_CLI}" ]; then
|
|
echo integration and integration-cli skipped according to env vars
|
|
exit 0
|
|
fi
|
|
|
|
(
|
|
env
|
|
build_test_suite_binaries
|
|
bundle .integration-daemon-start
|
|
|
|
testexit=0
|
|
(repeat run_test_integration) || testexit=$?
|
|
|
|
# Always run cleanup, even if the subshell fails
|
|
bundle .integration-daemon-stop
|
|
cleanup_test_suite_binaries
|
|
|
|
echo exiting test-integration
|
|
set -x
|
|
exit ${testexit}
|
|
|
|
) &> >(tee -a "$DEST/test.log")
|