From eddde23de6b133486c6d23a19f9197025a00c459 Mon Sep 17 00:00:00 2001 From: Vincent Danno Date: Mon, 10 May 2021 11:27:15 +0200 Subject: Use constants instead of hard-coding paths Signed-off-by: Vincent Danno Change-Id: I9bef7db7584d6b615ef102d13797914095512733 --- xtesting/ci/run_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xtesting/ci') diff --git a/xtesting/ci/run_tests.py b/xtesting/ci/run_tests.py index ea606bd4..989969bc 100644 --- a/xtesting/ci/run_tests.py +++ b/xtesting/ci/run_tests.py @@ -308,17 +308,17 @@ class Runner(): def main(): """Entry point""" try: - os.makedirs('/var/lib/xtesting/results/') + os.makedirs(constants.RESULTS_DIR) except OSError as ex: if ex.errno != errno.EEXIST: - six.print_("Cannot create /var/lib/xtesting/results/") + six.print_("{} {}".format("Cannot create", constants.RESULTS_DIR)) return testcase.TestCase.EX_RUN_ERROR if env.get('DEBUG').lower() == 'true': logging.config.fileConfig(pkg_resources.resource_filename( - 'xtesting', 'ci/logging.debug.ini')) + 'xtesting', constants.DEBUG_INI_PATH)) else: logging.config.fileConfig(pkg_resources.resource_filename( - 'xtesting', 'ci/logging.ini')) + 'xtesting', constants.INI_PATH)) logging.captureWarnings(True) parser = RunTestsParser() args = parser.parse_args(sys.argv[1:]) -- cgit 1.2.3-korg