Commit 49bb4237cbe5af6c2ca5f155db3551ff9eb75e2e

Patrick Steinhardt 2020-02-07T14:04:07

azure: test: silence termination message when killing git-daemon(1) In order to properly tear down the test environment, we will kill git-daemon(1) if we've exercised it. As git-daemon(1) is spawned as a background process, it is still owned by the shell and thus killing it later on will print a termination message to the shell's stderr, causing Azure to report it as an error. Fix this by disowning the background process.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/azure-pipelines/test.sh b/azure-pipelines/test.sh
index c6c89c6..96832d6 100755
--- a/azure-pipelines/test.sh
+++ b/azure-pipelines/test.sh
@@ -81,6 +81,7 @@ if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
 	git init --bare "${GITDAEMON_DIR}/test.git"
 	git daemon --listen=localhost --export-all --enable=receive-pack --base-path="${GITDAEMON_DIR}" "${GITDAEMON_DIR}" 2>/dev/null &
 	GITDAEMON_PID=$!
+	disown $GITDAEMON_PID
 fi
 
 if [ -z "$SKIP_PROXY_TESTS" ]; then