From 3b90788d37977480049abaec7dc35c6ae0c3ce39 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 9 Sep 2021 02:51:16 +0200 Subject: Link to lomiri-url-dispatcher where needed --- src/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a64a50e..90b2a4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,5 +70,5 @@ link_directories (${SERVICE_DEPS_LIBRARY_DIRS}) add_executable (${SERVICE_EXEC} main.cpp) set_source_files_properties(${SERVICE_SOURCES} main.cpp PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -std=c++11") -target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES}) +target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${URLDISPATCHER_LIBRARIES}) install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e267421..9973a39 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -41,7 +41,7 @@ function(add_test_by_name name) add_executable (${TEST_NAME} ${TEST_NAME}.cpp gschemas.compiled) target_link_options(${TEST_NAME} PRIVATE -no-pie) add_test (${TEST_NAME} ${TEST_NAME}) - target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}) + target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} ${URLDISPATCHER_LIBRARIES}) endfunction() add_test_by_name(test-datetime) if(HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS) @@ -77,7 +77,7 @@ if(HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS) set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME}) add_executable (${TEST_NAME} ${TEST_NAME}.cpp) target_link_options(${TEST_NAME} PRIVATE -no-pie) - target_link_libraries (${TEST_NAME} indicatordatetimeservice ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}) + target_link_libraries (${TEST_NAME} indicatordatetimeservice ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} ${URLDISPATCHER_LIBRARIES}) endif() ## -- cgit v1.2.3 From ca9dbe4b4ea579596ceeaa8a3c5c817c66b1d40a Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 10 Sep 2021 11:42:07 +0200 Subject: tests/test-live-actions: Handle case when the test is run on Lomiri --- tests/test-live-actions.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp index 403aeef..50444fa 100644 --- a/tests/test-live-actions.cpp +++ b/tests/test-live-actions.cpp @@ -113,12 +113,24 @@ TEST_F(TestLiveActionsFixture, SetLocation) TEST_F(TestLiveActionsFixture, DesktopOpenAlarmApp) { std::string sReturn = m_actions->open_alarm_app(); - const std::string expected = "evolution -c calendar"; + std::string expected = "evolution -c calendar"; + + if (ayatana_common_utils_is_lomiri()) + { + expected = "alarm://"; + } + EXPECT_EQ(expected, sReturn); } TEST_F(TestLiveActionsFixture, DesktopOpenAppointment) { + if (ayatana_common_utils_is_lomiri()) + { + // PhoneOpenAppointment will handle this + return; + } + Appointment a; a.uid = "some-uid"; a.begin = DateTime::NowLocal(); @@ -129,6 +141,12 @@ TEST_F(TestLiveActionsFixture, DesktopOpenAppointment) TEST_F(TestLiveActionsFixture, DesktopOpenCalendarApp) { + if (ayatana_common_utils_is_lomiri()) + { + // PhoneOpenCalendarApp will handle this + return; + } + std::string sReturn = m_actions->open_calendar_app(DateTime::NowLocal()); const std::string expected_substr = "evolution \"calendar:///?startdate="; EXPECT_NE(sReturn.find(expected_substr), std::string::npos); @@ -147,6 +165,10 @@ TEST_F(TestLiveActionsFixture, DesktopOpenSettingsApp) { expected_substr = "mate-time-admin"; } + else if (ayatana_common_utils_is_lomiri()) + { + expected_substr = "settings:///system/time-date"; + } EXPECT_EQ(expected_substr, sReturn); } -- cgit v1.2.3