From bae39a93b20e5099a7fea6f7356a422c71fe4bc3 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 10 Jul 2023 02:57:33 +0200 Subject: Fix failing tests fixes https://github.com/AyatanaIndicators/ayatana-indicator-datetime/issues/108 --- CMakeLists.txt | 2 ++ tests/CMakeLists.txt | 3 ++- tests/test-eds-ics-missing-trigger.cpp | 4 ++-- tests/test-eds-ics-non-attending-alarms.cpp | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5190055..8a6dce9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,8 @@ else () -DALARM_DEFAULT_SOUND="dummy" -DCALENDAR_DEFAULT_SOUND="dummy" ) + + set (ALARM_DEFAULT_SOUND "dummy") endif () pkg_check_modules (SERVICE_DEPS REQUIRED ${SERVICE_DEPS}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 81eeb5d..db85e45 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,7 +64,8 @@ add_test_by_name(test-menu-appointments) # add_test_by_name(test-menus) add_test_by_name(test-planner) add_test_by_name(test-settings) -add_test_by_name(test-timezone-timedated) +# This one is fine, but hangs on Travis CI +# add_test_by_name(test-timezone-timedated) add_test_by_name(test-utils) if (ENABLE_LOMIRI_FEATURES) diff --git a/tests/test-eds-ics-missing-trigger.cpp b/tests/test-eds-ics-missing-trigger.cpp index 5d98f81..71a7707 100644 --- a/tests/test-eds-ics-missing-trigger.cpp +++ b/tests/test-eds-ics-missing-trigger.cpp @@ -1,6 +1,6 @@ /* * Copyright 2015 Canonical Ltd. - * Copyright 2021-2022 Robert Tari + * Copyright 2021-2023 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -62,7 +62,7 @@ TEST_F(VAlarmFixture, MissingTriggers) // make a planner that looks at the first half of 2015 in EDS auto planner = std::make_shared(engine, tz); const DateTime range_begin {gtz, 2015,1, 1, 0, 0, 0.0}; - const DateTime range_end {gtz, 2015,7,1,23,59,59.5}; + const DateTime range_end {gtz, 2015,6,30,23,59,59.5}; planner->range().set(std::make_pair(range_begin, range_end)); // give EDS a moment to load diff --git a/tests/test-eds-ics-non-attending-alarms.cpp b/tests/test-eds-ics-non-attending-alarms.cpp index ca1c8ed..629c1fc 100644 --- a/tests/test-eds-ics-non-attending-alarms.cpp +++ b/tests/test-eds-ics-non-attending-alarms.cpp @@ -1,6 +1,6 @@ /* * Copyright 2015 Canonical Ltd. - * Copyright 2021 Robert Tari + * Copyright 2021-2023 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -81,9 +81,10 @@ TEST_F(VAlarmFixture, NonAttendingEvent) // the planner should match what we've got in the calendar.ics file const auto appts = planner->appointments().get(); - EXPECT_EQ(2, appts.size()); + EXPECT_EQ(3, appts.size()); EXPECT_EQ(appts[0].begin, DateTime(gtz, 2016, 4, 4, 16, 0, 0)); - EXPECT_EQ(appts[1].begin, DateTime(gtz, 2016, 4, 6, 16, 0, 0)); + EXPECT_EQ(appts[1].begin, DateTime(gtz, 2016, 4, 5, 16, 0, 0)); + EXPECT_EQ(appts[2].begin, DateTime(gtz, 2016, 4, 6, 16, 0, 0)); // cleanup g_time_zone_unref(gtz); -- cgit v1.2.3 From 069175a5aee84c5c09fbb12ed35494a296fd92bc Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 10 Jul 2023 07:23:21 +0200 Subject: Enable all tests --- .build.yml | 65 ++++++++++++++++++++++++++-------------------------- tests/CMakeLists.txt | 12 ++++------ 2 files changed, 37 insertions(+), 40 deletions(-) diff --git a/.build.yml b/.build.yml index fe8c462..eac5ff1 100644 --- a/.build.yml +++ b/.build.yml @@ -13,9 +13,9 @@ requires: - cmake-extras - dbus - intltool -# - libayatana-common + - libayatana-common - gobject-introspection -# - liblomiri-url-dispatcher +# - lomiri-url-dispatcher - vala - glib2 - libnotify @@ -24,7 +24,7 @@ requires: - evolution-data-server - gsettings-desktop-schemas - properties-cpp -# - ayatana-indicator-messages + - ayatana-indicator-messages - gtk-doc-tools - libaccountsservice # - lomiri-schemas @@ -41,7 +41,8 @@ requires: - cmake-extras - intltool - libaccounts-glib-dev -# - libayatana-common-dev + - libayatana-common-dev + - ayatana-indicator-common - gobject-introspection - libgirepository1.0-dev - liblomiri-url-dispatcher-dev @@ -53,12 +54,12 @@ requires: - libical-dev - libedataserver1.2-dev - libproperties-cpp-dev -# - libmessaging-menu-dev + - libmessaging-menu-dev - gtk-doc-tools - libaccountsservice-dev - liblomiri-url-dispatcher-dev -# - lomiri-schemas -# - lomiri-sounds + - lomiri-schemas + - lomiri-sounds # for the test harness: - libgtest-dev - libdbustest1-dev @@ -83,12 +84,13 @@ requires: - cmake-extras - intltool - libaccounts-glib-dev -# - libayatana-common-dev + - libayatana-common-dev + - ayatana-indicator-common - gobject-introspection - libgirepository1.0-dev - liblomiri-url-dispatcher-dev -# - lomiri-schemas -# - lomiri-sounds + - lomiri-schemas + - lomiri-sounds - valac - libglib2.0-dev - libnotify-dev @@ -97,7 +99,7 @@ requires: - libical-dev - libedataserver1.2-dev - libproperties-cpp-dev -# - libmessaging-menu-dev + - libmessaging-menu-dev - gtk-doc-tools - libaccountsservice-dev # for the test harness: @@ -125,6 +127,7 @@ requires: - intltool - libaccounts-glib-dev # - libayatana-common-dev + - ayatana-indicator-common - gobject-introspection - libgirepository1.0-dev # - liblomiri-url-dispatcher-dev @@ -200,29 +203,27 @@ before_scripts: - cd - - rm -Rf ayatana-indicator-messages-build/ - - - if [ ${DISTRO_NAME} == "debian" ];then - - cd ${START_DIR} - - if [ ! -d lomiri-schemas-build ]; then - - git clone --depth 1 https://gitlab.com/ubports/core/lomiri-schemas.git lomiri-schemas-build - - fi - - cd lomiri-schemas-build - - cmake . -DCMAKE_INSTALL_PREFIX=/usr - - make - - make install - - cd - - - rm -Rf lomiri-schemas-build/ + - cd ${START_DIR} + - if [ ! -d lomiri-schemas-build ]; then + - git clone --depth 1 https://gitlab.com/ubports/core/lomiri-schemas.git lomiri-schemas-build + - fi + - cd lomiri-schemas-build + - cmake . -DCMAKE_INSTALL_PREFIX=/usr + - make + - make install + - cd - + - rm -Rf lomiri-schemas-build/ - - - cd ${START_DIR} - - if [ ! -d lomiri-sounds-build ]; then - - git clone --depth 1 https://gitlab.com/ubports/core/lomiri-sounds.git lomiri-sounds-build - - fi - - cd lomiri-sounds-build - - cmake . -DCMAKE_INSTALL_PREFIX=/usr - - make - - make install - - cd - - - rm -Rf lomiri-sounds-build/ + - cd ${START_DIR} + - if [ ! -d lomiri-sounds-build ]; then + - git clone --depth 1 https://gitlab.com/ubports/core/lomiri-sounds.git lomiri-sounds-build - fi + - cd lomiri-sounds-build + - cmake . -DCMAKE_INSTALL_PREFIX=/usr + - make + - make install + - cd - + - rm -Rf lomiri-sounds-build/ build_scripts: - if [ ${DISTRO_NAME} == "debian" ];then diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index db85e45..a0687f4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -45,8 +45,7 @@ add_test_by_name(test-datetime) if (ENABLE_LOMIRI_FEATURES) add_test_by_name(test-sound) - # This one only succeeds on Lomiri because it needs hfd-service - # add_test_by_name(test-notification) + add_test_by_name(test-notification) add_test_by_name(test-notification-response) endif() @@ -54,18 +53,15 @@ add_test_by_name(test-actions) add_test_by_name(test-alarm-queue) add_test(NAME dear-reader-the-next-test-takes-60-seconds COMMAND true) add_test_by_name(test-clock) -# This one is fine, but hangs on Travis CI -# add_test_by_name(test-exporter) +add_test_by_name(test-exporter) add_test_by_name(test-formatter) add_test_by_name(test-live-actions) add_test_by_name(test-locations) add_test_by_name(test-menu-appointments) -# This one is fine, but hangs on Travis CI -# add_test_by_name(test-menus) +add_test_by_name(test-menus) add_test_by_name(test-planner) add_test_by_name(test-settings) -# This one is fine, but hangs on Travis CI -# add_test_by_name(test-timezone-timedated) +add_test_by_name(test-timezone-timedated) add_test_by_name(test-utils) if (ENABLE_LOMIRI_FEATURES) -- cgit v1.2.3 From 7113c51ba4bba9da6cbbf320e6c04e1844e652e9 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 10 Jul 2023 02:59:15 +0200 Subject: CMakeLists.txt: Minor CMake warning fix --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a6dce9..351810f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -project (ayatana-indicator-datetime C CXX) cmake_minimum_required (VERSION 3.13) +project (ayatana-indicator-datetime VERSION 23.6.0 LANGUAGES C CXX) list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) @@ -7,7 +7,6 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) -set (PROJECT_VERSION "23.6.0") set (PACKAGE ${CMAKE_PROJECT_NAME}) # Options -- cgit v1.2.3