Solved issue of builds hanging when TesterPlugin fails to load (for example incompatible API version)

This commit is contained in:
Dylan K. Taylor 2017-07-14 16:48:42 +01:00
parent e6a2b0f270
commit fb5587350d
2 changed files with 9 additions and 3 deletions

@ -1 +1 @@
Subproject commit 6daeb27e507323053e81d48b7f5742968829cfbc
Subproject commit c97a9a7db145a1ba3bc2b2279580d02d7e3046e9

View File

@ -34,9 +34,15 @@ else
fi
cp -r tests/plugins/PocketMine-TesterPlugin ./plugins
"$PHP_BINARY" src/pocketmine/PocketMine.php --no-wizard --disable-ansi --disable-readline --debug.level=2
echo -e "stop\n" | "$PHP_BINARY" src/pocketmine/PocketMine.php --no-wizard --disable-ansi --disable-readline --debug.level=2
result=$(grep 'TesterPlugin' server.log | grep 'Finished' | grep -v 'PASS')
output=$(grep '\[TesterPlugin\]' server.log)
if [ "$output" == "" ]; then
echo TesterPlugin failed to run tests, check the logs
exit 1
fi
result=$(echo "$output" | grep 'Finished' | grep -v 'PASS')
if [ "$result" != "" ]; then
echo "$result"
echo Some tests did not complete successfully, changing build status to failed