[Openmp-commits] [openmp] 63f0fdc - [openmp] [test] Set __COMPAT_LAYER=RunAsInvoker when running tests on Windows

Martin Storsjö via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 28 12:40:48 PST 2022


Author: Martin Storsjö
Date: 2022-11-28T22:40:01+02:00
New Revision: 63f0fdc2628dfb2f52ed5a92e579f99261d946ed

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

LOG: [openmp] [test] Set __COMPAT_LAYER=RunAsInvoker when running tests on Windows

Windows heuristics may decide to want to run some tested processes
as elevated (since it may think some of them are installers - executables
with "dispatch" in the name may hit a heuristic looking for "patch").

Set this environment variable to disable this heuristic and just run
the executable with whatever privileges the caller has.

This fixes a couple tests on such versions of Windows where this
heuristic is active.

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

Added: 
    

Modified: 
    openmp/runtime/test/lit.cfg

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 666015034b0f3..c1cf24a42283e 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -111,6 +111,14 @@ if config.operating_system in ['Linux', 'Windows']:
 if config.operating_system in ['Linux']:
     config.available_features.add('hidden-helper')
 
+# Avoid Windows heuristics which try to detect potential installer programs
+# (which may need to run with elevated privileges) and ask if the user wants
+# to run them in that way. This heuristic may match for executables containing
+# the word "patch" which is a substring of "dispatch". Set an environment
+# variable indicating that we want to execute them with the current user.
+if config.operating_system == 'Windows':
+    config.environment['__COMPAT_LAYER'] = 'RunAsInvoker'
+
 import multiprocessing
 try:
     if multiprocessing.cpu_count() > 1:


        


More information about the Openmp-commits mailing list