[libcxx-commits] [libcxx] c1a14a5 - [libcxx] Use LIBCXX_EXECUTOR in new test configs
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 21 14:43:56 PST 2021
Author: Martin Storsjö
Date: 2021-12-22T00:43:28+02:00
New Revision: c1a14a5c3e6fef181f920b66ec159b6bfac4d457
URL: https://github.com/llvm/llvm-project/commit/c1a14a5c3e6fef181f920b66ec159b6bfac4d457
DIFF: https://github.com/llvm/llvm-project/commit/c1a14a5c3e6fef181f920b66ec159b6bfac4d457.diff
LOG: [libcxx] Use LIBCXX_EXECUTOR in new test configs
This allows cross-testing (by setting LIBCXX_EXECUTOR to point
to ssh.py) without making an entirely new test config file.
Implicitly, this also fixes quoting of the python executable name
(which is quoted in test/CMakeLists.txt).
Differential Revision: https://reviews.llvm.org/D115398
Added:
Modified:
libcxx/test/configs/apple-libc++-shared.cfg.in
libcxx/test/configs/cmake-bridge.cfg.in
libcxx/test/configs/ibm-libc++-shared.cfg.in
libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
libcxx/test/configs/llvm-libc++-shared.cfg.in
libcxx/test/configs/llvm-libc++-static.cfg.in
libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
libcxxabi/test/configs/cmake-bridge.cfg.in
libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
Removed:
################################################################################
diff --git a/libcxx/test/configs/apple-libc++-shared.cfg.in b/libcxx/test/configs/apple-libc++-shared.cfg.in
index f47ffa88354f5..c48c19134a2b4 100644
--- a/libcxx/test/configs/apple-libc++-shared.cfg.in
+++ b/libcxx/test/configs/apple-libc++-shared.cfg.in
@@ -7,8 +7,6 @@
# We also don't use a per-target include directory layout, so we have only one
# include directory for the libc++ headers.
-import sys
-
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}',
@@ -21,7 +19,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{install}/lib -lc++'
))
config.substitutions.append(('%{exec}',
- '{} %{{libcxx}}/utils/run.py --execdir %T --env DYLD_LIBRARY_PATH=%{{install}}/lib -- '.format(sys.executable)
+ '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{install}/lib -- '
))
import os, site
diff --git a/libcxx/test/configs/cmake-bridge.cfg.in b/libcxx/test/configs/cmake-bridge.cfg.in
index e60845e0beb39..9f031bf2148e6 100644
--- a/libcxx/test/configs/cmake-bridge.cfg.in
+++ b/libcxx/test/configs/cmake-bridge.cfg.in
@@ -29,3 +29,4 @@ config.substitutions.append(('%{install}', '@CMAKE_BINARY_DIR@'))
config.substitutions.append(('%{include}', '%{install}/@LIBCXX_INSTALL_INCLUDE_DIR@'))
config.substitutions.append(('%{target-include}', '%{install}/@LIBCXX_INSTALL_INCLUDE_TARGET_DIR@'))
config.substitutions.append(('%{lib}', '%{install}/@LIBCXX_INSTALL_LIBRARY_DIR@'))
+config.substitutions.append(('%{executor}', '@LIBCXX_EXECUTOR@'))
diff --git a/libcxx/test/configs/ibm-libc++-shared.cfg.in b/libcxx/test/configs/ibm-libc++-shared.cfg.in
index 4efdf423207ef..c0675b83726aa 100644
--- a/libcxx/test/configs/ibm-libc++-shared.cfg.in
+++ b/libcxx/test/configs/ibm-libc++-shared.cfg.in
@@ -2,8 +2,6 @@
# AIX using a shared library.
#
-import sys
-
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}', ''))
@@ -14,7 +12,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{install}/lib -lc++ -lc++abi -latomic -Wl,-bbigtoc'
))
config.substitutions.append(('%{exec}',
- '{} %{{libcxx}}/utils/run.py --execdir %T --env LIBPATH=%{{install}}/lib -- '.format(sys.executable)
+ '%{executor} --execdir %T --env LIBPATH=%{install}/lib -- '
))
# LIBCXX-AIX-FIXME is the feature name used to XFAIL the
diff --git a/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in b/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
index d6fcaea2da891..246e84837a45f 100644
--- a/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in
@@ -2,8 +2,6 @@
# using a shared library, with GCC. This is done
diff erently from Clang because
# GCC does not support the -nostdlib++ command-line flag.
-import sys
-
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}', ''))
@@ -14,7 +12,7 @@ config.substitutions.append(('%{link_flags}',
'-L %{lib} -Wl,-rpath,%{lib} -nodefaultlibs -lc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -latomic'
))
config.substitutions.append(('%{exec}',
- '{} %{{libcxx}}/utils/run.py --execdir %T -- '.format(sys.executable)
+ '%{executor} --execdir %T -- '
))
import os, site
diff --git a/libcxx/test/configs/llvm-libc++-shared.cfg.in b/libcxx/test/configs/llvm-libc++-shared.cfg.in
index 37e5c7b6709a6..4d15c970bd294 100644
--- a/libcxx/test/configs/llvm-libc++-shared.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-shared.cfg.in
@@ -1,8 +1,6 @@
# This testing configuration handles running the test suite against LLVM's libc++
# using a shared library.
-import sys
-
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}',
@@ -15,7 +13,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -pthread'
))
config.substitutions.append(('%{exec}',
- '{} %{{libcxx}}/utils/run.py --execdir %T -- '.format(sys.executable)
+ '%{executor} --execdir %T -- '
))
import os, site
diff --git a/libcxx/test/configs/llvm-libc++-static.cfg.in b/libcxx/test/configs/llvm-libc++-static.cfg.in
index 57229ddf90231..eaa711a82908e 100644
--- a/libcxx/test/configs/llvm-libc++-static.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-static.cfg.in
@@ -1,8 +1,6 @@
# This testing configuration handles running the test suite against LLVM's libc++
# using a static library.
-import sys
-
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}',
@@ -15,7 +13,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{lib} -lc++ -lc++abi -pthread'
))
config.substitutions.append(('%{exec}',
- '{} %{{libcxx}}/utils/run.py --execdir %T -- '.format(sys.executable)
+ '%{executor} --execdir %T -- '
))
import os, site
diff --git a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
index 4165d7a9c2493..4d0df23e0d675 100644
--- a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
+++ b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
@@ -1,7 +1,5 @@
# Testing configuration for Apple's system libc++abi.
-import sys
-
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}',
@@ -15,7 +13,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{install}/lib -lc++ -lc++abi'
))
config.substitutions.append(('%{exec}',
- '{} %{{libcxx}}/utils/run.py --execdir %T --env DYLD_LIBRARY_PATH=%{{install}}/lib -- '.format(sys.executable)
+ '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{install}/lib -- '
))
import os, site
diff --git a/libcxxabi/test/configs/cmake-bridge.cfg.in b/libcxxabi/test/configs/cmake-bridge.cfg.in
index 469872c7060be..f7ede5f16acf9 100644
--- a/libcxxabi/test/configs/cmake-bridge.cfg.in
+++ b/libcxxabi/test/configs/cmake-bridge.cfg.in
@@ -29,3 +29,4 @@ config.host_triple = '@LLVM_HOST_TRIPLE@'
config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@'))
config.substitutions.append(('%{libcxx}', '@LIBCXXABI_LIBCXX_PATH@'))
config.substitutions.append(('%{install}', '@CMAKE_BINARY_DIR@'))
+config.substitutions.append(('%{executor}', '@LIBCXXABI_EXECUTOR@'))
diff --git a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
index feb5e7b3e9dce..06d9aca508a46 100644
--- a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
+++ b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
@@ -1,7 +1,5 @@
# Testing configuration for libc++abi on AIX.
-import sys
-
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}',''))
@@ -15,7 +13,7 @@ config.substitutions.append(('%{link_flags}',
'-nostdlib++ -L %{install}/lib -lc++ -lc++abi -Wl,-bbigtoc'
))
config.substitutions.append(('%{exec}',
- '{} %{{libcxx}}/utils/run.py --execdir %T --env LIBPATH=%{{install}}/lib -- '.format(sys.executable)
+ '%{executor} --execdir %T --env LIBPATH=%{install}/lib -- '
))
import os, site
More information about the libcxx-commits
mailing list