diff options
author | Rodney Dawes <rodney.dawes@canonical.com> | 2017-02-08 04:37:13 +0000 |
---|---|---|
committer | Bileto Bot <ci-train-bot@canonical.com> | 2017-02-08 04:37:13 +0000 |
commit | 396d3bebd994f204f0052f015360009d3bd1493f (patch) | |
tree | 0a6348fbb752519d0c4278113a281c5dd93cb478 /tests | |
parent | 66f3ced68cf9db44d5752c5ffddb534644ddb149 (diff) | |
parent | 3e00c2f1483561613850820a674270c5d5154572 (diff) | |
download | ayatana-indicator-sound-396d3bebd994f204f0052f015360009d3bd1493f.tar.gz ayatana-indicator-sound-396d3bebd994f204f0052f015360009d3bd1493f.tar.bz2 ayatana-indicator-sound-396d3bebd994f204f0052f015360009d3bd1493f.zip |
Use only the gmock module from cmake-extras.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 29 | ||||
-rw-r--r-- | tests/integration/CMakeLists.txt | 4 |
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} |