aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/ci/run_tests.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-04-24 21:08:37 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2019-12-22 21:05:17 +0100
commit616541ecdb720a6f685e828bf194ecc3e907a224 (patch)
treef4c37d001d336ee609aa8603bad346e062d9e26f /xtesting/ci/run_tests.py
parente11091e94b179c67f1c57f5fdf33816a469c5feb (diff)
Enable debug messages via env var
It stops printing in xtesting.debug.log by default. It decreases testing duration via Raspberry PI without additional tasks [1]. [1] https://wiki.opnfv.org/display/functest/Run+Functest+containers+on+Raspberry+PI Change-Id: I2eded47a7a150a45330a69f3262fc7ca6fdb7463 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/ci/run_tests.py')
-rw-r--r--xtesting/ci/run_tests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/xtesting/ci/run_tests.py b/xtesting/ci/run_tests.py
index d884a7d8..618b4ea8 100644
--- a/xtesting/ci/run_tests.py
+++ b/xtesting/ci/run_tests.py
@@ -315,8 +315,12 @@ def main():
if ex.errno != errno.EEXIST:
six.print_("Cannot create /var/lib/xtesting/results/")
return testcase.TestCase.EX_RUN_ERROR
- logging.config.fileConfig(pkg_resources.resource_filename(
- 'xtesting', 'ci/logging.ini'))
+ if env.get('DEBUG').lower() == 'true':
+ logging.config.fileConfig(pkg_resources.resource_filename(
+ 'xtesting', 'ci/logging.debug.ini'))
+ else:
+ logging.config.fileConfig(pkg_resources.resource_filename(
+ 'xtesting', 'ci/logging.ini'))
logging.captureWarnings(True)
parser = RunTestsParser()
args = parser.parse_args(sys.argv[1:])