Skip to content

Commit c8be7af

Browse files
mikhailramalhoGeorgeARM
authored andcommitted
[libc] Add missing dependency for test target (llvm#138423)
It seems we were missing a dependency when adding a new test target, e.g., test libc.test.src.math.sqrt_test.__unit__ would create a custom target in the form of: ``` add_custom_target( libc.test.src.__support.FPUtil.dyadic_float_test.__unit__ COMMAND ${LIBC_UNITTEST_ENV} ${CMAKE_CROSSCOMPILING_EMULATOR} libc.test.src.__support.FPUtil.dyadic_float_test.__unit__.__build__ COMMENT Running unit test libc.test.src.__support.FPUtil.dyadic_float_test.__unit__ ) ``` but it wouldn't set that it depends on libc.test.src.__support.FPUtil.dyadic_float_test.__unit__.__build__ being built. For some reason, it would break the rv32 buildbot, as it would try to run a test but the __build__ is nowhere to be found, since it wasn't built in the first place.
1 parent 6484fc4 commit c8be7af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ function(create_libc_unittest fq_target_name)
321321
${fq_target_name}
322322
COMMAND ${LIBC_UNITTEST_ENV} ${CMAKE_CROSSCOMPILING_EMULATOR} ${fq_build_target_name}
323323
COMMENT "Running unit test ${fq_target_name}"
324+
DEPENDS ${fq_build_target_name}
324325
)
325326
endif()
326327

0 commit comments

Comments
 (0)