1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 21:31:28 +01:00

Properly terminate process

This commit is contained in:
Daniil Gentili 2021-04-07 18:58:25 +02:00
parent 3b0baaccf7
commit 84cd319a7c
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -160,19 +160,24 @@ n
}
}
k()
{
while :; do pkill -f 'MadelineProto worker .*' || break && sleep 1; done
}
rm -f madeline.phar testing.madeline*
echo "Testing with previous version..."
export ACTIONS_FORCE_PREVIOUS=1
cp tests/testing.php tests/testingBackup.php
runTest
pkill -f 'MadelineProto worker .*' || echo "No old process"
k
echo "Testing with new version (upgrade)..."
php tools/makephar.php $HOME/phar5 "madeline$php$branch.phar" "$GITHUB_SHA-$php"
export ACTIONS_PHAR="madeline$php$branch.phar"
runTestSimple
pkill -f 'MadelineProto worker .*' || echo "No old process"
k
echo "Testing with new version (restart)"
cp tests/testingBackup.php tests/testing.php
@ -182,7 +187,7 @@ runTest
echo "Testing with new version (reload)"
cp tests/testingBackup.php tests/testing.php
runTestSimple
pkill -f 'MadelineProto .*' || echo "No old process"
k
echo "Testing with new version (kill+reload)"
cp tests/testingBackup.php tests/testing.php