aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRodney Dawes <rodney.dawes@canonical.com>2017-02-07 16:28:37 -0500
committerRodney Dawes <rodney.dawes@canonical.com>2017-02-07 16:28:37 -0500
commit3e00c2f1483561613850820a674270c5d5154572 (patch)
tree2343c36e1b987ad2039fa90d84d8dc4be887e1ad /tests
parentb61052da17119b8607a4bcb9c8a7559e092873ee (diff)
downloadayatana-indicator-sound-3e00c2f1483561613850820a674270c5d5154572.tar.gz
ayatana-indicator-sound-3e00c2f1483561613850820a674270c5d5154572.tar.bz2
ayatana-indicator-sound-3e00c2f1483561613850820a674270c5d5154572.zip
Use only the gmock module from cmake-extras.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt29
-rw-r--r--tests/integration/CMakeLists.txt4
2 files changed, 10 insertions, 23 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e69c01e..610ed9b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,14 +1,5 @@
-
-###########################
-# Google Test
-###########################
-
-include_directories(${GTEST_INCLUDE_DIR})
-
-add_library (gtest-static STATIC
- ${GTEST_SOURCE_DIR}/gtest-all.cc
- ${GTEST_SOURCE_DIR}/gtest_main.cc)
-target_link_libraries(gtest-static ${GTEST_LIBS})
+find_package(GMock)
+include_directories(${GMOCK_INCLUDE_DIRS})
###########################
# GSettings Schema
@@ -141,7 +132,7 @@ target_link_libraries (pulse-mock ${PULSEAUDIO_LIBRARIES})
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (name-watch-test name-watch-test.cc ${CMAKE_SOURCE_DIR}/src/bus-watch-namespace.c)
-target_link_libraries (name-watch-test gtest-static ${SOUNDSERVICE_LIBRARIES})
+target_link_libraries (name-watch-test ${SOUNDSERVICE_LIBRARIES} ${GMOCK_LIBRARIES})
add_test(name-watch-test name-watch-test)
###########################
@@ -154,9 +145,9 @@ target_link_libraries (
accounts-service-user-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking
@@ -179,8 +170,8 @@ target_link_libraries (
indicator-sound-service-lib
vala-mocks-lib
pulse-mock
- gtest-static
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
add_test(volume-control-test volume-control-test)
@@ -195,9 +186,9 @@ target_link_libraries (
sound-menu-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
add_test(sound-menu-test sound-menu-test)
@@ -213,9 +204,9 @@ target_link_libraries (
indicator-sound-service-lib
vala-mocks-lib
pulse-mock
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
add_test(notifications-test notifications-test)
@@ -230,9 +221,9 @@ target_link_libraries (
media-player-user-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking
@@ -256,9 +247,9 @@ target_link_libraries (
greeter-list-test
indicator-sound-service-lib
vala-mocks-lib
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking
@@ -280,9 +271,9 @@ add_definitions(
add_executable (indicator-test indicator-test.cc gschemas.compiled)
target_link_libraries (
indicator-test
- gtest-static
${SOUNDSERVICE_LIBRARIES}
${TEST_LIBRARIES}
+ ${GMOCK_LIBRARIES}
)
# Split tests to work around libaccountservice sucking
diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt
index 62d6475..e05db4d 100644
--- a/tests/integration/CMakeLists.txt
+++ b/tests/integration/CMakeLists.txt
@@ -1,8 +1,6 @@
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-find_package(GMock)
-
#pkg_check_modules(GMENUHARNESS REQUIRED libgmenuharness REQUIRED)
#include_directories(${GMENUHARNESS_INCLUDE_DIRS})
include_directories("${CMAKE_SOURCE_DIR}/include")
@@ -21,7 +19,6 @@ include_directories(${Qt5DBus_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${GMOCK_INCLUDE_DIRS})
-include_directories(${GTEST_INCLUDE_DIRS})
include_directories("${CMAKE_SOURCE_DIR}/tests/dbus-types")
include_directories("${CMAKE_BINARY_DIR}/tests/dbus-types")
@@ -71,7 +68,6 @@ target_link_libraries(
sound-indicator-dbus-interfaces
${QTDBUSMOCK_LDFLAGS}
${QTDBUSTEST_LDFLAGS}
- ${GTEST_LIBRARIES}
${GMOCK_LIBRARIES}
# ${GMENUHARNESS_LDFLAGS}
${GLIB_LDFLAGS}