[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
This commit is contained in:
Martin Storsjö 2021-12-08 23:29:18 +02:00
parent d26520f6f7
commit c1a14a5c3e
9 changed files with 9 additions and 21 deletions

View File

@ -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

View File

@ -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@'))

View File

@ -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

View File

@ -2,8 +2,6 @@
# using a shared library, with GCC. This is done differently 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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@'))

View File

@ -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