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::
86
86
87
87
$ tox -e py27 tests/test_cd.sh
88
88
89
+ To stop the test suite as soon as any test fails, use the `fast ` tox
90
+ target::
91
+
92
+ $ tox -e fast
93
+
89
94
Add new tests by modifying an existing file or creating new script in
90
95
the ``tests `` directory.
91
96
Original file line number Diff line number Diff line change 14
14
fi
15
15
fi
16
16
17
+ # Override FAIL_FAST to true to exit as soon as any test fails
18
+ FAIL_FAST=${FAIL_FAST:- false}
19
+
17
20
# Force the tox virtualenv to be active.
18
21
#
19
22
# Since this script runs from within a separate shell created by tox,
69
72
export SHUNIT_PARENT
70
73
if ! $SHELL $test_shell_opts $test_script ; then
71
74
RC=1
75
+ if $FAIL_FAST ; then
76
+ exit $RC
77
+ fi
72
78
fi
73
79
echo
74
80
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ allowlist_externals =
13
13
zsh
14
14
ksh
15
15
16
+ [testenv:fast]
17
+ setenv =
18
+ TOXIC = true
19
+ SHELL = /bin/bash
20
+ FAIL_FAST = true
21
+
16
22
[testenv:style]
17
23
deps = flake8
18
24
commands = flake8 virtualenvwrapper docs/source/conf.py
You can’t perform that action at this time.
0 commit comments