aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/control11
-rw-r--r--tests/CMakeLists.txt7
2 files changed, 13 insertions, 5 deletions
diff --git a/debian/control b/debian/control
index 4571741..487a244 100644
--- a/debian/control
+++ b/debian/control
@@ -3,15 +3,18 @@ Section: gnome
Priority: optional
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Build-Depends: cmake,
- debhelper (>= 9),
- dh-translations,
- intltool,
libnotify-dev (>= 0.7.6),
- libgtest-dev,
libglib2.0-dev (>= 2.36),
libgudev-1.0-dev,
liburl-dispatcher1-dev,
python:any,
+# for packaging
+ debhelper (>= 9),
+ dh-translations,
+ intltool,
+# for tests
+ libgtest-dev,
+ dbus-test-runner,
Standards-Version: 3.9.2
Homepage: https://launchpad.net/indicator-power
# If you aren't a member of ~indicator-applet-developers but need to upload
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4489bdc..64b8ed8 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -5,6 +5,11 @@ add_library (gtest STATIC
set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR})
set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w)
+# dbustest
+pkg_check_modules(DBUSTEST REQUIRED
+ dbustest-1>=14.04.0)
+include_directories (SYSTEM ${DBUSTEST_INCLUDE_DIRS})
+
# add warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g ${C_WARNING_ARGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-weak-vtables -Wno-global-constructors") # Google Test
@@ -40,7 +45,7 @@ function(add_test_by_name name)
add_executable (${TEST_NAME} ${TEST_NAME}.cc gschemas.compiled)
add_test (${TEST_NAME} ${TEST_NAME})
add_dependencies (${TEST_NAME} libindicatorpowerservice)
- target_link_libraries (${TEST_NAME} indicatorpowerservice gtest ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS})
+ target_link_libraries (${TEST_NAME} indicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS})
endfunction()
add_test_by_name(test-notify)
add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true)