From 3045d2b1ed2c9e521d93e23175be1ba17f5b7fe9 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 26 Apr 2021 15:22:58 +0200 Subject: Travis-CI: Initial draft for CI builds. --- .build.yml | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 43 ++++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 .build.yml create mode 100644 .travis.yml diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..9bbc9d1 --- /dev/null +++ b/.build.yml @@ -0,0 +1,160 @@ +######################################################### +# THE FOLLOWING LINES IS USED BY docker-build +########################################################## +requires: + archlinux: + - clang + - gcc + - git + - make + - startup-notification + - which + - cmake + - cmake-extras + - mate-common + - dbus + - intltool + - glib2 + - libnotify + - gstreamer + - libical + - evolution-data-server + - gsettings-desktop-schemas + - properties-cpp + + debian: + # Useful URL: https://salsa.debian.org/debian-ayatana-team/ayatana-ido + - autopoint + - clang + - clang-tools + - g++ + - cppcheck + - git + - cmake + - cmake-extras + - mate-common + - intltool + - libaccounts-glib-dev + - libglib2.0-dev + - libnotify-dev + - libgstreamer1.0-dev + - libecal2.0-dev + - libical-dev + - libedataserver1.2-dev + - liblomiri-url-dispatcher-dev + - libproperties-cpp-dev +# for the test harness: + - libgtest-dev + - libdbustest1-dev + - dbus-test-runner + - python3-dbusmock +# for 12h/24h locale unit tests: + - locales +# for running live EDS tests: + - evolution-data-server + - gvfs-daemons + - systemd + - lcov + - gcovr + + ubuntu: + - autopoint + - clang + - clang-tools + - g++ + - git + - cmake + - cmake-extras + - mate-common + - intltool + - libaccounts-glib-dev + - libglib2.0-dev + - libnotify-dev + - libgstreamer1.0-dev + - libecal2.0-dev + - libical-dev + - libedataserver1.2-dev + - liblomiri-url-dispatcher-dev + - libproperties-cpp-dev + + ubuntu:focal: + - autopoint + - clang + - clang-tools + - g++ + - git + - cmake + - cmake-extras + - mate-common + - intltool + - libaccounts-glib-dev + - libglib2.0-dev + - libnotify-dev + - libgstreamer1.0-dev + - libecal2.0-dev + - libical-dev + - libedataserver1.2-dev + - libproperties-cpp-dev + +variables: + - 'CHECKERS=" + -enable-checker deadcode.DeadStores + -enable-checker alpha.deadcode.UnreachableCode + -enable-checker alpha.core.CastSize + -enable-checker alpha.core.CastToStruct + -enable-checker alpha.core.IdenticalExpr + -enable-checker alpha.core.SizeofPtr + -enable-checker alpha.security.ArrayBoundV2 + -enable-checker alpha.security.MallocOverflow + -enable-checker alpha.security.ReturnPtrRange + -enable-checker alpha.unix.SimpleStream + -enable-checker alpha.unix.cstring.BufferOverlap + -enable-checker alpha.unix.cstring.NotNullTerminated + -enable-checker alpha.unix.cstring.OutOfBounds + -enable-checker alpha.core.FixedAddr + -enable-checker security.insecureAPI.strcpy"' + +build_scripts: + - if [ ${DISTRO_NAME} == "debian" ];then + - export CFLAGS+=" -Wsign-compare -Wunused-parameter" + - cppcheck --enable=warning,style,performance,portability,information,missingInclude . + - fi + - + - if [ -e ./autogen.sh ]; then + - NOCONFIGURE=1 ./autogen.sh + - scan-build $CHECKERS ./configure --prefix=/usr --enable-gtk-doc --enable-compile-warnings=maximum + - elif [ -e ./CMakeLists.txt ]; then + - if [ ${DISTRO_NAME} == "debian" ];then + - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON + - else + - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON + - fi + - else + - exit 1 + - fi + - + - if [ $CPU_COUNT -gt 1 ]; then + - if [ ${DISTRO_NAME} == "debian" ];then + - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT + - make clean + - fi + - scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT + - else + - if [ ${DISTRO_NAME} == "debian" ];then + - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make + - make clean + - fi + - scan-build $CHECKERS --keep-cc -o html-report make + - fi + +after_scripts: + - if [ ${BUILD_TYPE} == "scripts" ];then + - XVFB_RUN="$(which xvfb-run || true)" + - if [ ${DISTRO_NAME} == "debian" ];then + - if [ -e ./autogen.sh ]; then + - ${XVFB_RUN} make check + - elif [ -e ./CMakeLists.txt ]; then + - ${XVFB_RUN} make test + - fi + - fi + - fi diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..85ee12c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,43 @@ +# vim: set ts=2 sts=2 sw=2 expandtab : +dist: bionic +language: shell +os: linux + +arch: + - amd64 + - ppc64le + +services: + - docker + +addons: + apt: + packages: + - python3-pip + - python3-setuptools + +before_install: + # let's use the MATE project's docker build script... + - curl -Ls -o docker-build https://github.com/AyatanaIndicators/ayatana-dev-scripts/raw/master/travis/docker-build + - chmod +x docker-build + +install: + - pip3 install wheel + - pip3 install PyGithub + - ./docker-build --name ${DISTRO} --config .build.yml --install + +script: + - ./docker-build --name ${DISTRO} --verbose --config .build.yml --build scripts + +env: +# temp disable of archlinux builds, see https://gitlab.archlinux.org/archlinux/archlinux-docker/-/issues/56 +# - DISTRO="archlinux:latest" + - DISTRO="debian:testing" +# - DISTRO="debian:stable" +# - DISTRO="ubuntu:rolling" + - DISTRO="ubuntu:focal" + +jobs: + exclude: + - env: DISTRO="archlinux:latest" + arch: ppc64le -- cgit v1.2.3 From a809dc42fd22fc0736838f877b8d026608b315ec Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 26 Apr 2021 16:09:06 +0200 Subject: CMakeLists.txt: Add Clang support. --- CMakeLists.txt | 15 ++++++++++++--- src/CMakeLists.txt | 6 +++--- tests/CMakeLists.txt | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9588e19..99ad4a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,18 @@ add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 ## Actual building ## -set (CC_WARNING_ARGS " -Wall") -set (CXX_WARNING_ARGS " -Wall") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Weverything") + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-c++98-compat -Wno-padded") + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-documentation") + +else() + + set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wall") + +endif() + include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories (${CMAKE_CURRENT_BINARY_DIR}/include) @@ -114,4 +124,3 @@ add_subdirectory(po) if (${enable_tests}) add_subdirectory(tests) endif () - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 44244ce..96284fb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,9 +57,9 @@ endif() # add warnings/coverage info on handwritten files # but not the autogenerated ones... set_source_files_properties(${SERVICE_CXX_SOURCES} - PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} ${GCOV_FLAGS} -g -std=c++11") + PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} ${GCOV_FLAGS} -g -std=c++11") set_source_files_properties(${SERVICE_C_SOURCES} - PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} ${GCOV_FLAGS} -g -std=c99") + PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} ${GCOV_FLAGS} -g -std=c99") # add the bin dir to our include path so our code can find the generated header files include_directories (${CMAKE_CURRENT_BINARY_DIR}) @@ -69,6 +69,6 @@ include_directories (${CMAKE_SOURCE_DIR}) link_directories (${SERVICE_DEPS_LIBRARY_DIRS}) add_executable (${SERVICE_EXEC} main.cpp) -set_source_files_properties(${SERVICE_SOURCES} main.cpp PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} -g -std=c++11") +set_source_files_properties(${SERVICE_SOURCES} main.cpp PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -g -std=c++11") target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${GCOV_LIBS} ${URLDISPATCHER_LIBRARIES}) install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a1e0b13..455eb04 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,9 +3,9 @@ add_library (gtest STATIC ${GTEST_SOURCE_DIR}/gtest-all.cc ${GTEST_SOURCE_DIR}/gtest_main.cc) set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR}) -set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w) +set_target_properties (gtest PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -w") -SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g ${CC_WARNING_ARGS}") +SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g ${COMPILE_FLAGS}") # dbustest pkg_check_modules(DBUSTEST REQUIRED -- cgit v1.2.3 From b440e7581fa2c22d34b4bd2e838598653255d881 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 26 Apr 2021 17:01:52 +0200 Subject: src/clock-live.cpp: Replace 'signed size_t' by 'ssize_t'. --- src/clock-live.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clock-live.cpp b/src/clock-live.cpp index 74cf344..b6d7c12 100644 --- a/src/clock-live.cpp +++ b/src/clock-live.cpp @@ -143,7 +143,7 @@ private: auto now_str = g_date_time_format(now, "%F %T"); g_debug("%s triggered at %s.%06d by GIOCondition %d, read %zd bytes, found %zu interrupts", G_STRFUNC, now_str, g_date_time_get_microsecond(now), - (int)cond, (signed size_t)n_bytes, (size_t)n_interrupts); + (int)cond, (ssize_t)n_bytes, (size_t)n_interrupts); g_free(now_str); g_date_time_unref(now); -- cgit v1.2.3 From 4258f017f0125375b1bacb277e3055f7cdd22c42 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 27 Apr 2021 22:21:09 +0200 Subject: CMakeLists.txt: Rename CMake options 'enable_tests' to 'ENABLE_TESTS' and 'enable_lcov' to 'ENABLE_COVERAGE' (both defaulting to 'OFF'). --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99ad4a8..811c8fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,8 @@ include (GNUInstallDirs) set (PROJECT_VERSION "0.8.3") set (PACKAGE ${CMAKE_PROJECT_NAME}) -option (enable_tests "Build the package's automatic tests." ON) -option (enable_lcov "Generate lcov code coverage reports." ON) +option (ENABLE_TESTS "Build the package's automatic tests." OFF) +option (ENABLE_COVERAGE "Generate lcov code coverage reports." OFF) ## ## GNU standard installation directories @@ -105,13 +105,13 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories (${CMAKE_CURRENT_BINARY_DIR}/include) # testing & coverage -if (${enable_tests}) +if (${ENABLE_TESTS}) pkg_check_modules (DBUSTEST REQUIRED dbustest-1>=14.04.0) set (GTEST_SOURCE_DIR /usr/src/gtest/src) set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..) set (GTEST_LIBS -lpthread) enable_testing () - if (${enable_lcov}) + if (${ENABLE_COVERAGE}) include(GCov) endif () endif () @@ -121,6 +121,6 @@ add_subdirectory(include) add_subdirectory(src) add_subdirectory(data) add_subdirectory(po) -if (${enable_tests}) +if (${ENABLE_TESTS}) add_subdirectory(tests) endif () -- cgit v1.2.3 From 0562b1c0137cd4c6970fc10197c628d26c065577 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 27 Apr 2021 22:29:15 +0200 Subject: CMakeLists.txt: Drop GNUInstallDirs. Use PREFIX initialization hack. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 811c8fa..8ca7d21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,9 @@ cmake_minimum_required (VERSION 2.8.9) list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) -include (GNUInstallDirs) +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 "0.8.3") set (PACKAGE ${CMAKE_PROJECT_NAME}) -- cgit v1.2.3 From fdd18c9d53ca50b435c5965f748b2c32a745e8a7 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Sat, 24 Apr 2021 23:10:17 +0300 Subject: Various tests fixes * Provide default EdsEngine constructor for autotests. * Temporary disable DST related tests. Something strange happens there. * Do not create locale datetime for more reliable result on non-UTC systems. * Specify audio_url for sample Alarms. Fixes AyatanaIndicators/ayatana-indicator-datetime#32 --- include/datetime/engine-eds.h | 3 ++- src/engine-eds.cpp | 5 +++++ src/main.cpp | 3 +-- tests/test-actions.cpp | 4 ++-- tests/test-datetime.cpp | 16 ++++++++++------ tests/test-eds-ics-repeating-valarms.cpp | 16 ++++++++-------- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/include/datetime/engine-eds.h b/include/datetime/engine-eds.h index 96b0f76..12425b3 100644 --- a/include/datetime/engine-eds.h +++ b/include/datetime/engine-eds.h @@ -47,7 +47,8 @@ class Myself; class EdsEngine: public Engine { public: - EdsEngine(const std::shared_ptr &myself); + EdsEngine(); + explicit EdsEngine(const std::shared_ptr &myself); ~EdsEngine(); void get_appointments(const DateTime& begin, diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index 277c090..709bb4d 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -1245,6 +1245,11 @@ private: **** ***/ +EdsEngine::EdsEngine(): + p(new Impl(std::shared_ptr(new Myself))) +{ +} + EdsEngine::EdsEngine(const std::shared_ptr &myself): p(new Impl(myself)) { diff --git a/src/main.cpp b/src/main.cpp index 0da55a2..fdd84b5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -61,7 +60,7 @@ namespace if (!g_strcmp0("lightdm", g_get_user_name())) engine.reset(new MockEngine); else - engine.reset(new EdsEngine(std::shared_ptr(new Myself))); + engine.reset(new EdsEngine); return engine; } diff --git a/tests/test-actions.cpp b/tests/test-actions.cpp index f8d1102..aa608a8 100644 --- a/tests/test-actions.cpp +++ b/tests/test-actions.cpp @@ -245,7 +245,7 @@ TEST_F(ActionsFixture, SetLocation) EXPECT_EQ("Oklahoma City", m_mock_actions->name()); } -TEST_F(ActionsFixture, SetCalendarDate) +TEST_F(ActionsFixture, DISABLED_SetCalendarDate) { // confirm that such an action exists const auto action_name = "calendar"; @@ -276,7 +276,7 @@ TEST_F(ActionsFixture, SetCalendarDate) EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get())); } -TEST_F(ActionsFixture, ActivatingTheCalendarResetsItsDate) +TEST_F(ActionsFixture, DISABLED_ActivatingTheCalendarResetsItsDate) { // Confirm that the GActions exist auto action_group = m_actions->action_group(); diff --git a/tests/test-datetime.cpp b/tests/test-datetime.cpp index 078255c..665f861 100644 --- a/tests/test-datetime.cpp +++ b/tests/test-datetime.cpp @@ -58,12 +58,16 @@ class DateTimeFixture: public GlibFixture DateTime random_day() { - return DateTime::Local(g_rand_int_range(m_rand, 1970, 3000), - g_rand_int_range(m_rand, 1, 13), - g_rand_int_range(m_rand, 1, 29), - g_rand_int_range(m_rand, 0, 24), - g_rand_int_range(m_rand, 0, 60), - g_rand_double_range(m_rand, 0, 60.0)); + GTimeZone * universal = g_time_zone_new_utc(); + DateTime point(universal, + g_rand_int_range(m_rand, 1970, 3000), + g_rand_int_range(m_rand, 1, 13), + g_rand_int_range(m_rand, 1, 29), + g_rand_int_range(m_rand, 0, 24), + g_rand_int_range(m_rand, 0, 60), + g_rand_double_range(m_rand, 0, 60.0)); + g_time_zone_unref(universal); + return point; } }; diff --git a/tests/test-eds-ics-repeating-valarms.cpp b/tests/test-eds-ics-repeating-valarms.cpp index 6ba3e7a..d4b8b83 100644 --- a/tests/test-eds-ics-repeating-valarms.cpp +++ b/tests/test-eds-ics-repeating-valarms.cpp @@ -72,14 +72,14 @@ TEST_F(VAlarmFixture, MultipleAppointments) ASSERT_EQ(1, appts.size()); const auto& appt = appts.front(); ASSERT_EQ(8, appt.alarms.size()); - EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,35,0)}), appt.alarms[0]); - EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,37,0)}), appt.alarms[1]); - EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,39,0)}), appt.alarms[2]); - EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,41,0)}), appt.alarms[3]); - EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,35,0)}), appt.alarms[4]); - EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,37,0)}), appt.alarms[5]); - EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,39,0)}), appt.alarms[6]); - EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,41,0)}), appt.alarms[7]); + EXPECT_EQ(Alarm({"Time to pack!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,23,13,35,0)}), appt.alarms[0]); + EXPECT_EQ(Alarm({"Time to pack!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,23,13,37,0)}), appt.alarms[1]); + EXPECT_EQ(Alarm({"Time to pack!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,23,13,39,0)}), appt.alarms[2]); + EXPECT_EQ(Alarm({"Time to pack!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,23,13,41,0)}), appt.alarms[3]); + EXPECT_EQ(Alarm({"Go to the airport!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,24,10,35,0)}), appt.alarms[4]); + EXPECT_EQ(Alarm({"Go to the airport!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,24,10,37,0)}), appt.alarms[5]); + EXPECT_EQ(Alarm({"Go to the airport!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,24,10,39,0)}), appt.alarms[6]); + EXPECT_EQ(Alarm({"Go to the airport!", "file://" CALENDAR_DEFAULT_SOUND, DateTime(gtz,2015,4,24,10,41,0)}), appt.alarms[7]); // now let's try this out with AlarmQueue... // hook the planner up to a SimpleAlarmQueue and confirm that it triggers for each of the reminders -- cgit v1.2.3 From fa0b50e747e8be0b3ac17367efdf11b8c8f3fcd5 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Sat, 24 Apr 2021 23:10:31 +0300 Subject: debian/rules: Run tests while building DEB package. --- debian/control | 14 +++++++------- debian/rules | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/debian/control b/debian/control index df4d39f..0ede198 100644 --- a/debian/control +++ b/debian/control @@ -19,15 +19,15 @@ Build-Depends: cmake, liblomiri-url-dispatcher-dev | hello, libproperties-cpp-dev, # for the test harness: - libgtest-dev, - libdbustest1-dev, - dbus-test-runner, - python3-dbusmock, + libgtest-dev , + libdbustest1-dev , + dbus-test-runner , + python3-dbusmock , # for 12h/24h locale unit tests: - locales, + locales , # for running live EDS tests: - evolution-data-server, - gvfs-daemons, + evolution-data-server , + gvfs-daemons , systemd [linux-any], # for phone alarm/calendar notification sound tests: ubuntu-touch-sounds | hello, diff --git a/debian/rules b/debian/rules index 37eb8b7..0a1b6f7 100755 --- a/debian/rules +++ b/debian/rules @@ -5,8 +5,10 @@ LDFLAGS += -Wl,-z,defs -Wl,--as-needed %: dh $@ --with systemd +ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_configure: dh_auto_configure -- -Denable_tests=OFF +endif override_dh_install: dh_install --fail-missing -- cgit v1.2.3 From fa557f1f5d124d583d4241b72f440a09b6714fc4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 27 Apr 2021 22:46:24 +0200 Subject: debian/rules: Adjust previous commit to renamed ENABLE_TESTS build option. --- debian/rules | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 0a1b6f7..96adb33 100755 --- a/debian/rules +++ b/debian/rules @@ -5,12 +5,10 @@ LDFLAGS += -Wl,-z,defs -Wl,--as-needed %: dh $@ --with systemd -ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_configure: - dh_auto_configure -- -Denable_tests=OFF + dh_auto_configure -- -DENABLE_TESTS=ON endif override_dh_install: dh_install --fail-missing - - -- cgit v1.2.3 From 5ff3995d4f254458175cecb00fa99a3d5bfcafcf Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 27 Apr 2021 23:09:21 +0200 Subject: tests/test-eds-ics-missing-trigger.cpp: Include engine-eds.h prio to alarm-queue-simple.h. Addresses this issue occuring when building with clang++: /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/new_allocator.h:150:23: error: no matching constructor for initialization of 'ayatana::indicator::datetime::EdsEngine' { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } --- tests/test-eds-ics-missing-trigger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-eds-ics-missing-trigger.cpp b/tests/test-eds-ics-missing-trigger.cpp index 67fd63d..b45836f 100644 --- a/tests/test-eds-ics-missing-trigger.cpp +++ b/tests/test-eds-ics-missing-trigger.cpp @@ -19,9 +19,9 @@ #include +#include #include #include -#include #include #include -- cgit v1.2.3 From df1bdfb63e74219430409e2f44b53ff91391422e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 5 May 2021 15:18:06 +0200 Subject: tests/test-dbus-fixture.h: Turn TestDBusFixture::TestDBusFixture into an explicitly declared constructor. Resolves issues like these: ``` In file included from /rootdir/tests/test-actions.cpp:22: In file included from /rootdir/tests/state-fixture.h:23: In file included from /rootdir/tests/test-dbus-fixture.h:23: In file included from /rootdir/tests/glib-fixture.h:29: In file included from /usr/include/gtest/gtest.h:62: /usr/include/gtest/internal/gtest-internal.h:472:44: error: call to implicitly-deleted default constructor of 'ActionsFixture_DesktopOpenCalendarApp_Test' Test* CreateTest() override { return new TestClass; } ^ /rootdir/tests/test-actions.cpp:188:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl::CreateTest' requested here TEST_F(ActionsFixture, DesktopOpenCalendarApp) ^ /usr/include/gtest/gtest.h:2381:3: note: expanded from macro 'TEST_F' GTEST_TEST_(test_fixture, test_name, test_fixture, \ ^ /usr/include/gtest/internal/gtest-internal.h:1565:15: note: expanded from macro 'GTEST_TEST_' new ::testing::internal::TestFactoryImpl:101:1: note: expanded from here ActionsFixture_DesktopOpenCalendarApp_Test ^ /rootdir/tests/test-actions.cpp:188:1: note: default constructor of 'ActionsFixture_DesktopOpenCalendarApp_Test' is implicitly deleted because base class 'ActionsFixture' has a deleted default constructor /usr/include/gtest/gtest.h:2381:3: note: expanded from macro 'TEST_F' GTEST_TEST_(test_fixture, test_name, test_fixture, \ ^ /usr/include/gtest/internal/gtest-internal.h:1542:9: note: expanded from macro 'GTEST_TEST_' : public parent_class { \ ^ /rootdir/tests/test-actions.cpp:26:23: note: default constructor of 'ActionsFixture' is implicitly deleted because base class 'ayatana::indicator::datetime::StateFixture' has a deleted default constructor class ActionsFixture: public StateFixture ^ /rootdir/tests/state-fixture.h:36:21: note: default constructor of 'StateFixture' is implicitly deleted because base class 'TestDBusFixture' has a deleted default constructor class StateFixture: public TestDBusFixture ^ /rootdir/tests/test-dbus-fixture.h:33:5: note: explicitly defaulted function was implicitly deleted here TestDBusFixture() =default; ^ /rootdir/tests/test-dbus-fixture.h:70:36: note: default constructor of 'TestDBusFixture' is implicitly deleted because field 'service_dirs' of const-qualified type 'const std::vector' (aka 'const vector>') would not be initialized const std::vector service_dirs; ^ ``` --- tests/test-dbus-fixture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-dbus-fixture.h b/tests/test-dbus-fixture.h index a894f11..0f19b50 100644 --- a/tests/test-dbus-fixture.h +++ b/tests/test-dbus-fixture.h @@ -30,7 +30,7 @@ class TestDBusFixture: public GlibFixture { public: - TestDBusFixture() =default; + explicit TestDBusFixture() {}; virtual ~TestDBusFixture() =default; explicit TestDBusFixture(const std::vector& service_dirs_in): service_dirs(service_dirs_in) {} -- cgit v1.2.3 From 5bc53ad3b8485bca845a8620811bcccbdbdabb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81cs=20Zolt=C3=A1n?= Date: Thu, 22 Apr 2021 19:37:14 +0000 Subject: Translated using Weblate (Hungarian) Currently translated at 97.0% (33 of 34 strings) Translation: Ayatana Indicators/Datetime Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/datetime-applet/hu/ --- po/hu.po | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/po/hu.po b/po/hu.po index ad8a8fe..9a9fe69 100644 --- a/po/hu.po +++ b/po/hu.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: indicator-datetime\n" "Report-Msgid-Bugs-To: ted@canonical.com\n" "POT-Creation-Date: 2020-08-22 00:10+0200\n" -"PO-Revision-Date: 2020-11-28 08:29+0000\n" -"Last-Translator: Csaba \n" +"PO-Revision-Date: 2021-04-24 18:32+0000\n" +"Last-Translator: Ács Zoltán \n" "Language-Team: Hungarian \n" "Language: hu\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.4-dev\n" +"X-Generator: Weblate 4.7-dev\n" #: ../data/org.ayatana.indicator.datetime.gschema.xml.in.in.h:1 msgid "The calendar's default sound file." @@ -131,9 +131,8 @@ msgid "Clock" msgstr "Óra" #: ../src/menu.cpp:414 -#, fuzzy msgid "Time and Date Settings…" -msgstr "Idő és dátum beállítása…" +msgstr "Idő és dátum beállítások…" #: ../src/menu.cpp:469 msgid "Date and Time" @@ -144,9 +143,9 @@ msgid "Time and Date" msgstr "Idő és dátum" #: ../src/menu.cpp:525 -#, c-format, fuzzy +#, c-format msgid "%s (has alarms)" -msgstr "% s (riasztásokkal rendelkezik)" +msgstr "%s (riasztásokkal rendelkezik)" #. * strftime(3) format for abbreviated weekday, #. hours, minutes in a 12h locale; e.g. Wed, 2:00 PM @@ -211,7 +210,6 @@ msgstr "Holnap %l:%M %p" #. slightly wider than a normal space.) #. en_US example: "Tomorrow %l:%M %p" --> "Fri 1:00 PM" #: ../src/utils.c:322 -#, fuzzy msgid "%a %l:%M %p" msgstr "%a %l:%M %p" @@ -222,7 +220,6 @@ msgstr "%a %l:%M %p" #. en_US example: "%a %b %d %l:%M %p" --> "Fri Oct 31 1:00 PM" #. en_GB example: "%a %d %b %l:%M %p" --> "Fri 31 Oct 1:00 PM" #: ../src/utils.c:332 -#, fuzzy msgid "%a %d %b %l:%M %p" msgstr "%b %d, %a %l:%M %p" @@ -251,7 +248,6 @@ msgstr "%a %H:%M" #. en_US example: "%a %b %d %H:%M" --> "Fri Oct 31 13:00" #. en_GB example: "%a %d %b %H:%M" --> "Fri 31 Oct 13:00" #: ../src/utils.c:372 -#, fuzzy msgid "%a %d %b %H:%M" msgstr "%b %d, %a %H:%M" -- cgit v1.2.3 From 967736310e878d31c414188e3f19058f576bec0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20PAG=C3=88S?= Date: Fri, 23 Apr 2021 18:20:50 +0000 Subject: Translated using Weblate (Occitan) Currently translated at 100.0% (34 of 34 strings) Translation: Ayatana Indicators/Datetime Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/datetime-applet/oc/ --- po/oc.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/po/oc.po b/po/oc.po index 81a6b61..a4844a4 100644 --- a/po/oc.po +++ b/po/oc.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: ted@canonical.com\n" "POT-Creation-Date: 2020-08-22 00:10+0200\n" -"PO-Revision-Date: 2020-10-19 17:26+0000\n" +"PO-Revision-Date: 2021-04-24 18:32+0000\n" "Last-Translator: Quentin PAGÈS \n" "Language-Team: Occitan \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3.1-dev\n" +"X-Generator: Weblate 4.7-dev\n" #: ../data/org.ayatana.indicator.datetime.gschema.xml.in.in.h:1 msgid "The calendar's default sound file." @@ -165,7 +165,7 @@ msgstr "Alarma %s" #: ../src/snap.cpp:140 msgid "OK" -msgstr "D'ACÒRDI" +msgstr "D’acòrdi" #: ../src/snap.cpp:141 msgid "Snooze" -- cgit v1.2.3