Allow following test output live when building with ninja

This commit is contained in:
Martchus 2021-03-05 23:03:59 +01:00
parent cc63c8c250
commit 4fc415ed5a
2 changed files with 12 additions and 4 deletions

View File

@ -495,7 +495,8 @@ if (NOT TARGET check)
check check
COMMAND ${CMAKE_CTEST_COMMAND} COMMAND ${CMAKE_CTEST_COMMAND}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPENDS "${CHECK_TARGET_DEPENDS}") DEPENDS "${CHECK_TARGET_DEPENDS}"
USES_TERMINAL)
endif () endif ()
# enable source code based coverage analysis using clang # enable source code based coverage analysis using clang

View File

@ -254,7 +254,10 @@ if (CLANG_SOURCE_BASED_COVERAGE_AVAILABLE)
endif () endif ()
# add target for the coverage reports # add target for the coverage reports
add_custom_target("${META_TARGET_NAME}_tests_coverage_summary" DEPENDS ${COVERAGE_REPORT_FILES}) add_custom_target(
"${META_TARGET_NAME}_tests_coverage_summary"
DEPENDS ${COVERAGE_REPORT_FILES}
USES_TERMINAL)
# NOTE: Those commands have been added before the release of LLVM 5 where coverage reports with statistics per file # NOTE: Those commands have been added before the release of LLVM 5 where coverage reports with statistics per file
# could not be generated. # could not be generated.
@ -272,7 +275,10 @@ if (CLANG_SOURCE_BASED_COVERAGE_AVAILABLE)
COMMAND awk -f "${OVERALL_COVERAGE_AKW_SCRIPT}" "${COVERAGE_REPORT_FILE}" > "${COVERAGE_OVERALL_REPORT_FILE}" COMMAND awk -f "${OVERALL_COVERAGE_AKW_SCRIPT}" "${COVERAGE_REPORT_FILE}" > "${COVERAGE_OVERALL_REPORT_FILE}"
COMMENT "Generating coverage report (overall figures)" COMMENT "Generating coverage report (overall figures)"
DEPENDS "${OVERALL_COVERAGE_AKW_SCRIPT}" "${COVERAGE_REPORT_FILE}") DEPENDS "${OVERALL_COVERAGE_AKW_SCRIPT}" "${COVERAGE_REPORT_FILE}")
add_custom_target("${META_TARGET_NAME}_tests_coverage_overall_summary" DEPENDS "${COVERAGE_OVERALL_REPORT_FILE}") add_custom_target(
"${META_TARGET_NAME}_tests_coverage_overall_summary"
DEPENDS "${COVERAGE_OVERALL_REPORT_FILE}"
USES_TERMINAL)
# generate HTML document showing covered/uncovered code # generate HTML document showing covered/uncovered code
add_custom_command( add_custom_command(
@ -291,7 +297,8 @@ if (CLANG_SOURCE_BASED_COVERAGE_AVAILABLE)
"${META_TARGET_NAME}_tests_coverage" "${META_TARGET_NAME}_tests_coverage"
DEPENDS ${COVERAGE_REPORT_FILES} DEPENDS ${COVERAGE_REPORT_FILES}
DEPENDS "${COVERAGE_OVERALL_REPORT_FILE}" DEPENDS "${COVERAGE_OVERALL_REPORT_FILE}"
DEPENDS "${COVERAGE_HTML_REPORT_FILE}") DEPENDS "${COVERAGE_HTML_REPORT_FILE}"
USES_TERMINAL)
# add targets to global coverage target # add targets to global coverage target
if (NOT TARGET coverage) if (NOT TARGET coverage)