diff --git a/src/tox_lsr/config_files/tox-default.ini b/src/tox_lsr/config_files/tox-default.ini index ca911e5..d705899 100644 --- a/src/tox_lsr/config_files/tox-default.ini +++ b/src/tox_lsr/config_files/tox-default.ini @@ -47,11 +47,17 @@ commands = bash {lsr_scriptdir}/setup_module_utils.sh {[lsr_config]commands_pre} bash -c 'if [ -d {env:RUN_PYTEST_UNIT_DIR:unit} ]; then \ - python -m pytest -c {[lsr_pytest]configfile} --durations=5 \ + testconfigfile="{env:RUN_PYTEST_UNIT_DIR:unit}/$(basename {[lsr_pytest]configfile})"; \ + cp {[lsr_pytest]configfile} "$testconfigfile"; \ + rc=0; \ + python -m pytest -vv -c "$testconfigfile" --durations=5 \ --cov={toxinidir}/library --cov={toxinidir}/module_utils \ --cov-report=html:htmlcov-{envname} \ --cov-report=xml:coverage-{envname}.xml \ - --cov-report=term {env:RUN_PYTEST_EXTRA_ARGS:} {posargs} {env:RUN_PYTEST_UNIT_DIR:unit} ; \ + --cov-report=term \ + {env:RUN_PYTEST_EXTRA_ARGS:} {posargs} {env:RUN_PYTEST_UNIT_DIR:unit} || rc="$?"; \ + rm -f "$testconfigfile"; \ + exit "$rc"; \ fi' {[lsr_config]commands_post}