summaryrefslogtreecommitdiff
path: root/libunwind/test
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2022-05-26 10:58:28 -0400
committerLouis Dionne <ldionne.2@gmail.com>2022-09-30 15:03:33 -0400
commita48f018bb7d8fadc67c08e71409c31713daa0071 (patch)
tree0ae2fc87bbff9d8fe3384320a7914e0bba550b31 /libunwind/test
parent3d118f29014973fdb403237ca7ba3d944fb4c487 (diff)
downloadllvm-a48f018bb7d8fadc67c08e71409c31713daa0071.tar.gz
[runtimes] Remove all traces of the legacy testing configuration system
Now that all jobs have moved over to the new style of Lit configuration, we can remove all traces of the legacy testing configuration system. This includes: - Cache settings that are not honored or useful anymore - Several CMake options that were only useful in the context of the legacy Lit configuration system - A bunch of Python support code that is not used anymore - The legacy lit.cfg.in files themselves Differential Revision: https://reviews.llvm.org/D134650
Diffstat (limited to 'libunwind/test')
-rw-r--r--libunwind/test/CMakeLists.txt10
-rw-r--r--libunwind/test/configs/cmake-bridge.cfg.in1
-rw-r--r--libunwind/test/libunwind/__init__.py0
-rw-r--r--libunwind/test/libunwind/test/__init__.py0
-rw-r--r--libunwind/test/libunwind/test/config.py71
-rw-r--r--libunwind/test/lit.site.cfg.in61
6 files changed, 0 insertions, 143 deletions
diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt
index 94fc9c359586..0a09553e692d 100644
--- a/libunwind/test/CMakeLists.txt
+++ b/libunwind/test/CMakeLists.txt
@@ -7,19 +7,9 @@ macro(pythonize_bool var)
endif()
endmacro()
-if (NOT DEFINED LIBCXX_ENABLE_SHARED)
- set(LIBCXX_ENABLE_SHARED ON)
-endif()
-
pythonize_bool(LIBUNWIND_ENABLE_CET)
-pythonize_bool(LIBCXX_ENABLE_SHARED)
-pythonize_bool(LIBUNWIND_ENABLE_SHARED)
pythonize_bool(LIBUNWIND_ENABLE_THREADS)
pythonize_bool(LIBUNWIND_USES_ARM_EHABI)
-pythonize_bool(LIBUNWIND_USE_COMPILER_RT)
-pythonize_bool(LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY)
-set(LIBUNWIND_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING
- "TargetInfo to use when setting up test environment.")
set(LIBUNWIND_EXECUTOR "${Python3_EXECUTABLE} ${LIBUNWIND_LIBCXX_PATH}/utils/run.py" CACHE STRING
"Executor to use when running tests.")
diff --git a/libunwind/test/configs/cmake-bridge.cfg.in b/libunwind/test/configs/cmake-bridge.cfg.in
index 21768702f6d8..109602db8a0f 100644
--- a/libunwind/test/configs/cmake-bridge.cfg.in
+++ b/libunwind/test/configs/cmake-bridge.cfg.in
@@ -21,7 +21,6 @@ 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.target_info = "@LIBUNWIND_TARGET_INFO@"
# Add a few features that are common to all the configurations
if @LIBUNWIND_USES_ARM_EHABI@:
diff --git a/libunwind/test/libunwind/__init__.py b/libunwind/test/libunwind/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/libunwind/test/libunwind/__init__.py
+++ /dev/null
diff --git a/libunwind/test/libunwind/test/__init__.py b/libunwind/test/libunwind/test/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/libunwind/test/libunwind/test/__init__.py
+++ /dev/null
diff --git a/libunwind/test/libunwind/test/config.py b/libunwind/test/libunwind/test/config.py
deleted file mode 100644
index 87a810b49d8a..000000000000
--- a/libunwind/test/libunwind/test/config.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#===----------------------------------------------------------------------===##
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-#===----------------------------------------------------------------------===##
-import os
-import sys
-
-from libcxx.test.config import Configuration as LibcxxConfiguration
-
-
-class Configuration(LibcxxConfiguration):
- # pylint: disable=redefined-outer-name
- def __init__(self, lit_config, config):
- super(Configuration, self).__init__(lit_config, config)
- self.libunwind_src_root = None
- self.libunwind_obj_root = None
- self.abi_library_root = None
- self.libcxx_src_root = None
-
- def configure_src_root(self):
- self.libunwind_src_root = (self.get_lit_conf('libunwind_src_root')
- or os.path.dirname(self.config.test_source_root))
- self.libcxx_src_root = (self.get_lit_conf('libcxx_src_root')
- or os.path.join(self.libunwind_src_root, '..', 'libcxx'))
-
- def configure_obj_root(self):
- self.libunwind_obj_root = self.get_lit_conf('libunwind_obj_root')
- super(Configuration, self).configure_obj_root()
-
- def has_cpp_feature(self, feature, required_value):
- return int(self.cxx.dumpMacros().get('__cpp_' + feature, 0)) >= required_value
-
- def configure_features(self):
- super(Configuration, self).configure_features()
- if self.get_lit_bool('arm_ehabi', False):
- self.config.available_features.add('libunwind-arm-ehabi')
-
- def configure_compile_flags(self):
- # Stack unwinding tests need unwinding tables and these are not
- # generated by default on all Targets.
- self.cxx.compile_flags += ['-funwind-tables']
- # Make symbols available in the tests.
- triple = self.get_lit_conf('target_triple', None)
- if triple is not None and 'linux' in triple:
- self.cxx.link_flags += ['-Wl,--export-dynamic']
- if not self.get_lit_bool('enable_threads', True):
- self.cxx.compile_flags += ['-D_LIBUNWIND_HAS_NO_THREADS']
- self.config.available_features.add('libunwind-no-threads')
- if self.get_lit_bool('x86_cet', False):
- self.cxx.compile_flags += ['-fcf-protection=full']
- super(Configuration, self).configure_compile_flags()
-
- def configure_compile_flags_header_includes(self):
- libunwind_headers = self.get_lit_conf(
- 'libunwind_headers',
- os.path.join(self.libunwind_src_root, 'include'))
- if not os.path.isdir(libunwind_headers):
- self.lit_config.fatal("libunwind_headers='%s' is not a directory."
- % libunwind_headers)
- self.cxx.compile_flags += ['-I' + libunwind_headers]
-
- def configure_link_flags_cxx_library(self):
- # libunwind tests should not link with libc++
- pass
-
- def configure_link_flags_abi_library(self):
- # libunwind tests should not link with libc++abi
- pass
diff --git a/libunwind/test/lit.site.cfg.in b/libunwind/test/lit.site.cfg.in
deleted file mode 100644
index 31530935ce87..000000000000
--- a/libunwind/test/lit.site.cfg.in
+++ /dev/null
@@ -1,61 +0,0 @@
-@AUTO_GEN_COMMENT@
-
-@SERIALIZED_LIT_PARAMS@
-
-import os
-import site
-
-config.cxx_under_test = "@CMAKE_CXX_COMPILER@"
-config.project_obj_root = "@CMAKE_BINARY_DIR@"
-config.install_root = "@CMAKE_BINARY_DIR@"
-config.libunwind_src_root = "@LIBUNWIND_SOURCE_DIR@"
-config.libunwind_obj_root = "@LIBUNWIND_BINARY_DIR@"
-config.abi_library_root = "@LIBUNWIND_LIBRARY_DIR@"
-config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@"
-config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include"
-config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
-config.llvm_unwinder = True
-config.builtins_library = "@LIBUNWIND_BUILTINS_LIBRARY@"
-config.enable_threads = @LIBUNWIND_ENABLE_THREADS@
-config.target_info = "@LIBUNWIND_TARGET_INFO@"
-config.test_linker_flags = "@LIBUNWIND_TEST_LINKER_FLAGS@"
-config.test_compiler_flags = "@LIBUNWIND_TEST_COMPILER_FLAGS@"
-config.executor = "@LIBUNWIND_EXECUTOR@"
-config.libunwind_shared = @LIBUNWIND_ENABLE_SHARED@
-config.enable_shared = @LIBCXX_ENABLE_SHARED@
-config.arm_ehabi = @LIBUNWIND_USES_ARM_EHABI@
-config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.sysroot = "@CMAKE_SYSROOT@"
-config.gcc_toolchain = "@CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN@"
-config.cxx_ext_threads = @LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY@
-config.x86_cet = @LIBUNWIND_ENABLE_CET@
-
-site.addsitedir(os.path.join(config.libunwind_src_root, 'test'))
-site.addsitedir(os.path.join(config.libcxx_src_root, 'utils'))
-
-# name: The name of this test suite.
-config.name = 'libunwind'
-
-# suffixes: A list of file extensions to treat as test files.
-config.suffixes = ['.cpp', '.s']
-
-# test_source_root: The root path where tests are located.
-config.test_source_root = os.path.join(config.libunwind_src_root, 'test')
-
-# Allow expanding substitutions that are based on other substitutions
-config.recursiveExpansionLimit = 10
-
-# Infer the test_exec_root from the build directory.
-config.test_exec_root = os.path.join(config.libunwind_obj_root, 'test')
-
-import libcxx.test.format
-config.test_format = libcxx.test.format.CxxStandardLibraryTest()
-
-lit_config.note('Using configuration variant: libunwind')
-import libunwind.test.config
-configuration = libunwind.test.config.Configuration(lit_config, config)
-configuration.configure()
-configuration.print_config_info()
-
-lit_config.warning("This is a legacy testing configuration which will be removed in LLVM 16. "
- "Please use one of the configurations in libunwind/test/configs or define your own.")