Merge lp:~afrantzis/mir/build-options-for-tests into lp:mir
- build-options-for-tests
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Chris Gagnon |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1334 |
Proposed branch: | lp:~afrantzis/mir/build-options-for-tests |
Merge into: | lp:mir |
Diff against target: |
170 lines (+57/-29) 5 files modified
cmake/MirCommon.cmake (+7/-4) tests/CMakeLists.txt (+14/-10) tests/acceptance-tests/CMakeLists.txt (+12/-7) tests/integration-tests/CMakeLists.txt (+12/-7) tests/unit-tests/CMakeLists.txt (+12/-1) |
To merge this branch: | bzr merge lp:~afrantzis/mir/build-options-for-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Chris Gagnon (community) | Approve | ||
Daniel van Vugt | Approve | ||
Alan Griffiths | Approve | ||
Review via email: mp+197051@code.launchpad.net |
This proposal supersedes a proposal from 2013-11-28.
Commit message
build: Expose options to allow building but not running tests by default
Description of the change
build: Expose options to allow building but not running tests by default
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1264
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Daniel van Vugt (vanvugt) wrote : | # |
Seems OK but I suggest there's no need for options: MIR_BUILD_*_TESTS
We only really need options for MIR_RUN_*_TESTS.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
Alexandros Frantzis (afrantzis) wrote : | # |
Note: this MP affects CMake options used by the CI scripts, so we need to coordinate with CI before landing this.
Daniel van Vugt (vanvugt) wrote : | # |
We've been trying to land it for days, so please do coordinate :)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1265
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Chris Gagnon (chris.gagnon) wrote : | # |
Build hooks have been added to the armhf builders approve for landing
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'cmake/MirCommon.cmake' | |||
2 | --- cmake/MirCommon.cmake 2014-01-10 03:59:43 +0000 | |||
3 | +++ cmake/MirCommon.cmake 2014-01-13 17:30:43 +0000 | |||
4 | @@ -1,11 +1,14 @@ | |||
5 | 1 | cmake_minimum_required (VERSION 2.6) | 1 | cmake_minimum_required (VERSION 2.6) |
6 | 2 | # Create target to discover tests | 2 | # Create target to discover tests |
7 | 3 | 3 | ||
9 | 4 | option( | 4 | include(CMakeDependentOption) |
10 | 5 | |||
11 | 6 | CMAKE_DEPENDENT_OPTION( | ||
12 | 5 | DISABLE_GTEST_TEST_DISCOVERY | 7 | DISABLE_GTEST_TEST_DISCOVERY |
13 | 6 | "If set to ON, disables fancy test autodiscovery and switches back to classic add_test behavior" | 8 | "If set to ON, disables fancy test autodiscovery and switches back to classic add_test behavior" |
14 | 7 | OFF | 9 | OFF |
16 | 8 | ) | 10 | "NOT MIR_IS_CROSS_COMPILING" |
17 | 11 | ON) | ||
18 | 9 | 12 | ||
19 | 10 | option( | 13 | option( |
20 | 11 | ENABLE_MEMCHECK_OPTION | 14 | ENABLE_MEMCHECK_OPTION |
21 | @@ -34,7 +37,7 @@ | |||
22 | 34 | endif(ENABLE_MEMCHECK_OPTION) | 37 | endif(ENABLE_MEMCHECK_OPTION) |
23 | 35 | 38 | ||
24 | 36 | function (mir_discover_tests EXECUTABLE) | 39 | function (mir_discover_tests EXECUTABLE) |
26 | 37 | if(BUILD_ANDROID OR DISABLE_GTEST_TEST_DISCOVERY) | 40 | if(DISABLE_GTEST_TEST_DISCOVERY) |
27 | 38 | add_test(${EXECUTABLE} ${VALGRIND_EXECUTABLE} ${VALGRIND_ARGS} "${EXECUTABLE_OUTPUT_PATH}/${EXECUTABLE}") | 41 | add_test(${EXECUTABLE} ${VALGRIND_EXECUTABLE} ${VALGRIND_ARGS} "${EXECUTABLE_OUTPUT_PATH}/${EXECUTABLE}") |
28 | 39 | 42 | ||
29 | 40 | if (${ARGC} GREATER 1) | 43 | if (${ARGC} GREATER 1) |
30 | @@ -81,7 +84,7 @@ | |||
31 | 81 | 84 | ||
32 | 82 | function (mir_add_memcheck_test) | 85 | function (mir_add_memcheck_test) |
33 | 83 | if (ENABLE_MEMCHECK_OPTION) | 86 | if (ENABLE_MEMCHECK_OPTION) |
35 | 84 | if(BUILD_ANDROID OR DISABLE_GTEST_TEST_DISCOVERY) | 87 | if(DISABLE_GTEST_TEST_DISCOVERY) |
36 | 85 | ADD_TEST("memcheck-test" "sh" "-c" "${VALGRIND_EXECUTABLE} ${VALGRIND_ARGS} ${CMAKE_BINARY_DIR}/mir_gtest/mir_test_memory_error; if [ $? != 0 ]; then exit 0; else exit 1; fi") | 88 | ADD_TEST("memcheck-test" "sh" "-c" "${VALGRIND_EXECUTABLE} ${VALGRIND_ARGS} ${CMAKE_BINARY_DIR}/mir_gtest/mir_test_memory_error; if [ $? != 0 ]; then exit 0; else exit 1; fi") |
37 | 86 | else() | 89 | else() |
38 | 87 | add_custom_target( | 90 | add_custom_target( |
39 | 88 | 91 | ||
40 | === modified file 'tests/CMakeLists.txt' | |||
41 | --- tests/CMakeLists.txt 2014-01-13 11:36:15 +0000 | |||
42 | +++ tests/CMakeLists.txt 2014-01-13 17:30:43 +0000 | |||
43 | @@ -23,17 +23,21 @@ | |||
44 | 23 | ${PROJECT_SOURCE_DIR}/include/client | 23 | ${PROJECT_SOURCE_DIR}/include/client |
45 | 24 | ${PROJECT_SOURCE_DIR}/include/test) | 24 | ${PROJECT_SOURCE_DIR}/include/test) |
46 | 25 | 25 | ||
56 | 26 | option(MIR_ENABLE_ACCEPTANCE_TESTS "Build & run acceptance tests" ON) | 26 | option(MIR_BUILD_ACCEPTANCE_TESTS "Build acceptance tests" ON) |
57 | 27 | option(MIR_ENABLE_INTEGRATION_TESTS "Build & run integration tests" ON) | 27 | option(MIR_BUILD_INTEGRATION_TESTS "Build integration tests" ON) |
58 | 28 | option(MIR_ENABLE_UNIT_TESTS "Build & run unit tests" ON) | 28 | option(MIR_BUILD_UNIT_TESTS "Build unit tests" ON) |
59 | 29 | 29 | ||
60 | 30 | add_subdirectory(acceptance-tests/) | 30 | if (MIR_BUILD_ACCEPTANCE_TESTS) |
61 | 31 | add_subdirectory(integration-tests/) | 31 | add_subdirectory(acceptance-tests/) |
62 | 32 | 32 | endif (MIR_BUILD_ACCEPTANCE_TESTS) | |
63 | 33 | #we check the other tests in their own cmake file | 33 | |
64 | 34 | if (MIR_ENABLE_UNIT_TESTS) | 34 | if (MIR_BUILD_INTEGRATION_TESTS) |
65 | 35 | add_subdirectory(integration-tests/) | ||
66 | 36 | endif (MIR_BUILD_INTEGRATION_TESTS) | ||
67 | 37 | |||
68 | 38 | if (MIR_BUILD_UNIT_TESTS) | ||
69 | 35 | add_subdirectory(unit-tests/) | 39 | add_subdirectory(unit-tests/) |
71 | 36 | endif (MIR_ENABLE_UNIT_TESTS) | 40 | endif (MIR_BUILD_UNIT_TESTS) |
72 | 37 | 41 | ||
73 | 38 | add_subdirectory(mir_test/) | 42 | add_subdirectory(mir_test/) |
74 | 39 | add_subdirectory(mir_test_framework/) | 43 | add_subdirectory(mir_test_framework/) |
75 | 40 | 44 | ||
76 | === modified file 'tests/acceptance-tests/CMakeLists.txt' | |||
77 | --- tests/acceptance-tests/CMakeLists.txt 2014-01-13 11:36:15 +0000 | |||
78 | +++ tests/acceptance-tests/CMakeLists.txt 2014-01-13 17:30:43 +0000 | |||
79 | @@ -1,3 +1,5 @@ | |||
80 | 1 | include(CMakeDependentOption) | ||
81 | 2 | |||
82 | 1 | include_directories( | 3 | include_directories( |
83 | 2 | ${CMAKE_SOURCE_DIR} | 4 | ${CMAKE_SOURCE_DIR} |
84 | 3 | ${PROTOBUF_INCLUDE_DIRS} | 5 | ${PROTOBUF_INCLUDE_DIRS} |
85 | @@ -65,13 +67,16 @@ | |||
86 | 65 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 67 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
87 | 66 | ) | 68 | ) |
88 | 67 | 69 | ||
96 | 68 | if (MIR_PLATFORM STREQUAL "android") | 70 | CMAKE_DEPENDENT_OPTION( |
97 | 69 | #don't discover the test, we'll run it later on a phone | 71 | MIR_RUN_ACCEPTANCE_TESTS |
98 | 70 | else() | 72 | "Run acceptance tests as part of default testing" |
99 | 71 | if(MIR_ENABLE_ACCEPTANCE_TESTS) | 73 | ON |
100 | 72 | mir_discover_tests(mir_acceptance_tests) | 74 | "MIR_BUILD_ACCEPTANCE_TESTS" |
101 | 73 | endif() | 75 | OFF) |
102 | 74 | endif() | 76 | |
103 | 77 | if (MIR_RUN_ACCEPTANCE_TESTS) | ||
104 | 78 | mir_discover_tests(mir_acceptance_tests) | ||
105 | 79 | endif (MIR_RUN_ACCEPTANCE_TESTS) | ||
106 | 75 | 80 | ||
107 | 76 | install( | 81 | install( |
108 | 77 | TARGETS mir_acceptance_tests | 82 | TARGETS mir_acceptance_tests |
109 | 78 | 83 | ||
110 | === modified file 'tests/integration-tests/CMakeLists.txt' | |||
111 | --- tests/integration-tests/CMakeLists.txt 2014-01-10 03:59:43 +0000 | |||
112 | +++ tests/integration-tests/CMakeLists.txt 2014-01-13 17:30:43 +0000 | |||
113 | @@ -1,3 +1,5 @@ | |||
114 | 1 | include(CMakeDependentOption) | ||
115 | 2 | |||
116 | 1 | include_directories(${CMAKE_SOURCE_DIR}) | 3 | include_directories(${CMAKE_SOURCE_DIR}) |
117 | 2 | 4 | ||
118 | 3 | set( | 5 | set( |
119 | @@ -64,13 +66,16 @@ | |||
120 | 64 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 66 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
121 | 65 | ) | 67 | ) |
122 | 66 | 68 | ||
130 | 67 | if (MIR_PLATFORM STREQUAL "android") | 69 | CMAKE_DEPENDENT_OPTION( |
131 | 68 | #don't discover the test, we'll run it later on a phone | 70 | MIR_RUN_INTEGRATION_TESTS |
132 | 69 | else() | 71 | "Run integration tests as part of default testing" |
133 | 70 | if(MIR_ENABLE_INTEGRATION_TESTS) | 72 | ON |
134 | 71 | mir_discover_tests(mir_integration_tests) | 73 | "MIR_BUILD_INTEGRATION_TESTS" |
135 | 72 | endif() | 74 | OFF) |
136 | 73 | endif() | 75 | |
137 | 76 | if (MIR_RUN_INTEGRATION_TESTS) | ||
138 | 77 | mir_discover_tests(mir_integration_tests) | ||
139 | 78 | endif (MIR_RUN_INTEGRATION_TESTS) | ||
140 | 74 | 79 | ||
141 | 75 | install( | 80 | install( |
142 | 76 | TARGETS mir_integration_tests | 81 | TARGETS mir_integration_tests |
143 | 77 | 82 | ||
144 | === modified file 'tests/unit-tests/CMakeLists.txt' | |||
145 | --- tests/unit-tests/CMakeLists.txt 2014-01-10 03:59:43 +0000 | |||
146 | +++ tests/unit-tests/CMakeLists.txt 2014-01-13 17:30:43 +0000 | |||
147 | @@ -1,3 +1,5 @@ | |||
148 | 1 | include(CMakeDependentOption) | ||
149 | 2 | |||
150 | 1 | add_definitions(-DTEST_RECORDINGS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/input_recordings/") | 3 | add_definitions(-DTEST_RECORDINGS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/input_recordings/") |
151 | 2 | 4 | ||
152 | 3 | include_directories(${DRM_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS} ${UMOCKDEV_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}) | 5 | include_directories(${DRM_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS} ${UMOCKDEV_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}) |
153 | @@ -62,7 +64,16 @@ | |||
154 | 62 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dregister=") | 64 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dregister=") |
155 | 63 | endif() | 65 | endif() |
156 | 64 | 66 | ||
158 | 65 | mir_discover_tests(mir_unit_tests LD_PRELOAD=libumockdev-preload.so.0) | 67 | CMAKE_DEPENDENT_OPTION( |
159 | 68 | MIR_RUN_UNIT_TESTS | ||
160 | 69 | "Run unit tests as part of default testing" | ||
161 | 70 | ON | ||
162 | 71 | "MIR_BUILD_UNIT_TESTS" | ||
163 | 72 | OFF) | ||
164 | 73 | |||
165 | 74 | if (MIR_RUN_UNIT_TESTS) | ||
166 | 75 | mir_discover_tests(mir_unit_tests LD_PRELOAD=libumockdev-preload.so.0) | ||
167 | 76 | endif (MIR_RUN_UNIT_TESTS) | ||
168 | 66 | 77 | ||
169 | 67 | install( | 78 | install( |
170 | 68 | TARGETS mir_unit_tests | 79 | TARGETS mir_unit_tests |
FAILED: Continuous integration, rev:1264 /code.launchpad .net/~afrantzis /mir/build- options- for-tests/ +merge/ 197051/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http:// jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- ci/462/ jenkins. qa.ubuntu. com/job/ mir-android- trusty- i386-build/ 324 jenkins. qa.ubuntu. com/job/ mir-clang- trusty- amd64-build/ 321 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 191 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 191/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 191/console
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- team-mir- development- branch- ci/462/ rebuild
http://