diff --git a/check/pytest b/check/pytest index e63bf6c07cf..27c9861a4cb 100755 --- a/check/pytest +++ b/check/pytest @@ -19,14 +19,22 @@ cd "$(git rev-parse --show-toplevel)" PYTEST_ARGS=() ACTUALLY_QUIET="" +PARALLEL="" for arg in "$@"; do if [[ "${arg}" == "--actually-quiet" ]]; then ACTUALLY_QUIET=1 else + if [[ "${arg}" == "-n" ]]; then + PARALLEL=1 + fi PYTEST_ARGS+=("${arg}") fi done +if [ -z "${PARALLEL}" ]; then + PYTEST_ARGS+=("-n=auto") +fi + source dev_tools/pypath PYTHON_VERSION=$(python -V 2>&1 | sed 's/.* \([0-9]\).\([0-9]\).*/\1\2/') if [ "$PYTHON_VERSION" -lt "37" ]; then diff --git a/check/pytest-and-incremental-coverage b/check/pytest-and-incremental-coverage index 027c2260fa1..0d681fe963a 100755 --- a/check/pytest-and-incremental-coverage +++ b/check/pytest-and-incremental-coverage @@ -79,7 +79,7 @@ check/pytest --actually-quiet \ pytest_result=$? -# assume succesful cover_result in case coverage is not run +# assume successful cover_result in case coverage is not run cover_result=0 if (( $ANALYZE_COV )); then # Convert to .py,cover files.