Skip to content

Commit e91b78d

Browse files
authored
Merge pull request #49273 from nextcloud/test/integration/cleanup-logs
2 parents dfa7e7e + fc0c614 commit e91b78d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

build/integration/run.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ fi
3939
PORT=$((8080 + $EXECUTOR_NUMBER))
4040
echo $PORT
4141

42+
echo "" > "${NC_DATADIR}/nextcloud.log"
4243
echo "" > phpserver.log
4344

4445
PHP_CLI_SERVER_WORKERS=2 php -S localhost:$PORT -t ../.. &> phpserver.log &
@@ -47,6 +48,14 @@ echo $PHPPID
4748

4849
# Output filtered php server logs
4950
tail -f phpserver.log | grep --line-buffered -v -E ":[0-9]+ Accepted$" | grep --line-buffered -v -E ":[0-9]+ Closing$" &
51+
LOGPID=$!
52+
echo $LOGPID
53+
54+
function cleanup() {
55+
kill $PHPPID
56+
kill $LOGPID
57+
}
58+
trap cleanup EXIT
5059

5160
# The federated server is started and stopped by the tests themselves
5261
PORT_FED=$((8180 + $EXECUTOR_NUMBER))
@@ -73,8 +82,6 @@ fi
7382
vendor/bin/behat --strict --colors -f junit -f pretty $TAGS $SCENARIO_TO_RUN
7483
RESULT=$?
7584

76-
kill $PHPPID
77-
7885
if [ "$INSTALLED" == "true" ]; then
7986

8087
$OCC files_external:delete -y $ID_STORAGE

0 commit comments

Comments
 (0)