summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecka Gulliksson <rebecka.gulliksson@umu.se>2015-08-24 11:23:25 +0200
committerRebecka Gulliksson <rebecka.gulliksson@umu.se>2015-08-24 11:23:25 +0200
commit9812251ebca547393ffc4b4f4e2a74ca0df90c96 (patch)
treef28057c2e4a05c05182bd8210f6f7f0c2ca0241a
parentd9ed8929ce648d3c8f3547e720d76ad09fc85b99 (diff)
downloadtox-9812251ebca547393ffc4b4f4e2a74ca0df90c96.tar.gz
Respect the 'voting' attribute of a testenv.
If the testenv is 'non-voting' keep processing all commands even if one of them fail and don't let it influence the return code of tox.
-rw-r--r--tox/venv.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tox/venv.py b/tox/venv.py
index 7990330..75d5dfd 100644
--- a/tox/venv.py
+++ b/tox/venv.py
@@ -351,6 +351,14 @@ class VirtualEnv(object):
self._pcall(argv, cwd=cwd, action=action, redirect=redirect,
ignore_ret=ignore_ret, testcommand=True)
except tox.exception.InvocationError as err:
+ if not self.envconfig.voting:
+ self.session.report.warning(
+ "command failed, but testenv is marked "
+ "non-voting.\n"
+ " cmd: %s" % (str(err),))
+ self.status = "non-voting fail"
+ continue # keep processing commands
+
self.session.report.error(str(err))
self.status = "commands failed"
if not self.envconfig.ignore_errors: