summaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2023-04-14 08:37:24 +0000
committerMartin Storsjö <martin@martin.st>2023-04-27 19:25:59 +0300
commitba3bddb6f4736b99437c069d61f4e558c6198e5a (patch)
tree954a6143865683a4918c92fa3064d337d6902788 /libcxxabi
parenteb5f9a5a521ba1786a2648b2d9b36b506ebd26e4 (diff)
downloadllvm-ba3bddb6f4736b99437c069d61f4e558c6198e5a.tar.gz
[libcxx] [test] Prepend to PATH instead of overriding it
On Windows, the PATH env variable is used for locating dynamically linked librarys, akin to LD_LIBRARY_PATH on Linux. The tests that run with a dynamically linked libc++ used "--env PATH=%{lib}" in the test config. This had the unfortunate side effect of making other tools from PATH unavailable during the runtime of the tests; in particular, it caused the "executor-has-no-bash" flag to be set for all those Windows test configs (with the clang-cl static config being the only one lacking it). Thus, this increases the number of tests actually included in the clang-cl dll and all mingw test configs by 9 tests. The clang-cl static test configuration has been executing those tests since the "--env PATH=%{lib}" was removed from that test config in e78223e79efc886ef6f0ea5413deab3737d6d63b. (For mingw we haven't had a need to split the test config between shared and static, which means that the mingw static test config previously ran with --env PATH needlessly.) This increases the test coverage for patches like D146398 which can't be executed in the executor-has-no-bash configs. Change the default value of the arg.env to an empty array; when we do pass values to the option, they get passed as an array of strings, so make sure the variable behaves consistently when no arguments have been passed. Differential Revision: https://reviews.llvm.org/D148324
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in2
-rw-r--r--libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in2
-rw-r--r--libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in2
3 files changed, 3 insertions, 3 deletions
diff --git a/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in
index 6f88304fb0c5..1e9f202e8dd8 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in
@@ -11,7 +11,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib} -lc++'
))
config.substitutions.append(('%{exec}',
- '%{executor} --execdir %T --env PATH=%{lib} -- '
+ '%{executor} --execdir %T --prepend_env PATH=%{lib} -- '
))
import os, site
diff --git a/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in
index a375722ba7c2..cfdfc0f86090 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in
@@ -11,7 +11,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib -L %{lib} -lc++ -lc++abi -lmsvcrt -lmsvcprt -loldnames'
))
config.substitutions.append(('%{exec}',
- '%{executor} --execdir %T --env PATH=%{lib} -- '
+ '%{executor} --execdir %T --prepend_env PATH=%{lib} -- '
))
import os, site
diff --git a/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in
index 445ee02b1a98..ba67c8b2b765 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in
@@ -11,7 +11,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib -L %{lib} -llibc++ -llibc++abi -lmsvcrt -lmsvcprt -loldnames'
))
config.substitutions.append(('%{exec}',
- '%{executor} --execdir %T --env PATH=%{lib} -- '
+ '%{executor} --execdir %T --prepend_env PATH=%{lib} -- '
))
import os, site