Log CDash build ids from each step of the build process
This can help track down a weird CDash bugs caused by multiple in-flight builds that get canceled and result in bad CDash reporting
This commit is contained in:
parent
ba77f36347
commit
b59913fad3
@ -24,9 +24,16 @@ ctest_build(APPEND
|
|||||||
RETURN_VALUE build_result)
|
RETURN_VALUE build_result)
|
||||||
|
|
||||||
if(NOT DEFINED ENV{GITLAB_CI_EMULATION})
|
if(NOT DEFINED ENV{GITLAB_CI_EMULATION})
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
|
||||||
|
ctest_submit(PARTS Build BUILD_ID build_id)
|
||||||
|
message(STATUS "Build submission build_id: ${build_id}")
|
||||||
|
else()
|
||||||
ctest_submit(PARTS Build)
|
ctest_submit(PARTS Build)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
if (build_result)
|
if (build_result)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"Failed to build")
|
"Failed to build")
|
||||||
|
@ -38,9 +38,16 @@ ctest_configure(APPEND
|
|||||||
|
|
||||||
# We can now submit because we've configured.
|
# We can now submit because we've configured.
|
||||||
if(NOT DEFINED ENV{GITLAB_CI_EMULATION})
|
if(NOT DEFINED ENV{GITLAB_CI_EMULATION})
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
|
||||||
|
ctest_submit(PARTS Update BUILD_ID build_id)
|
||||||
|
message(STATUS "Update submission build_id: ${build_id}")
|
||||||
|
ctest_submit(PARTS Configure BUILD_ID build_id)
|
||||||
|
message(STATUS "Configure submission build_id: ${build_id}")
|
||||||
|
else()
|
||||||
ctest_submit(PARTS Update)
|
ctest_submit(PARTS Update)
|
||||||
ctest_submit(PARTS Configure)
|
ctest_submit(PARTS Configure)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (configure_result)
|
if (configure_result)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
|
@ -48,7 +48,8 @@ ctest_memcheck(
|
|||||||
EXCLUDE "${test_exclusions}"
|
EXCLUDE "${test_exclusions}"
|
||||||
DEFECT_COUNT defects)
|
DEFECT_COUNT defects)
|
||||||
|
|
||||||
ctest_submit(PARTS Memcheck)
|
ctest_submit(PARTS Memcheck BUILD_ID build_id)
|
||||||
|
message(STATUS "Memcheck submission build_id: ${build_id}")
|
||||||
|
|
||||||
if (defects)
|
if (defects)
|
||||||
message(FATAL_ERROR "Found ${defects} memcheck defects")
|
message(FATAL_ERROR "Found ${defects} memcheck defects")
|
||||||
|
@ -35,7 +35,8 @@ ctest_test(APPEND
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(NOT DEFINED ENV{GITLAB_CI_EMULATION})
|
if(NOT DEFINED ENV{GITLAB_CI_EMULATION})
|
||||||
ctest_submit(PARTS Test)
|
ctest_submit(PARTS Test BUILD_ID build_id)
|
||||||
|
message(STATUS "Test submission build_id: ${build_id}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (test_result)
|
if (test_result)
|
||||||
|
Loading…
Reference in New Issue
Block a user