File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,11 @@ Python::
8686
8787 $ tox -e py27 tests/test_cd.sh
8888
89+ To stop the test suite as soon as any test fails, use the `fast ` tox
90+ target::
91+
92+ $ tox -e fast
93+
8994Add new tests by modifying an existing file or creating new script in
9095the ``tests `` directory.
9196
Original file line number Diff line number Diff line change 1414 fi
1515fi
1616
17+ # Override FAIL_FAST to true to exit as soon as any test fails
18+ FAIL_FAST=${FAIL_FAST:- false}
19+
1720# Force the tox virtualenv to be active.
1821#
1922# Since this script runs from within a separate shell created by tox,
6972 export SHUNIT_PARENT
7073 if ! $SHELL $test_shell_opts $test_script ; then
7174 RC=1
75+ if $FAIL_FAST ; then
76+ exit $RC
77+ fi
7278 fi
7379 echo
7480
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ allowlist_externals =
1313 zsh
1414 ksh
1515
16+ [testenv:fast]
17+ setenv =
18+ TOXIC = true
19+ SHELL = /bin/bash
20+ FAIL_FAST = true
21+
1622[testenv:style]
1723deps = flake8
1824commands = flake8 virtualenvwrapper docs/source/conf.py
You can’t perform that action at this time.
0 commit comments