@@ -24,6 +24,7 @@ CONFIG=''
2424OTHER_OPTIONS=' '
2525MODE=' parallel'
2626STRICT=' --strict'
27+ PROCESS=' '
2728GROUP_COUNT=1
2829GROUP_OFFSET=0
2930
@@ -40,6 +41,7 @@ Options:
4041\t -s, --suite=SUITE; Behat tests suite;
4142\t -t, --tags=TAGS; Behat tags filter;
4243\t --non-strict; Run Behat in non-strict mode;
44+ \t --process=N; Number of parallel processes, default: available CPUs;
4345\t --group-count; Split the tests into multiple groups
4446\t --group-offset; Use together with --group-count, get Scenarios for a group
4547" | column -t -s " ;"
@@ -57,7 +59,7 @@ behat(){
5759}
5860
5961fastest (){
60- get_behat_features | " $COMPOSER_RUNTIME_BIN_DIR /fastest" --ansi -o -v " $COMPOSER_RUNTIME_BIN_DIR /behat {} ${CONFIG} ${PROFILE}${SUITE}${TAGS} --no-interaction --colors -vv ${STRICT} ${OTHER_OPTIONS} "
62+ get_behat_features | " $COMPOSER_RUNTIME_BIN_DIR /fastest" $PROCESS --ansi -o -v " $COMPOSER_RUNTIME_BIN_DIR /behat {} ${CONFIG} ${PROFILE}${SUITE}${TAGS} --no-interaction --colors -vv ${STRICT} ${OTHER_OPTIONS} "
6163}
6264
6365# Fastest option 'list-features' gives us the list of all features from given context in random order, which are later
@@ -82,6 +84,7 @@ case $i in
8284 -t=* |--tags=* ) TAGS=" --tags=${i#* =} " ;;
8385 -c=* |--config=* ) CONFIG=" --config=${i#* =} " ;;
8486 --non-strict) STRICT=' ' ;;
87+ --process=* ) PROCESS=" --process=${i#* =} " ;;
8588 --group-count=* ) GROUP_COUNT=${i#* =} ;;
8689 --group-offset=* ) GROUP_OFFSET=${i#* =} ;;
8790 -h|--help) usage; exit 1;;
0 commit comments