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