From 8f3234c2cf7a543c88fcc28caed93521a81f6ffa Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 6 Sep 2023 14:30:00 +0200 Subject: Drop testing/coverage options fixes https://github.com/AyatanaIndicators/ayatana-indicator-notifications/issues/30 --- .build.yml | 2 +- CMakeLists.txt | 29 ++++------------------------- README.md | 6 +++--- debian/rules | 2 -- po/Makevars | 5 ----- 5 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 po/Makevars diff --git a/.build.yml b/.build.yml index 5a84070..524e1fa 100644 --- a/.build.yml +++ b/.build.yml @@ -107,7 +107,7 @@ build_scripts: - - if [ -e ./CMakeLists.txt ]; then - if [ ${DISTRO_NAME} == "debian" ];then - - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON -DENABLE_TESTS=ON + - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON - else - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_WERROR=ON - fi diff --git a/CMakeLists.txt b/CMakeLists.txt index d2024c8..2d5a7ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,21 +1,10 @@ -project(ayatana-indicator-notifications C CXX) -cmake_minimum_required(VERSION 3.13) - -set(PROJECT_VERSION "22.9.0") -set(PACKAGE ${CMAKE_PROJECT_NAME}) +cmake_minimum_required (VERSION 3.13) +project (ayatana-indicator-notifications VERSION 22.9.0 LANGUAGES C CXX) # Options -option(ENABLE_TESTS "Enable all tests and checks" OFF) -option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF) option(ENABLE_WERROR "Treat all build warnings as errors" OFF) - -if(ENABLE_COVERAGE) - set(ENABLE_TESTS ON) - set(CMAKE_BUILD_TYPE "Coverage") -else() - set(CMAKE_BUILD_TYPE "Release") -endif() +set (CMAKE_BUILD_TYPE "Release") if(ENABLE_WERROR) add_definitions("-Werror") @@ -60,7 +49,7 @@ include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS}) ## custom targets ## -set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}) +set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}) add_custom_target (dist COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) @@ -79,17 +68,7 @@ add_subdirectory(src) add_subdirectory(data) add_subdirectory(po) -if (ENABLE_TESTS) - include(CTest) - enable_testing() - - if (ENABLE_COVERAGE) - find_package(CoverageReport) - endif() -endif() - # Display config info message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") -message(STATUS "Unit tests: ${ENABLE_TESTS}") message(STATUS "Build with -Werror: ${ENABLE_WERROR}") diff --git a/README.md b/README.md index 05c5f6e..0981f8b 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,12 @@ keyboard. It also features filtering out notifications from specific applications and provides a do-not-disturb feature (currently only functional on the MATE desktop environment). -## Installation and Unit Tests +## Installation -For instructions on building and running built-in tests, see the INSTALL file. +For instructions on building, see the INSTALL file. ## Author and License The -notifications Ayatana System Indicator has been written by Jason Conti (originally as an Ubuntu System Indicator). This project has been -published under the GPL-3+ license (see COPYING file). \ No newline at end of file +published under the GPL-3+ license (see COPYING file). diff --git a/debian/rules b/debian/rules index f2e11b1..ad8bba5 100755 --- a/debian/rules +++ b/debian/rules @@ -11,8 +11,6 @@ DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk DEB_CMAKE_EXTRA_FLAGS = \ - -DENABLE_TESTS=ON \ - -DENABLE_COVERAGE=OFF \ $(NULL) %: diff --git a/po/Makevars b/po/Makevars deleted file mode 100644 index 18ed957..0000000 --- a/po/Makevars +++ /dev/null @@ -1,5 +0,0 @@ -DOMAIN = $(PACKAGE) -subdir = po -top_builddir = .. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 -EXTRA_LOCALE_CATEGORIES = -- cgit v1.2.3 From 22b759ef52284bab3110848ce80e0cc17b865ec6 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 6 Sep 2023 14:48:42 +0200 Subject: src/main.c: Fix function argument error --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index f57237a..14c032f 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,6 @@ /* * Copyright 2013 Canonical Ltd. + * Copyright 2023 Robert Tari * * Authors: * Charles Kerr @@ -39,7 +40,7 @@ int main (int argc G_GNUC_UNUSED, char ** argv G_GNUC_UNUSED) textdomain (GETTEXT_PACKAGE); /* run */ - service = indicator_notifications_service_new (NULL); + service = indicator_notifications_service_new (); loop = g_main_loop_new (NULL, FALSE); g_signal_connect (service, INDICATOR_NOTIFICATIONS_SERVICE_SIGNAL_NAME_LOST, G_CALLBACK(on_name_lost), loop); g_main_loop_run (loop); -- cgit v1.2.3