~mir-team/qtmir/trunk

« back to all changes in this revision

Viewing changes to tests/modules/SharedWakelock/CMakeLists.txt

  • Committer: CI Train Bot
  • Author(s): Gerry Boland
  • Date: 2015-01-15 15:19:36 UTC
  • mfrom: (296.2.23 acquire-wakelock)
  • Revision ID: ci-train-bot@canonical.com-20150115151936-rrimwny1nz09h55l
Add Wakelock support - ensures device drops to deep-sleep mode only when all AppMan suspend tasks have completed

Implemented like so:
 - SharedWakelock manages a single wakelock instance, allowing multiple owners to keep the wakelock enabled, only releasing it when all owners have released it.
- Wakelock operates by communicating with PowerD
- the Application class decides whether a wakelock is necessary, based on the process' lifecycle state.
- added a mighty bunch of tests Fixes: #1309915
Approved by: Michael Zanetti, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set(
 
2
  SHARED_WAKELOCK_TEST_SOURCES
 
3
  sharedwakelock_test.cpp
 
4
)
 
5
 
 
6
include_directories(
 
7
  ${CMAKE_SOURCE_DIR}/src/modules
 
8
  ${CMAKE_SOURCE_DIR}/tests/modules/common
 
9
)
 
10
 
 
11
add_executable(sharedwakelock_test ${SHARED_WAKELOCK_TEST_SOURCES})
 
12
 
 
13
target_link_libraries(
 
14
  sharedwakelock_test
 
15
 
 
16
  unityapplicationplugin
 
17
 
 
18
  ${GTEST_BOTH_LIBRARIES}
 
19
  ${GMOCK_LIBRARIES}
 
20
)
 
21
 
 
22
add_test(SharedWakelock, sharedwakelock_test)