[OpenMP][NFC] pass on env variables to libomptarget tests

This commit is contained in:
Joachim Protze 2020-07-22 12:14:28 +02:00
parent 3975c3be80
commit ae31d7838c
1 changed files with 8 additions and 0 deletions

View File

@ -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]