Skip to content

WIP: [lldb][test] Re-enable TestDataFormatterLibcxxRangesRefView.py #6893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lldb/cmake/modules/LLDBStandalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source
set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree")

set(LLDB_TEST_LIBCXX_ROOT_DIR "${LLVM_BINARY_DIR}" CACHE PATH
"The build root for libcxx. Used in standalone builds to point the API tests to a custom build of libcxx.")

set(LLVM_LIT_ARGS "-sv" CACHE STRING "Default options for lit")

set(lit_file_name "llvm-lit")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def check_foo(self):
children=self.check_string_vec_children())

@add_test_categories(["libc++"])
@skipIf(bugnumber="rdar://109455906") # The standalone build of LLDB doesn't test against custom libcxx builds
def test_with_run_command(self):
"""Test that std::ranges::ref_view is formatted correctly when printed.
"""
Expand Down
15 changes: 12 additions & 3 deletions lldb/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,18 @@ if(TARGET clang)
# FIXME: Standalone builds should import the cxx target as well.
if(LLDB_BUILT_STANDALONE)
# For now check that the include directory exists.
set(cxx_dir "${LLVM_BINARY_DIR}/include/c++")
if(NOT EXISTS ${cxx_dir})
message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}")
set(cxx_dir "${LLDB_TEST_LIBCXX_ROOT_DIR}/include/c++")
if(EXISTS ${cxx_dir})
# These variables make sure the API tests can run against a custom
# build of libcxx even for standalone builds.
set(LLDB_HAS_LIBCXX ON)
set(LIBCXX_LIBRARY_DIR "${LLDB_TEST_LIBCXX_ROOT_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}")
set(LIBCXX_GENERATED_INCLUDE_DIR "${LLDB_TEST_LIBCXX_ROOT_DIR}/include/c++/v1")
else()
message(FATAL_ERROR
"Couldn't find libcxx build in '${LLDB_TEST_LIBCXX_ROOT_DIR}'. To run the "
"test-suite for a standalone LLDB build please build libcxx and point "
"LLDB_TEST_LIBCXX_ROOT_DIR to it.")
endif()
else()
# We require libcxx for the test suite, so if we aren't building it,
Expand Down