diff --git a/.travis.yml b/.travis.yml index 0b6cbf6bdc8..7590cb54000 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_script: - composer install script: - - ./tests/travis.sh + - ./tests/travis.sh -t4 notifications: email: false diff --git a/tests/travis.sh b/tests/travis.sh index 43abd77480d..9fb50c8e2c4 100755 --- a/tests/travis.sh +++ b/tests/travis.sh @@ -1,12 +1,16 @@ #!/bin/bash PHP_BINARY="php" +PM_WORKERS="auto" -while getopts "p:" OPTION 2> /dev/null; do +while getopts "p:t:" OPTION 2> /dev/null; do case ${OPTION} in p) PHP_BINARY="$OPTARG" ;; + t) + PM_WORKERS="$OPTARG" + ;; esac done @@ -39,7 +43,7 @@ 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 +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 --settings.async-workers="$PM_WORKERS" output=$(grep '\[TesterPlugin\]' "$DATA_DIR/server.log") if [ "$output" == "" ]; then