llvm.org GIT mirror llvm / 774da37
Hooking up a check-all target for the runtimes projects git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279756 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Bieneman 3 years ago
2 changed file(s) with 45 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
828828 DEPENDS ${LLVM_LIT_DEPENDS}
829829 ARGS ${LLVM_LIT_EXTRA_ARGS}
830830 )
831 if(TARGET check-runtimes)
832 add_dependencies(check-all check-runtimes)
833 endif()
831834 add_custom_target(test-depends DEPENDS ${LLVM_LIT_DEPENDS})
832835 set_target_properties(test-depends PROPERTIES FOLDER "Tests")
833836 endif()
3636 # Setting these variables will allow the sub-build to put their outputs into
3737 # the library and bin directories of the top-level build.
3838 set(LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR})
39 set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_BINARY_DIR})
39 set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR})
4040
4141 foreach(entry ${runtimes})
4242 get_filename_component(projName ${entry} NAME)
5151 # will be included under here.
5252 set(HAVE_${canon_name} On)
5353
54 # Between each sub-project we want to cache and clear the LIT properties
55 set_property(GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
56 set_property(GLOBAL PROPERTY LLVM_LIT_PARAMS)
57 set_property(GLOBAL PROPERTY LLVM_LIT_DEPENDS)
58 set_property(GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
59
5460 add_subdirectory(${projName})
61
62 get_property(LLVM_LIT_TESTSUITES GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
63 get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS)
64 get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
65 get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
66
67 list(APPEND RUNTIMES_LIT_TESTSUITES ${LLVM_LIT_TESTSUITES})
68 list(APPEND RUNTIMES_LIT_PARAMS ${LLVM_LIT_PARAMS})
69 list(APPEND RUNTIMES_LIT_DEPENDS ${LLVM_LIT_DEPENDS})
70 list(APPEND RUNTIMES_LIT_EXTRA_ARGS ${LLVM_LIT_EXTRA_ARGS})
5571 endforeach()
72
73 # Add a global check rule now that all subdirectories have been traversed
74 # and we know the total set of lit testsuites.
75
76 add_lit_target(check-runtimes
77 "Running all regression tests"
78 ${RUNTIMES_LIT_TESTSUITES}
79 PARAMS ${RUNTIMES_LIT_PARAMS}
80 DEPENDS ${RUNTIMES_LIT_DEPENDS}
81 ARGS ${RUNTIMES_LIT_EXTRA_ARGS}
82 )
83 add_custom_target(test-depends-runtimes DEPENDS ${RUNTIMES_LIT_DEPENDS})
5684
5785 else() # if this is included from LLVM's CMake
5886 include(LLVMExternalProjectUtils)
85113 endforeach()
86114
87115 if(runtimes)
116
117 foreach(runtime_name ${runtime_names})
118 list(APPEND extra_targets
119 ${runtime_name}
120 install-${runtime_name}
121 check-${runtime_name})
122 endforeach()
123
88124 # Create a runtimes target that uses this file as its top-level CMake file.
89125 # The runtimes target is a configuration of all the runtime libraries
90126 # together in a single CMake invocaiton.
94130 # Builtins were built separately above
95131 CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
96132 PASSTHROUGH_PREFIXES ${prefixes}
97 EXTRA_TARGETS ${runtime_names}
133 EXTRA_TARGETS ${extra_targets}
134 test-depends-runtimes
135 check-runtimes
98136 USE_TOOLCHAIN)
137 set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS test-depends-runtimes)
138
99139 endif()
100140 endif()