Use process substitution to redirect to tee

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>
This commit is contained in:
Djordje Lukic 2023-09-08 10:02:44 +02:00
parent de391bc48b
commit 3d8b8dc09a
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -68,4 +68,4 @@ source hack/make/.integration-test-helpers
exec docker run --rm ${run_opts} --mount type=bind,"src=${ABS_DEST}","dst=/src/${DEST}" "${docker_py_image}" pytest ${PY_TEST_OPTIONS} tests/integration
)
bundle .integration-daemon-stop
) 2>&1 | tee -a "$DEST/test.log"
) &> >(tee -a "$DEST/test.log")

View file

@ -24,4 +24,4 @@ fi
set -x
exit ${testexit}
) 2>&1 | tee -a "$DEST/test.log"
) &> >(tee -a "$DEST/test.log")