mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Move Travis Test server files into a separate directory
this is for convenience locally running Travis Test so my existing data doesn't interfere
This commit is contained in:
parent
d7091f4460
commit
65e908a403
@ -17,7 +17,10 @@ if [ $? -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm server.log 2> /dev/null
|
DATA_DIR="test_data"
|
||||||
|
PLUGINS_DIR="$DATA_DIR/plugins"
|
||||||
|
|
||||||
|
rm -rf "$DATA_DIR"
|
||||||
rm PocketMine-MP.phar 2> /dev/null
|
rm PocketMine-MP.phar 2> /dev/null
|
||||||
|
|
||||||
cd tests/plugins/PocketMine-DevTools
|
cd tests/plugins/PocketMine-DevTools
|
||||||
@ -32,13 +35,13 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir "$DATA_DIR"
|
||||||
|
mkdir "$PLUGINS_DIR"
|
||||||
|
mv DevTools.phar "$PLUGINS_DIR"
|
||||||
|
cp -r tests/plugins/PocketMine-TesterPlugin "$PLUGINS_DIR"
|
||||||
|
echo -e "stop\n" | "$PHP_BINARY" PocketMine-MP.phar --no-wizard --disable-ansi --disable-readline --debug.level=2 --data="$DATA_DIR" --plugins="$PLUGINS_DIR" --anonymous-statistics.enabled=0
|
||||||
|
|
||||||
mkdir plugins 2> /dev/null
|
output=$(grep '\[TesterPlugin\]' "$DATA_DIR/server.log")
|
||||||
mv DevTools.phar plugins
|
|
||||||
cp -r tests/plugins/PocketMine-TesterPlugin ./plugins
|
|
||||||
echo -e "stop\n" | "$PHP_BINARY" PocketMine-MP.phar --no-wizard --disable-ansi --disable-readline --debug.level=2
|
|
||||||
|
|
||||||
output=$(grep '\[TesterPlugin\]' server.log)
|
|
||||||
if [ "$output" == "" ]; then
|
if [ "$output" == "" ]; then
|
||||||
echo TesterPlugin failed to run tests, check the logs
|
echo TesterPlugin failed to run tests, check the logs
|
||||||
exit 1
|
exit 1
|
||||||
@ -49,7 +52,7 @@ if [ "$result" != "" ]; then
|
|||||||
echo "$result"
|
echo "$result"
|
||||||
echo Some tests did not complete successfully, changing build status to failed
|
echo Some tests did not complete successfully, changing build status to failed
|
||||||
exit 1
|
exit 1
|
||||||
elif [ $(grep -c "ERROR\|CRITICAL\|EMERGENCY" server.log) -ne 0 ]; then
|
elif [ $(grep -c "ERROR\|CRITICAL\|EMERGENCY" "$DATA_DIR/server.log") -ne 0 ]; then
|
||||||
echo Server log contains error messages, changing build status to failed
|
echo Server log contains error messages, changing build status to failed
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user