150
|
1 # Debug Info tests. These tests invoke clang to generate programs with
|
|
2 # various types of debug info, and then run those programs under a debugger
|
|
3 # such as GDB or LLDB to verify the results.
|
|
4
|
|
5 add_llvm_executable(check-gdb-llvm-support
|
|
6 llvm-prettyprinters/gdb/llvm-support.cpp
|
|
7 )
|
|
8 target_link_libraries(check-gdb-llvm-support PRIVATE LLVMSupport)
|
|
9
|
|
10 set(DEBUGINFO_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
11 set(DEBUGINFO_TESTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
|
12
|
|
13 set(DEBUGINFO_TEST_DEPS
|
|
14 clang
|
|
15 FileCheck
|
|
16 count
|
|
17 llvm-objdump
|
|
18 check-gdb-llvm-support
|
|
19 not
|
|
20 )
|
|
21
|
|
22 # The Windows builder scripts pass -fuse-ld=lld.
|
|
23 if (WIN32)
|
|
24 set(DEBUGINFO_TEST_DEPS ${DEBUGINFO_TEST_DEPS} lld)
|
|
25 endif()
|
|
26
|
|
27 if (NOT DEFINED PYTHON_EXECUTABLE)
|
|
28 message(FATAL_ERROR "Cannot run debuginfo-tests without python")
|
|
29 elseif(PYTHON_VERSION_MAJOR LESS 3)
|
|
30 message(FATAL_ERROR "Cannot run debuginfo-tests without python 3")
|
|
31 else()
|
|
32 configure_lit_site_cfg(
|
|
33 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
|
|
34 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
|
|
35 MAIN_CONFIG
|
|
36 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
|
|
37 )
|
|
38
|
|
39 add_lit_testsuite(check-debuginfo "Running debug info integration tests"
|
|
40 ${CMAKE_CURRENT_BINARY_DIR}
|
|
41 DEPENDS ${DEBUGINFO_TEST_DEPS}
|
|
42 )
|
|
43 set_target_properties(check-debuginfo PROPERTIES FOLDER "Debug info tests")
|
|
44 endif()
|