diff options
author | Rodney Dawes <rodney.dawes@canonical.com> | 2017-02-02 17:13:07 -0500 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 14:38:27 +0200 |
commit | 6122733b1584e2e80a64ffb04e35c796fe588f6f (patch) | |
tree | 2f52ee26d019bd96ed0945dc03ecaac6f07521ad | |
parent | e4fe97eba0160a4d9b1282732cbaea7f8dfb4c7d (diff) | |
download | ayatana-indicator-datetime-6122733b1584e2e80a64ffb04e35c796fe588f6f.tar.gz ayatana-indicator-datetime-6122733b1584e2e80a64ffb04e35c796fe588f6f.tar.bz2 ayatana-indicator-datetime-6122733b1584e2e80a64ffb04e35c796fe588f6f.zip |
Set the coverage test targeets from where the tests are added.
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1378fe4..bb98d9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,8 +125,8 @@ if (${ENABLE_TESTS}) if (${ENABLE_COVERAGE}) find_package(CoverageReport) ENABLE_COVERAGE_REPORT( - TARGETS indicatordatetimeservice indicator-datetime-service - TESTS test-actions test-alarm-queue test-clock test-datetime test-exporter test-formatter test-live-actions test-locations test-menu-appointments test-menus test-notification test-notification-response test-planner test-settings test-sound test-timezone-timedated test-utils test-eds-ics-all-day-events test-eds-ics-repeating-events test-eds-ics-nonrepeating-events test-eds-ics-repeating-valarms test-eds-ics-missing-trigger test-eds-ics-tzids test-eds-ics-tzids-2 test-eds-ics-tzids-utc test-eds-ics-non-attending-alarms test-eds-ics-repeating-events-with-individual-change manual-test-snap + TARGETS indicatordatetimeservice ayatana-indicator-datetime-service + TESTS ${COVERAGE_TEST_TARGETS} FILTER /usr/include ${CMAKE_BINARY_DIR}/* ) endif () diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4eefbdc..8b80c2e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,6 +37,7 @@ add_definitions (-DG_LOG_DOMAIN="ayatana-indicator-datetime") function(add_test_by_name name) set (TEST_NAME ${name}) + set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME} PARENT_SCOPE) add_executable (${TEST_NAME} ${TEST_NAME}.cpp gschemas.compiled) add_test (${TEST_NAME} ${TEST_NAME}) target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}) @@ -64,6 +65,7 @@ add_test_by_name(test-utils) if(HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS) set (TEST_NAME manual-test-snap) + set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME}) add_executable (${TEST_NAME} ${TEST_NAME}.cpp) target_link_libraries (${TEST_NAME} indicatordatetimeservice ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}) endif() @@ -76,6 +78,7 @@ find_program(DBUS_RUNNER dbus-test-runner) function(add_eds_ics_test_by_name name) set (TEST_NAME ${name}) + set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME} PARENT_SCOPE) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${TEST_NAME}.ics.in" "${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.ics") add_executable(${TEST_NAME} ${TEST_NAME}.cpp gschemas.compiled) @@ -105,9 +108,16 @@ add_eds_ics_test_by_name(test-eds-ics-repeating-events-with-individual-change) # which hasn't landed yet. These can be re-enabled as soon as that lands. #function(add_dbusmock_test_by_name name) # set (TEST_NAME ${name}) +# set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME}) # add_executable (${TEST_NAME} ${TEST_NAME}.cpp gschemas.compiled) # add_test (${TEST_NAME} ${TEST_NAME}) # target_link_libraries (${TEST_NAME} indicatordatetimeservice ${SERVICE_DEPS_LIBRARIES} ${DBUSTEST_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}) #endfunction() #add_dbusmock_test_by_name(test-timezone-geoclue) #add_dbusmock_test_by_name(test-timezones) + +set( + COVERAGE_TEST_TARGETS + ${COVERAGE_TEST_TARGETS} + PARENT_SCOPE +) |