Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(integration): Correctly cleanup logs #49273

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions build/integration/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ fi
PORT=$((8080 + $EXECUTOR_NUMBER))
echo $PORT

echo "" > "${NC_DATADIR}/nextcloud.log"
echo "" > phpserver.log

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

# Output filtered php server logs
tail -f phpserver.log | grep --line-buffered -v -E ":[0-9]+ Accepted$" | grep --line-buffered -v -E ":[0-9]+ Closing$" &
LOGPID=$!
echo $LOGPID

function cleanup() {
kill $PHPPID
kill $LOGPID
}
trap cleanup EXIT

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

kill $PHPPID

if [ "$INSTALLED" == "true" ]; then

$OCC files_external:delete -y $ID_STORAGE
Expand Down
Loading