aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-04-01 14:15:39 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-04-01 14:15:39 +0200
commit8493897dd48254f2bb40d5fdfe80d6031f891ce1 (patch)
tree794164306628f15d1d7a1ae0612215c366affaa8 /tests/CMakeLists.txt
parentf1f745daecd0912e17f30626309d412ad23cf47e (diff)
parentbe6251cb3234b292cbc3bb9b661d6a0777115f17 (diff)
downloadayatana-indicator-datetime-8493897dd48254f2bb40d5fdfe80d6031f891ce1.tar.gz
ayatana-indicator-datetime-8493897dd48254f2bb40d5fdfe80d6031f891ce1.tar.bz2
ayatana-indicator-datetime-8493897dd48254f2bb40d5fdfe80d6031f891ce1.zip
Merge branch 'tari01-pr/mkcal-backend'
Attributes GH PR #135: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/135
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt51
1 files changed, 34 insertions, 17 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 13dd0d8..4aaee45 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -77,23 +77,40 @@ target_link_libraries (${TEST_NAME} indicatordatetimeservice ${SERVICE_DEPS_LIBR
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)
- target_link_options(${TEST_NAME} PRIVATE -no-pie)
- target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES})
- add_test (${TEST_NAME}
- ${CMAKE_CURRENT_SOURCE_DIR}/run-eds-ics-test.sh
- ${DBUS_RUNNER} # arg1: dbus-test-runner exec
- ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} # arg2: test executable path
- ${TEST_NAME} # arg3: test name
- ${CMAKE_CURRENT_SOURCE_DIR}/test-eds-ics-config-files # arg4: base directory for config file template
- ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.ics # arg5: the ical file for this test
- ${CMAKE_CURRENT_SOURCE_DIR}/accounts.db) # arg6: online accounts database
-endfunction()
+if (ENABLE_LOMIRI_FEATURES)
+ function(add_eds_ics_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)
+ target_link_options(${TEST_NAME} PRIVATE -no-pie)
+ target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES})
+ add_test (${TEST_NAME}
+ ${CMAKE_CURRENT_SOURCE_DIR}/run-mkcal-db-test.sh
+ ${DBUS_RUNNER} # arg1: dbus-test-runner exec
+ ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} # arg2: test executable path
+ ${TEST_NAME} # arg3: test name
+ ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_NAME}.db # arg4: the database file for this test
+ ${CMAKE_CURRENT_SOURCE_DIR}/accounts.db) # arg5: online accounts database
+ endfunction()
+else ()
+ 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)
+ target_link_options(${TEST_NAME} PRIVATE -no-pie)
+ target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES})
+ add_test (${TEST_NAME}
+ ${CMAKE_CURRENT_SOURCE_DIR}/run-eds-ics-test.sh
+ ${DBUS_RUNNER} # arg1: dbus-test-runner exec
+ ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} # arg2: test executable path
+ ${TEST_NAME} # arg3: test name
+ ${CMAKE_CURRENT_SOURCE_DIR}/test-eds-ics-config-files # arg4: base directory for config file template
+ ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.ics # arg5: the ical file for this test
+ ${CMAKE_CURRENT_SOURCE_DIR}/accounts.db) # arg6: online accounts database
+ endfunction()
+endif ()
add_eds_ics_test_by_name(test-eds-ics-all-day-events)
add_eds_ics_test_by_name(test-eds-ics-repeating-events)
add_eds_ics_test_by_name(test-eds-ics-nonrepeating-events)