From 9e5b86f6474467bd573fe00f16dd8ec1bc62a4f3 Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Fri, 8 Sep 2023 10:02:44 +0200 Subject: [PATCH] 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 (cherry picked from commit 3d8b8dc09ae309597150c1b0a02b22389077f7e1) Signed-off-by: Sebastiaan van Stijn --- hack/make/test-docker-py | 2 +- hack/make/test-integration | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/make/test-docker-py b/hack/make/test-docker-py index 12a640e661..035bb213a3 100644 --- a/hack/make/test-docker-py +++ b/hack/make/test-docker-py @@ -57,4 +57,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") diff --git a/hack/make/test-integration b/hack/make/test-integration index 5cfbc89697..458d059378 100755 --- a/hack/make/test-integration +++ b/hack/make/test-integration @@ -24,4 +24,4 @@ fi set -x exit ${testexit} -) 2>&1 | tee -a "$DEST/test.log" +) &> >(tee -a "$DEST/test.log")