correct build of gtests in one target with xml output
This commit is contained in:
parent
ede1afcce3
commit
d8c3d4ffb8
@ -50,14 +50,9 @@ test:
|
||||
script:
|
||||
- cd build
|
||||
- make build-test
|
||||
- make build-xml
|
||||
artifacts:
|
||||
reports:
|
||||
junit: build/report.xml
|
||||
paths:
|
||||
- build/
|
||||
- inc/
|
||||
- postinst
|
||||
dependencies:
|
||||
- build
|
||||
|
||||
|
@ -353,12 +353,8 @@ if (TESTS)
|
||||
package_add_test(test1 tests/UnitTest.cpp ${SOURCE})
|
||||
|
||||
add_custom_target(build-test
|
||||
"${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target test1 test
|
||||
DEPENDS ${PROJECT_NAME}
|
||||
COMMENT "Packing ${PROJECT_NAME}")
|
||||
|
||||
add_custom_target(build-xml
|
||||
"bin/test1" --gtest_output="xml:report.xml"
|
||||
"${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target test1
|
||||
COMMAND ctest --force-new-ctest-process --gtest_output="xml:report.xml"
|
||||
DEPENDS ${PROJECT_NAME}
|
||||
COMMENT "Packing ${PROJECT_NAME}")
|
||||
else ()
|
||||
|
Loading…
Reference in New Issue
Block a user