[Openmp-commits] [openmp] ae31d78 - [OpenMP][NFC] pass on env variables to libomptarget tests

Joachim Protze via Openmp-commits openmp-commits at lists.llvm.org
Wed Jul 22 03:14:52 PDT 2020


Author: Joachim Protze
Date: 2020-07-22T12:14:45+02:00
New Revision: ae31d7838c36fe2e7925f2fe137da661e31de74b

URL: https://github.com/llvm/llvm-project/commit/ae31d7838c36fe2e7925f2fe137da661e31de74b
DIFF: https://github.com/llvm/llvm-project/commit/ae31d7838c36fe2e7925f2fe137da661e31de74b.diff

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

Added: 
    

Modified: 
    openmp/libomptarget/test/lit.cfg

Removed: 
    


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


        


More information about the Openmp-commits mailing list