Index: runtime/test/lit.cfg =================================================================== --- runtime/test/lit.cfg +++ runtime/test/lit.cfg @@ -94,6 +94,14 @@ if 'Linux' in config.operating_system: config.available_features.add("linux") +# A runtime implementing 50 should typically also support a feature introduced +# with 31. A test which needs at least 50 can say "NEEDS: omp50" +omp_versions={'30','31','40','45','50'} + +for ver in omp_versions: + if ver <= config.omp_version: + config.available_features.add('omp'.ver) + # to run with icc INTEL_LICENSE_FILE must be set if 'INTEL_LICENSE_FILE' in os.environ: config.environment['INTEL_LICENSE_FILE'] = os.environ['INTEL_LICENSE_FILE'] Index: runtime/test/lit.site.cfg.in =================================================================== --- runtime/test/lit.site.cfg.in +++ runtime/test/lit.site.cfg.in @@ -15,6 +15,7 @@ config.has_ompt = @LIBOMP_OMPT_SUPPORT@ and @LIBOMP_OMPT_OPTIONAL@ config.has_libm = @LIBOMP_HAVE_LIBM@ config.has_libatomic = @LIBOMP_HAVE_LIBATOMIC@ +config.omp_version = @LIBOMP_OMP_VERSION@ # Let the main config do the real work. lit_config.load_config(config, "@LIBOMP_BASE_DIR@/test/lit.cfg") Index: runtime/test/ompt/misc/control_tool_no_ompt_support.c =================================================================== --- runtime/test/ompt/misc/control_tool_no_ompt_support.c +++ runtime/test/ompt/misc/control_tool_no_ompt_support.c @@ -1,4 +1,6 @@ // RUN: %libomp-compile-and-run +// Starting with OpenMP 5.0 the runtime should provide this function regardless of OMPT support +// REQUIRES: omp50 #include int main()