diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -192,102 +192,132 @@ generic-cxx03) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-cxx11) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-cxx14) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-cxx17) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-cxx20) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-cxx2b) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-assertions) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-assertions.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-debug-iterators) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-debug-iterators.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes check-abi-list ;; generic-noexceptions) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-noexceptions.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-modules) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-static) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-static.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-static.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-static.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-static.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-static.cfg.in" check-runtimes ;; generic-32bit) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-32bits.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-clang-11) export CC=clang-11 export CXX=clang++-11 clean - generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-clang-12) export CC=clang-12 export CXX=clang++-12 clean - generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-gcc) export CC=gcc-11 export CXX=g++-11 clean - generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" + generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" check-runtimes ;; generic-gcc-cxx11) @@ -295,79 +325,105 @@ export CXX=g++-11 clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared-gcc.cfg.in" check-runtimes ;; generic-asan) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-asan.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-msan) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-msan.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-tsan) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-tsan.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-ubsan) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-ubsan.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-with_llvm_unwinder) clean generate-cmake -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-singlethreaded) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-singlethreaded.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-no-debug) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-debug.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-no-filesystem) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-filesystem.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-no-random_device) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-random_device.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-no-localization) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-localization.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; generic-no-unicode) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-unicode.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; x86_64-apple-system) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \ - -DLIBCXX_TEST_CONFIG="apple-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="apple-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="apple-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="apple-libc++-shared.cfg.in" check-runtimes ;; x86_64-apple-system-backdeployment-*) @@ -401,7 +457,9 @@ ;; benchmarks) clean - generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + generate-cmake -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-cxx-benchmarks ;; documentation) @@ -422,7 +480,9 @@ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; @@ -445,7 +505,9 @@ -DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux-gnu" \ -DLLVM_ENABLE_ASSERTIONS=ON \ -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" echo "+++ Running the libc++ and libc++abi tests" ${NINJA} -C "${BUILD_DIR}" check-runtimes @@ -502,7 +564,9 @@ aarch64) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; aarch64-noexceptions) @@ -510,33 +574,43 @@ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake" \ -DLIBCXX_ENABLE_EXCEPTIONS=OFF \ -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; # Aka Armv8 32 bit armv8) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv8Arm.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; armv8-noexceptions) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv8Thumb-noexceptions.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; # Armv7 32 bit. One building Arm only one Thumb only code. armv7) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv7Arm.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; armv7-noexceptions) clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv7Thumb-noexceptions.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" + -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBCXXABI_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DLIBUNWIND_TEST_CONFIG="llvm-libc++-shared.cfg.in" check-runtimes ;; windows-dll) diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt --- a/libcxxabi/test/CMakeLists.txt +++ b/libcxxabi/test/CMakeLists.txt @@ -100,6 +100,10 @@ serialize_lit_param("${name}" "\"${value}\"") endforeach() +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/configs/cmake-bridge.cfg.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake-bridge.cfg" + @ONLY) + configure_lit_site_cfg( "${LIBCXXABI_TEST_CONFIG}" ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg diff --git a/libcxxabi/test/configs/cmake-bridge.cfg.in b/libcxxabi/test/configs/cmake-bridge.cfg.in new file mode 100644 --- /dev/null +++ b/libcxxabi/test/configs/cmake-bridge.cfg.in @@ -0,0 +1,33 @@ +@AUTO_GEN_COMMENT@ + +@SERIALIZED_LIT_PARAMS@ + +# +# This file performs the bridge between the CMake configuration and the Lit +# configuration files by setting up the LitConfig object and various Lit +# substitutions from CMake variables. +# +# Individual configuration files can take advantage of this bridge by +# loading the file and then setting up the remaining Lit substitutions. +# + +import os, site +site.addsitedir(os.path.join('@LIBCXXABI_LIBCXX_PATH@', 'utils')) +site.addsitedir(os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test')) +import libcxx.test.format + +# Basic configuration of the test suite +config.name = os.path.basename('@LIBCXX_TEST_CONFIG@-libcxxabi') +config.test_source_root = os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test') +config.test_format = libcxx.test.format.CxxStandardLibraryTest() +config.recursiveExpansionLimit = 10 +config.test_exec_root = '@CMAKE_BINARY_DIR@' +config.host_triple = '@LLVM_HOST_TRIPLE@' + +# Add substitutions for bootstrapping the test suite configuration +config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@')) +config.substitutions.append(('%{libcxx}', '@LIBCXXABI_LIBCXX_PATH@')) +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@')) diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt --- a/libunwind/test/CMakeLists.txt +++ b/libunwind/test/CMakeLists.txt @@ -51,6 +51,10 @@ serialize_lit_param("${name}" "\"${value}\"") endforeach() +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/configs/cmake-bridge.cfg.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake-bridge.cfg" + @ONLY) + configure_lit_site_cfg( "${LIBUNWIND_TEST_CONFIG}" ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg diff --git a/libunwind/test/configs/cmake-bridge.cfg.in b/libunwind/test/configs/cmake-bridge.cfg.in new file mode 100644 --- /dev/null +++ b/libunwind/test/configs/cmake-bridge.cfg.in @@ -0,0 +1,33 @@ +@AUTO_GEN_COMMENT@ + +@SERIALIZED_LIT_PARAMS@ + +# +# This file performs the bridge between the CMake configuration and the Lit +# configuration files by setting up the LitConfig object and various Lit +# substitutions from CMake variables. +# +# Individual configuration files can take advantage of this bridge by +# loading the file and then setting up the remaining Lit substitutions. +# + +import os, site +site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils')) +site.addsitedir(os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')) +import libcxx.test.format + +# Basic configuration of the test suite +config.name = os.path.basename('@LIBCXX_TEST_CONFIG@-libunwind') +config.test_source_root = os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test') +config.test_format = libcxx.test.format.CxxStandardLibraryTest() +config.recursiveExpansionLimit = 10 +config.test_exec_root = '@CMAKE_BINARY_DIR@' +config.host_triple = '@LLVM_HOST_TRIPLE@' + +# Add substitutions for bootstrapping the test suite configuration +config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@')) +config.substitutions.append(('%{libcxx}', '@LIBUNWIND_LIBCXX_PATH@')) +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@'))