From 0727c1008a3742485cdb2b5319f47f2ed3bc2532 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Feb 2017 10:48:35 -0800 Subject: [PATCH] Fix wrong way of logging cmd failures in run_tests.py --- tools/run_tests/run_tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index cfc2b049553..2d9eb29e7f2 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -38,6 +38,7 @@ import collections import glob import itertools import json +import logging import multiprocessing import os import os.path @@ -84,8 +85,8 @@ def run_shell_command(cmd, env=None, cwd=None): try: subprocess.check_output(cmd, shell=True, env=env, cwd=cwd) except subprocess.CalledProcessError as e: - print("Error while running command '%s'. Exit status %d. Output:\n%s", - e.cmd, e.returncode, e.output) + logging.exception("Error while running command '%s'. Exit status %d. Output:\n%s", + e.cmd, e.returncode, e.output) raise # SimpleConfig: just compile with CONFIG=config, and run the binary to test