From ae31d7838c36fe2e7925f2fe137da661e31de74b Mon Sep 17 00:00:00 2001 From: Joachim Protze Date: Wed, 22 Jul 2020 12:14:28 +0200 Subject: [PATCH] [OpenMP][NFC] pass on env variables to libomptarget tests --- openmp/libomptarget/test/lit.cfg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg index 3cc0b83d27ba..3dbe8789d516 100644 --- a/openmp/libomptarget/test/lit.cfg +++ b/openmp/libomptarget/test/lit.cfg @@ -9,6 +9,14 @@ if 'PYLINT_IMPORT' in os.environ: config = object() lit_config = object() +# Use the CUDA device as suggested by the env +if 'CUDA_VISIBLE_DEVICES' in os.environ: + config.environment['CUDA_VISIBLE_DEVICES'] = os.environ['CUDA_VISIBLE_DEVICES'] + +# Allow running the tests with omptarget debug output +if 'LIBOMPTARGET_DEBUG' in os.environ: + config.environment['LIBOMPTARGET_DEBUG'] = os.environ['LIBOMPTARGET_DEBUG'] + def append_dynamic_library_path(name, value, sep): if name in config.environment: config.environment[name] = value + sep + config.environment[name]