[libomptarget] Pass OMP_TARGET_OFFLOAD env variable through to tests
Useful for OMP_TARGET_OFFLOAD=MANDATORY when testing
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D111995
GitOrigin-RevId: 251b1e7c25b5aa0cf46f04741c5b935b8efcceff
diff --git a/libomptarget/test/lit.cfg b/libomptarget/test/lit.cfg
index 3693343..5b3e2f5 100644
--- a/libomptarget/test/lit.cfg
+++ b/libomptarget/test/lit.cfg
@@ -17,6 +17,9 @@
if 'LIBOMPTARGET_DEBUG' in os.environ:
config.environment['LIBOMPTARGET_DEBUG'] = os.environ['LIBOMPTARGET_DEBUG']
+if 'OMP_TARGET_OFFLOAD' in os.environ:
+ config.environment['OMP_TARGET_OFFLOAD'] = os.environ['OMP_TARGET_OFFLOAD']
+
def append_dynamic_library_path(name, value, sep):
if name in config.environment:
config.environment[name] = value + sep + config.environment[name]