aboutsummaryrefslogtreecommitdiff
path: root/tests/backend-dbus/CMakeLists.txt
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-03-22 16:34:34 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-03-22 16:34:34 -0500
commitae39f7001e5603010afc02de29787ade6d48ef14 (patch)
tree74c303a86603134fc2b86d1c428475a60e455e3f /tests/backend-dbus/CMakeLists.txt
parente4e327f139dd139a91893fc7f19061a37d4b47e9 (diff)
downloadayatana-indicator-session-ae39f7001e5603010afc02de29787ade6d48ef14.tar.gz
ayatana-indicator-session-ae39f7001e5603010afc02de29787ade6d48ef14.tar.bz2
ayatana-indicator-session-ae39f7001e5603010afc02de29787ade6d48ef14.zip
port indicator-session to GMenu/cmake. Code coverage increased from 0% to 95.4%.
Diffstat (limited to 'tests/backend-dbus/CMakeLists.txt')
-rw-r--r--tests/backend-dbus/CMakeLists.txt62
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/backend-dbus/CMakeLists.txt b/tests/backend-dbus/CMakeLists.txt
new file mode 100644
index 0000000..7cd7030
--- /dev/null
+++ b/tests/backend-dbus/CMakeLists.txt
@@ -0,0 +1,62 @@
+# build libgtest
+add_library (gtest STATIC
+ ${GTEST_SOURCE_DIR}/gtest-all.cc
+ ${GTEST_SOURCE_DIR}/gtest_main.cc)
+set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES
+ ${GTEST_INCLUDE_DIR})
+
+# build desktopmock
+add_library (desktopmock STATIC
+ mock-accounts.cc
+ mock-accounts.h
+ mock-consolekit-manager.cc
+ mock-consolekit-manager.h
+ mock-consolekit-seat.cc
+ mock-consolekit-seat.h
+ mock-consolekit-session.cc
+ mock-consolekit-session.h
+ mock-display-manager-seat.cc
+ mock-display-manager-seat.h
+ mock-end-session-dialog.cc
+ mock-end-session-dialog.h
+ mock-object.cc
+ mock-object.h
+ mock-screen-saver.cc
+ mock-screen-saver.h
+ mock-session-manager.cc
+ mock-session-manager.h
+ mock-upower.cc
+ mock-upower.h
+ mock-user.cc
+ mock-user.h
+ mock-webcredentials.cc
+ mock-webcredentials.h)
+
+include_directories (${SERVICE_INCLUDE_DIRS})
+include_directories (${CMAKE_SOURCE_DIR}/src)
+include_directories (${CMAKE_BINARY_DIR}/src)
+include_directories (${CMAKE_SOURCE_DIR}/tests)
+
+# test the Actions class
+add_executable (test-actions
+ test-actions.cc)
+add_test (test-actions test-actions)
+set_tests_properties (test-actions PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}")
+target_link_libraries (test-actions desktopmock backenddbus libindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS})
+
+# test the Guest class
+add_executable (test-guest
+ test-guest.cc)
+add_test (test-guest test-guest)
+set_tests_properties (test-guest PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}")
+target_link_libraries (test-guest desktopmock backenddbus libindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS})
+
+# test the Users class
+add_executable (test-users
+ test-users.cc)
+add_test (test-users test-users)
+set_tests_properties (test-users PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}")
+target_link_libraries (test-users desktopmock backenddbus libindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS})
+
+
+