summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernat Gabor <bgabor8@bloomberg.net>2019-03-28 19:15:34 +0000
committerBernát Gábor <gaborjbernat@gmail.com>2019-03-28 23:58:50 +0000
commitb5105b16f8bc00961d08f4dcc33a0a8c4d0506d8 (patch)
tree07a1af306378af8809ee5590c1c9f71bf98ce37c /src
parent6358ebd8598deef23a4255c4b85cf2208168544a (diff)
downloadtox-git-b5105b16f8bc00961d08f4dcc33a0a8c4d0506d8.tar.gz
do not return the action identifier from the log
Diffstat (limited to 'src')
-rw-r--r--src/tox/action.py14
-rw-r--r--src/tox/venv.py2
2 files changed, 10 insertions, 6 deletions
diff --git a/src/tox/action.py b/src/tox/action.py
index 7adee59b..bcc722f6 100644
--- a/src/tox/action.py
+++ b/src/tox/action.py
@@ -104,7 +104,9 @@ class Action(object):
exit_code = process.returncode
finally:
if out_path is not None and out_path.exists():
- output = out_path.read()
+ lines = out_path.read().split("\n")
+ # first three lines are the action, cwd, and cmd - remove it
+ output = "\n".join(lines[3:])
try:
if exit_code and not ignore_ret:
if report_fail:
@@ -210,11 +212,13 @@ class Action(object):
if self.generate_tox_log or redirect:
out_path = self.get_log_path(self.name)
with out_path.open("wt") as stdout, out_path.open("rb") as input_file_handler:
- stdout.write(
- "action: {}, msg: {}\ncwd: {}\ncmd: {}\n".format(
- self.name, self.msg, cwd, cmd_args_shell
- )
+ msg = "action: {}, msg: {}\ncwd: {}\ncmd: {}\n".format(
+ self.name.replace("\n", " "),
+ self.msg.replace("\n", " "),
+ str(cwd).replace("\n", " "),
+ cmd_args_shell.replace("\n", " "),
)
+ stdout.write(msg)
stdout.flush()
input_file_handler.read() # read the header, so it won't be written to stdout
yield input_file_handler, out_path, stderr, stdout
diff --git a/src/tox/venv.py b/src/tox/venv.py
index a92aa711..fd7344ea 100644
--- a/src/tox/venv.py
+++ b/src/tox/venv.py
@@ -737,7 +737,7 @@ def tox_runtest_post(venv):
def tox_runenvreport(venv, action):
# write out version dependency information
args = venv.envconfig.list_dependencies_command
- output = venv._pcall(args, cwd=venv.envconfig.config.toxinidir, action=action)
+ output = venv._pcall(args, cwd=venv.envconfig.config.toxinidir, action=action, returnout=True)
# the output contains a mime-header, skip it
output = output.split("\n\n")[-1]
packages = output.strip().split("\n")