From fb5587350d937e9f225cce52e90dc6e032528a5a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 14 Jul 2017 16:48:42 +0100 Subject: [PATCH] Solved issue of builds hanging when TesterPlugin fails to load (for example incompatible API version) --- tests/plugins/PocketMine-TesterPlugin | 2 +- tests/travis.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/plugins/PocketMine-TesterPlugin b/tests/plugins/PocketMine-TesterPlugin index 6daeb27e5..c97a9a7db 160000 --- a/tests/plugins/PocketMine-TesterPlugin +++ b/tests/plugins/PocketMine-TesterPlugin @@ -1 +1 @@ -Subproject commit 6daeb27e507323053e81d48b7f5742968829cfbc +Subproject commit c97a9a7db145a1ba3bc2b2279580d02d7e3046e9 diff --git a/tests/travis.sh b/tests/travis.sh index d57da86a1..92469586d 100755 --- a/tests/travis.sh +++ b/tests/travis.sh @@ -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