Merge lp:~renatofilho/mediaplayer-app/mediaplayer-autopilot-plus into lp:mediaplayer-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Michael Zanetti
Approved revision: 53
Merged at revision: 55
Proposed branch: lp:~renatofilho/mediaplayer-app/mediaplayer-autopilot-plus
Merge into: lp:mediaplayer-app
Diff against target: 46 lines (+34/-4)
1 file modified
cmake/autopilot.cmake (+34/-4)
To merge this branch: bzr merge lp:~renatofilho/mediaplayer-app/mediaplayer-autopilot-plus
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+151524@code.launchpad.net

Commit message

Created CMAKE options used by autopilot targed.
 * ENABLE_AUTOPILOT - Enable or Disable autopilot tests
 * AUTOPILOT_RECORD - Enable or Disable autopilot record tests
 * AUTOPILOT_RECORD_PATH - Directory to put recorded tests

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

16 + message(STATUS "Autopilot tests disable: autopilot binary not found")

typo: should be "disabled", with a "d"

53. By Renato Araujo Oliveira Filho

Fixed typo.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

> 16 + message(STATUS "Autopilot tests disable: autopilot binary not
> found")
>
> typo: should be "disabled", with a "d"
Fixed in rev. 53

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/autopilot.cmake'
2--- cmake/autopilot.cmake 2013-02-21 17:35:48 +0000
3+++ cmake/autopilot.cmake 2013-03-05 19:20:26 +0000
4@@ -1,8 +1,38 @@
5 add_custom_target(autopilot)
6
7+option(ENABLE_AUTOPILOT "Enable or Disable autopilot tests" On)
8+option(AUTOPILOT_RECORD "Enable or Disable autopilot record tests" OFF)
9+option(AUTOPILOT_RECORD_PATH "Directory to put recorded tests" OFF)
10+
11+if(ENABLE_AUTOPILOT)
12+ find_program(AUTOPILOT_BIN autopilot)
13+ if(AUTOPILOT_BIN)
14+ message(STATUS "Autopilot tests enabled.")
15+ else()
16+ message(STATUS "Autopilot tests disabled: autopilot binary not found")
17+ endif()
18+endif()
19+
20+if(AUTOPILOT_RECORD OR AUTOPILOT_RECORD_PATH)
21+ find_program(AUTOPILOT_REC_BIN recordmydesktop)
22+ if(AUTOPILOT_REC_BIN)
23+ message(STATUS "Record autopilot enabled")
24+ if(AUTOPILOT_RECORD_PATH)
25+ message(STATUS "Save autopilot tests video in: ${AUTOPILOT_RECORD_PATH}")
26+ set(AUTOPILOT_TESTS_ARGS -r -rd ${AUTOPILOT_RECORD_PATH})
27+ else()
28+ set(AUTOPILOT_TESTS_ARGS -r)
29+ endif()
30+ else()
31+ message(STATUS "recordmydesktop necessary for record autopilot tests not found.")
32+ set(AUTOPILOT_TESTS_ARGS "")
33+ endif()
34+endif()
35+
36 function(declare_autopilot_test ENVIROMENT TEST_NAME WORKING_DIR)
37-
38- add_custom_command(TARGET autopilot
39- COMMAND ${ENVIROMENT} autopilot run ${TEST_NAME}
40- WORKING_DIRECTORY ${WORKING_DIR})
41+ if(AUTOPILOT_BIN)
42+ add_custom_command(TARGET autopilot
43+ COMMAND ${ENVIROMENT} autopilot run ${TEST_NAME} ${AUTOPILOT_TESTS_ARGS}
44+ WORKING_DIRECTORY ${WORKING_DIR})
45+ endif()
46 endfunction()

Subscribers

People subscribed via source and target branches