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 | |
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.
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | debian/control | 3 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 29 | ||||
-rw-r--r-- | tests/integration/CMakeLists.txt | 4 |
4 files changed, 11 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a9d5a70..7d2624c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,10 +78,5 @@ add_subdirectory(data) add_subdirectory(src) enable_testing() - -set (GTEST_SOURCE_DIR /usr/src/gtest/src) -set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..) -set (GTEST_LIBS -lpthread) - add_subdirectory(tests) diff --git a/debian/control b/debian/control index dcae9f2..89914fd 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9.0), dh-translations, gir1.2-accountsservice-1.0, gnome-common, - google-mock (>= 1.6.0+svn437), + googletest | google-mock (>= 1.6.0+svn437), gsettings-ubuntu-schemas, autotools-dev, valac (>= 0.20), @@ -19,7 +19,6 @@ Build-Depends: debhelper (>= 9.0), libdbustest1-dev (>= 15.04.0), libgirepository1.0-dev, libglib2.0-dev (>= 2.32.0), - libgtest-dev, libqtdbusmock1-dev (>= 0.3), libqtdbustest1-dev, libunity-api-dev, 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} |