浏览代码

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 年之前
父节点
当前提交
3d8b8dc09a
共有 2 个文件被更改,包括 2 次插入2 次删除
  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")