47 lines · plain
1@AUTO_GEN_COMMENT@2 3@SERIALIZED_LIT_PARAMS@4 5#6# This file performs the bridge between the CMake configuration and the Lit7# configuration files by setting up the LitConfig object and various Lit8# substitutions from CMake variables.9#10# Individual configuration files can take advantage of this bridge by11# loading the file and then setting up the remaining Lit substitutions.12#13 14import os, site15site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))16import libcxx.test.format17from lit.util import which18 19# Basic configuration of the test suite20config.name = os.path.basename('@LIBUNWIND_TEST_CONFIG@')21config.test_source_root = os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')22config.test_format = libcxx.test.format.CxxStandardLibraryTest()23config.recursiveExpansionLimit = 1024config.test_exec_root = os.path.join('@LIBUNWIND_BINARY_DIR@', 'test')25 26# Add a few features that are common to all the configurations27if @LIBUNWIND_USES_ARM_EHABI@:28 config.available_features.add('libunwind-arm-ehabi')29if not @LIBUNWIND_ENABLE_THREADS@:30 config.available_features.add('libunwind-no-threads')31 32# Add substitutions for bootstrapping the test suite configuration33config.substitutions.append(('%{install-prefix}', '@LIBUNWIND_TESTING_INSTALL_PREFIX@'))34config.substitutions.append(('%{include}', '@LIBUNWIND_TESTING_INSTALL_PREFIX@/include'))35config.substitutions.append(('%{lib}', '@LIBUNWIND_TESTING_INSTALL_PREFIX@/@LIBUNWIND_INSTALL_LIBRARY_DIR@'))36config.substitutions.append(('%{benchmark_flags}', ''))37 38# Check for objcopy tools39objcopy_path = which('llvm-objcopy', '@LLVM_BUILD_BINARY_DIR@/bin')40if not objcopy_path:41 objcopy_path = which('llvm-objcopy')42if not objcopy_path:43 objcopy_path = which('objcopy')44if objcopy_path:45 config.substitutions.append(('%{objcopy}', objcopy_path))46 config.available_features.add('objcopy-available')47