Prechádzať zdrojové kódy

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>
Djordje Lukic 1 rok pred
rodič
commit
3d8b8dc09a
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      hack/make/test-docker-py
  2. 1 1
      hack/make/test-integration

+ 1 - 1
hack/make/test-docker-py

@@ -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")

+ 1 - 1
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")