[test-suite][cmake] sort unit test targets

This patch sorts unit test targets into directories corresponding to the
test source file directories to improve target navigation.

Reviewed By: smeenai

Differential Revision: https://reviews.llvm.org/D124810
This commit is contained in:
Grace Jennings 2022-05-16 16:50:49 -07:00 committed by Shoaib Meenai
parent 4680982b36
commit f20e6a6e61
23 changed files with 45 additions and 1 deletions

View File

@ -1,5 +1,5 @@
add_custom_target(UnitTests)
set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
set_target_properties(UnitTests PROPERTIES FOLDER "Tests/UnitTests")
function(add_llvm_unittest test_dirname)
add_unittest(UnitTests ${test_dirname} ${ARGN})

View File

@ -10,3 +10,5 @@ add_llvm_unittest(DebugInfoCodeViewTests
)
target_link_libraries(DebugInfoCodeViewTests PRIVATE LLVMTestingSupport)
set_property(TARGET DebugInfoCodeViewTests PROPERTY FOLDER "Tests/UnitTests/DebugInfoTests")

View File

@ -28,3 +28,5 @@ add_llvm_unittest(DebugInfoDWARFTests
)
target_link_libraries(DebugInfoDWARFTests PRIVATE LLVMTestingSupport)
set_property(TARGET DebugInfoDWARFTests PROPERTY FOLDER "Tests/UnitTests/DebugInfoTests")

View File

@ -11,3 +11,5 @@ add_llvm_unittest(DebugInfoGSYMTests
)
target_link_libraries(DebugInfoGSYMTests PRIVATE LLVMTestingSupport)
set_property(TARGET DebugInfoGSYMTests PROPERTY FOLDER "Tests/UnitTests/DebugInfoTests")

View File

@ -9,3 +9,5 @@ add_llvm_unittest(DebugInfoMSFTests
)
target_link_libraries(DebugInfoMSFTests PRIVATE LLVMTestingSupport)
set_property(TARGET DebugInfoMSFTests PROPERTY FOLDER "Tests/UnitTests/DebugInfoTests")

View File

@ -13,3 +13,5 @@ add_llvm_unittest_with_input_files(DebugInfoPDBTests
)
target_link_libraries(DebugInfoPDBTests PRIVATE LLVMTestingSupport)
set_property(TARGET DebugInfoPDBTests PROPERTY FOLDER "Tests/UnitTests/DebugInfoTests")

View File

@ -21,3 +21,5 @@ list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" jit_idx)
if (NOT build_idx LESS 0 AND NOT jit_idx LESS 0)
add_subdirectory(MCJIT)
endif()
set_property(TARGET ExecutionEngineTests PROPERTY FOLDER "Tests/UnitTests/ExecutionTests")

View File

@ -13,3 +13,5 @@ add_llvm_unittest(JITLinkTests
)
target_link_libraries(JITLinkTests PRIVATE LLVMTestingSupport)
set_property(TARGET JITLinkTests PROPERTY FOLDER "Tests/UnitTests/ExecutionTests")

View File

@ -32,3 +32,5 @@ add_llvm_unittest(MCJITTests
if(MINGW OR CYGWIN)
set_property(TARGET MCJITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
endif()
set_property(TARGET MCJITTests PROPERTY FOLDER "Tests/UnitTests/ExecutionTests")

View File

@ -40,3 +40,5 @@ add_llvm_unittest(OrcJITTests
target_link_libraries(OrcJITTests PRIVATE
LLVMTestingSupport
${ORC_JIT_TEST_LIBS})
set_property(TARGET OrcJITTests PROPERTY FOLDER "Tests/UnitTests/ExecutionTests")

View File

@ -22,3 +22,5 @@ add_llvm_target_unittest(AArch64Tests
DecomposeStackOffsetTest.cpp
MatrixRegisterAliasing.cpp
)
set_property(TARGET AArch64Tests PROPERTY FOLDER "Tests/UnitTests/TargetTests")

View File

@ -17,3 +17,5 @@ add_llvm_target_unittest(AMDGPUTests
DwarfRegMappings.cpp
ExecMayBeModifiedBeforeAnyUse.cpp
)
set_property(TARGET AMDGPUTests PROPERTY FOLDER "Tests/UnitTests/TargetTests")

View File

@ -21,3 +21,5 @@ add_llvm_target_unittest(ARMTests
MachineInstrTest.cpp
InstSizes.cpp
)
set_property(TARGET ARMTests PROPERTY FOLDER "Tests/UnitTests/TargetTests")

View File

@ -15,3 +15,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_unittest(PowerPCTests
AIXRelocModelTest.cpp
)
set_property(TARGET PowerPCTests PROPERTY FOLDER "Tests/UnitTests/TargetTests")

View File

@ -16,3 +16,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_target_unittest(WebAssemblyTests
WebAssemblyExceptionInfoTest.cpp
)
set_property(TARGET WebAssemblyTests PROPERTY FOLDER "Tests/UnitTests/TargetTests")

View File

@ -19,3 +19,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_unittest(X86Tests
MachineSizeOptsTest.cpp
)
set_property(TARGET X86Tests PROPERTY FOLDER "Tests/UnitTests/TargetTests")

View File

@ -12,3 +12,5 @@ add_llvm_unittest(IPOTests
WholeProgramDevirt.cpp
AttributorTest.cpp
)
set_property(TARGET IPOTests PROPERTY FOLDER "Tests/UnitTests/TransformsTests")

View File

@ -19,3 +19,5 @@ target_link_libraries(ScalarTests PRIVATE LLVMTestingSupport)
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
set_source_files_properties(LoopPassManagerTest.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-function)
endif()
set_property(TARGET ScalarTests PROPERTY FOLDER "Tests/UnitTests/TransformsTests")

View File

@ -31,3 +31,5 @@ add_llvm_unittest(UtilsTests
ValueMapperTest.cpp
VFABIUtils.cpp
)
set_property(TARGET UtilsTests PROPERTY FOLDER "Tests/UnitTests/TransformsTests")

View File

@ -13,3 +13,5 @@ add_llvm_unittest(VectorizeTests
VPlanHCFGTest.cpp
VPlanSlpTest.cpp
)
set_property(TARGET VectorizeTests PROPERTY FOLDER "Tests/UnitTests/TransformsTests")

View File

@ -15,3 +15,5 @@ add_llvm_unittest(CFIVerifyTests
GraphBuilder.cpp
)
target_link_libraries(CFIVerifyTests PRIVATE LLVMCFIVerify)
set_property(TARGET CFIVerifyTests PROPERTY FOLDER "Tests/UnitTests/ToolTests")

View File

@ -62,3 +62,5 @@ add_llvm_target_unittest(LLVMExegesisTests
${exegesis_sources}
)
target_link_libraries(LLVMExegesisTests PRIVATE ${exegesis_link_libraries})
set_property(TARGET LLVMExegesisTests PROPERTY FOLDER "Tests/UnitTests/ToolTests")

View File

@ -9,3 +9,5 @@ add_llvm_unittest(LLVMProfgenTests
target_link_libraries(LLVMProfgenTests PRIVATE LLVMTestingSupport)
add_dependencies(LLVMProfgenTests intrinsics_gen)
set_property(TARGET LLVMProfgenTests PROPERTY FOLDER "Tests/UnitTests/ToolTests")