aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2016-08-23 13:25:02 +0200
committervalentin boucher <valentin.boucher@orange.com>2016-08-23 12:36:26 +0000
commite7ee11c43729c0c5eaa681e28c7aa7d80bcc93af (patch)
tree3549717074d57f7444a82be46ecaca9ec47ad606 /utils
parent777ea60355095a13bbad23ee33197b2815957969 (diff)
Avoid duplicating logs in run_tests.py
When run_tests.py sets logger as execute_command arg, logs are duplicated in functest.log and not shown in console (as every DEBUG message). As logger is mainly managed by the python scripts in charge of testing, it can be safely removed here. stderr is also redirected to stdout in execute_command to print possible relevant data. JIRA: FUNCTEST-431 Change-Id: Ie77544b4679e12e0a0ac7f5e5989d86862fe106b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 53fd052b7fce64294c50ca170d42367d711ccc3f)
Diffstat (limited to 'utils')
-rw-r--r--utils/functest_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/functest_utils.py b/utils/functest_utils.py
index 4d5004cbe..b916ab129 100644
--- a/utils/functest_utils.py
+++ b/utils/functest_utils.py
@@ -309,7 +309,8 @@ def execute_command(cmd, logger=None,
logger.debug(msg_exec)
else:
print(msg_exec)
- p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
+ p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
for line in iter(p.stdout.readline, b''):
line = line.replace('\n', '')
if logger: