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 | cmake_minimum_required (VERSION 2.6) |
6 | # Create target to discover tests |
7 | |
8 | -option( |
9 | +include(CMakeDependentOption) |
10 | + |
11 | +CMAKE_DEPENDENT_OPTION( |
12 | DISABLE_GTEST_TEST_DISCOVERY |
13 | "If set to ON, disables fancy test autodiscovery and switches back to classic add_test behavior" |
14 | OFF |
15 | -) |
16 | + "NOT MIR_IS_CROSS_COMPILING" |
17 | + ON) |
18 | |
19 | option( |
20 | ENABLE_MEMCHECK_OPTION |
21 | @@ -34,7 +37,7 @@ |
22 | endif(ENABLE_MEMCHECK_OPTION) |
23 | |
24 | function (mir_discover_tests EXECUTABLE) |
25 | - if(BUILD_ANDROID OR DISABLE_GTEST_TEST_DISCOVERY) |
26 | + if(DISABLE_GTEST_TEST_DISCOVERY) |
27 | add_test(${EXECUTABLE} ${VALGRIND_EXECUTABLE} ${VALGRIND_ARGS} "${EXECUTABLE_OUTPUT_PATH}/${EXECUTABLE}") |
28 | |
29 | if (${ARGC} GREATER 1) |
30 | @@ -81,7 +84,7 @@ |
31 | |
32 | function (mir_add_memcheck_test) |
33 | if (ENABLE_MEMCHECK_OPTION) |
34 | - if(BUILD_ANDROID OR DISABLE_GTEST_TEST_DISCOVERY) |
35 | + if(DISABLE_GTEST_TEST_DISCOVERY) |
36 | 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 | else() |
38 | add_custom_target( |
39 | |
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 | ${PROJECT_SOURCE_DIR}/include/client |
45 | ${PROJECT_SOURCE_DIR}/include/test) |
46 | |
47 | -option(MIR_ENABLE_ACCEPTANCE_TESTS "Build & run acceptance tests" ON) |
48 | -option(MIR_ENABLE_INTEGRATION_TESTS "Build & run integration tests" ON) |
49 | -option(MIR_ENABLE_UNIT_TESTS "Build & run unit tests" ON) |
50 | - |
51 | -add_subdirectory(acceptance-tests/) |
52 | -add_subdirectory(integration-tests/) |
53 | - |
54 | -#we check the other tests in their own cmake file |
55 | -if (MIR_ENABLE_UNIT_TESTS) |
56 | +option(MIR_BUILD_ACCEPTANCE_TESTS "Build acceptance tests" ON) |
57 | +option(MIR_BUILD_INTEGRATION_TESTS "Build integration tests" ON) |
58 | +option(MIR_BUILD_UNIT_TESTS "Build unit tests" ON) |
59 | + |
60 | +if (MIR_BUILD_ACCEPTANCE_TESTS) |
61 | + add_subdirectory(acceptance-tests/) |
62 | +endif (MIR_BUILD_ACCEPTANCE_TESTS) |
63 | + |
64 | +if (MIR_BUILD_INTEGRATION_TESTS) |
65 | + add_subdirectory(integration-tests/) |
66 | +endif (MIR_BUILD_INTEGRATION_TESTS) |
67 | + |
68 | +if (MIR_BUILD_UNIT_TESTS) |
69 | add_subdirectory(unit-tests/) |
70 | -endif (MIR_ENABLE_UNIT_TESTS) |
71 | +endif (MIR_BUILD_UNIT_TESTS) |
72 | |
73 | add_subdirectory(mir_test/) |
74 | add_subdirectory(mir_test_framework/) |
75 | |
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 | +include(CMakeDependentOption) |
81 | + |
82 | include_directories( |
83 | ${CMAKE_SOURCE_DIR} |
84 | ${PROTOBUF_INCLUDE_DIRS} |
85 | @@ -65,13 +67,16 @@ |
86 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
87 | ) |
88 | |
89 | -if (MIR_PLATFORM STREQUAL "android") |
90 | - #don't discover the test, we'll run it later on a phone |
91 | -else() |
92 | - if(MIR_ENABLE_ACCEPTANCE_TESTS) |
93 | - mir_discover_tests(mir_acceptance_tests) |
94 | - endif() |
95 | -endif() |
96 | +CMAKE_DEPENDENT_OPTION( |
97 | + MIR_RUN_ACCEPTANCE_TESTS |
98 | + "Run acceptance tests as part of default testing" |
99 | + ON |
100 | + "MIR_BUILD_ACCEPTANCE_TESTS" |
101 | + OFF) |
102 | + |
103 | +if (MIR_RUN_ACCEPTANCE_TESTS) |
104 | + mir_discover_tests(mir_acceptance_tests) |
105 | +endif (MIR_RUN_ACCEPTANCE_TESTS) |
106 | |
107 | install( |
108 | TARGETS mir_acceptance_tests |
109 | |
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 | +include(CMakeDependentOption) |
115 | + |
116 | include_directories(${CMAKE_SOURCE_DIR}) |
117 | |
118 | set( |
119 | @@ -64,13 +66,16 @@ |
120 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
121 | ) |
122 | |
123 | -if (MIR_PLATFORM STREQUAL "android") |
124 | - #don't discover the test, we'll run it later on a phone |
125 | -else() |
126 | - if(MIR_ENABLE_INTEGRATION_TESTS) |
127 | - mir_discover_tests(mir_integration_tests) |
128 | - endif() |
129 | -endif() |
130 | +CMAKE_DEPENDENT_OPTION( |
131 | + MIR_RUN_INTEGRATION_TESTS |
132 | + "Run integration tests as part of default testing" |
133 | + ON |
134 | + "MIR_BUILD_INTEGRATION_TESTS" |
135 | + OFF) |
136 | + |
137 | +if (MIR_RUN_INTEGRATION_TESTS) |
138 | + mir_discover_tests(mir_integration_tests) |
139 | +endif (MIR_RUN_INTEGRATION_TESTS) |
140 | |
141 | install( |
142 | TARGETS mir_integration_tests |
143 | |
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 | +include(CMakeDependentOption) |
149 | + |
150 | add_definitions(-DTEST_RECORDINGS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/input_recordings/") |
151 | |
152 | include_directories(${DRM_INCLUDE_DIRS} ${GBM_INCLUDE_DIRS} ${UMOCKDEV_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}) |
153 | @@ -62,7 +64,16 @@ |
154 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dregister=") |
155 | endif() |
156 | |
157 | -mir_discover_tests(mir_unit_tests LD_PRELOAD=libumockdev-preload.so.0) |
158 | +CMAKE_DEPENDENT_OPTION( |
159 | + MIR_RUN_UNIT_TESTS |
160 | + "Run unit tests as part of default testing" |
161 | + ON |
162 | + "MIR_BUILD_UNIT_TESTS" |
163 | + OFF) |
164 | + |
165 | +if (MIR_RUN_UNIT_TESTS) |
166 | + mir_discover_tests(mir_unit_tests LD_PRELOAD=libumockdev-preload.so.0) |
167 | +endif (MIR_RUN_UNIT_TESTS) |
168 | |
169 | install( |
170 | 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://