Skip to content

Commit

Permalink
add gtest suites as single test in ctest
Browse files Browse the repository at this point in the history
  • Loading branch information
zerotacg committed Jun 11, 2024
1 parent 1a3c3ae commit 1a30edd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ ENDIF()

IF(WITH_NEL_TESTS)
ENABLE_TESTING()
ADD_TEST(nel_unit_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/nel_unit_test --html)
ADD_TEST(NAME nel_unit_test COMMAND nel_unit_test)
IF(BUILD_DASHBOARD)
INCLUDE(Dart)
SET(SVNCOMMAND svn)
Expand Down
11 changes: 6 additions & 5 deletions nelns/naming_service/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ target_link_libraries("${TEST_NAME}"
GTest::gmock
nelns::ns
)
gtest_discover_tests("${TEST_NAME}"
EXTRA_ARGS "--gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/reports/junit-${TEST_NAME}.xml"
add_test(
NAME "${TEST_NAME}"
COMMAND "${TEST_NAME}" "--gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/reports/junit-${TEST_NAME}.xml"
)


Expand All @@ -23,7 +24,7 @@ target_link_libraries("${TEST_NAME}"
GTest::gmock
nelns::ns
)
gtest_discover_tests("${TEST_NAME}"
EXTRA_ARGS "--gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/reports/junit-${TEST_NAME}.xml"
add_test(
NAME "${TEST_NAME}"
COMMAND "${TEST_NAME}" "--gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/reports/junit-${TEST_NAME}.xml"
)

0 comments on commit 1a30edd

Please sign in to comment.