[openmp][lit] Add support to OpenMP lit.cfg for ROCR_VISIBLE_DEVICES env-var

add support for ROCR_VISIBLE_DEVICES similar to name and purpose
as CUDA_VISIBLE_DEVICES

Differential Revision: https://reviews.llvm.org/D112503

GitOrigin-RevId: be03ef3ed1d18b8d5cf34816369dda94f474ccad
diff --git a/libomptarget/test/lit.cfg b/libomptarget/test/lit.cfg
index 850b492..f0e106c 100644
--- a/libomptarget/test/lit.cfg
+++ b/libomptarget/test/lit.cfg
@@ -13,6 +13,10 @@
 if 'CUDA_VISIBLE_DEVICES' in os.environ:
     config.environment['CUDA_VISIBLE_DEVICES'] = os.environ['CUDA_VISIBLE_DEVICES']
 
+# Use the ROCR device as suggested by the env
+if 'ROCR_VISIBLE_DEVICES' in os.environ:
+    config.environment['ROCR_VISIBLE_DEVICES'] = os.environ['ROCR_VISIBLE_DEVICES']
+
 # Allow running the tests with omptarget debug output
 if 'LIBOMPTARGET_DEBUG' in os.environ:
     config.environment['LIBOMPTARGET_DEBUG'] = os.environ['LIBOMPTARGET_DEBUG']