Merge lp:~saviq/ubuntu-settings-components/packaging-cleanup into lp:~registry/ubuntu-settings-components/trunk
- packaging-cleanup
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~saviq/ubuntu-settings-components/packaging-cleanup |
Merge into: | lp:~registry/ubuntu-settings-components/trunk |
Prerequisite: | lp:~aacid/ubuntu-settings-components/standarizeImports |
Diff against target: |
1817 lines (+820/-732) 27 files modified
CMakeLists.txt (+8/-43) SettingsComponents.qmlproject (+0/-23) cmake/modules/EnableCoverageReport.cmake (+0/-166) cmake/modules/FindLcov.cmake (+0/-29) cmake/modules/Findgcovr.cmake (+0/-31) cmake/modules/ParseArguments.cmake (+0/-52) cmake/modules/QmlPlugins.cmake (+0/-150) cmake/modules/QmlTest.cmake (+311/-118) cmake_uninstall.cmake.in (+0/-21) debian/changelog (+6/-0) debian/control (+19/-6) debian/qml-module-ubuntu-system-components.install (+2/-0) debian/tests/control (+4/-0) debian/tests/qmluitests.sh (+5/-0) plugins/Ubuntu/Settings/Components/CMakeLists.txt (+5/-8) plugins/Ubuntu/Settings/Components/Components.qmltypes (+65/-1) plugins/Ubuntu/Settings/Components/serverpropertysynchroniser.cpp (+0/-1) plugins/Ubuntu/Settings/Menus/CMakeLists.txt (+6/-14) plugins/Ubuntu/Settings/Menus/Menus.qmltypes (+66/-1) runtests.sh (+1/-1) tests/CMakeLists.txt (+24/-7) tests/imports/CMakeLists.txt (+5/-0) tests/imports/check_imports.py (+125/-0) tests/qmltests/CMakeLists.txt (+30/-42) tests/utils/modules/CMakeLists.txt (+2/-0) tests/utils/modules/Ubuntu/Test/CMakeLists.txt (+12/-18) tests/utils/modules/Ubuntu/Test/Test.qmltypes (+124/-0) |
To merge this branch: | bzr merge lp:~saviq/ubuntu-settings-components/packaging-cleanup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot (community) | continuous-integration | Needs Fixing | |
Michael Terry (community) | Needs Information | ||
Nick Dedekind (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Review via email: mp+284376@code.launchpad.net |
This proposal has been superseded by a proposal from 2016-06-02.
Commit message
Refactor and clean up packaging/build system and add autopkgtests
a lot of clean ups
using cmake-extras instead of a copy of CMake modules (except for QmlPlugins, bug #1539314)
add an import version checker (UITK hates it when you mix 1.2 and 1.3)
add autopkgtest running the qml UI tests
Description of the change
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:115
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:115
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:116
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:116
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:116
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:117
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:117
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:117
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:118
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:118
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:120
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:120
https:/
Executed test runs:
SUCCESS: https:/
UNSTABLE: https:/
UNSTABLE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:119
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:120
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Nick Dedekind (nick-dedekind) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
* Did CI run pass? If not, please explain why.
Unrelated test failure.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:121
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Michael Terry (mterry) wrote : | # |
As for packaging... It's not common to provide an oldlibs transitional version AND do the Breaks/
Doing both will mean the transitional one pulls in the new one, but the new one can't live with the transitional one. I'm not sure what would happen on an upgrade there. It might work like you want, but I'm not positive what apt does. Have you tested the upgrade case there? Maybe with a silo to be able to test apt logic?
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:120
https:/
Executed test runs:
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 122. By Michał Sawicz
-
Merge trunk
- 123. By Michał Sawicz
-
Drop qmltypes files
- 124. By Michał Sawicz
-
Don't mix imports
- 125. By Michał Sawicz
-
Update QmlTest.cmake
- 126. By Michał Sawicz
-
Bump transitional version
- 127. By Michał Sawicz
-
Build mocks in autopkgtests
- 128. By Michał Sawicz
-
Fix FingerprintSetup test
- 129. By Michał Sawicz
-
Don't depend on qt5-default, export QT_SELECT instead
- 130. By Michał Sawicz
-
Rename install file
- 131. By Michał Sawicz
-
Update install file
- 132. By Michał Sawicz
-
Don't install mocks
- 133. By Michał Sawicz
-
Use imported Qt5 targets
- 134. By Michał Sawicz
-
Fix install file
- 135. By Michał Sawicz
-
Add missing thumbnailer dep and transition to qml-module-* dependencies
- 136. By Michał Sawicz
-
wrap-and-sort -at
- 137. By Michał Sawicz
-
Add missing dependency on folderlistmodel
- 138. By Michał Sawicz
-
Fix test suite names
- 139. By Michał Sawicz
-
Fix tst_Fingerprint
s.qml - 140. By Michał Sawicz
-
Fix import path
- 141. By Michał Sawicz
-
Merge lp:~nick-dedekind/ubuntu-settings-components/calendar-test-fixes
- 142. By Michał Sawicz
-
Fix typo
- 143. By Michał Sawicz
-
Drop spurious moc includes
- 144. By Michał Sawicz
-
Unskip test after it's been fixed upstream
- 145. By Michał Sawicz
-
Fix up import paths and environment
- 146. By Michał Sawicz
-
8
Unmerged revisions
- 146. By Michał Sawicz
-
8
- 145. By Michał Sawicz
-
Fix up import paths and environment
- 144. By Michał Sawicz
-
Unskip test after it's been fixed upstream
- 143. By Michał Sawicz
-
Drop spurious moc includes
- 142. By Michał Sawicz
-
Fix typo
- 141. By Michał Sawicz
-
Merge lp:~nick-dedekind/ubuntu-settings-components/calendar-test-fixes
- 140. By Michał Sawicz
-
Fix import path
- 139. By Michał Sawicz
-
Fix tst_Fingerprint
s.qml - 138. By Michał Sawicz
-
Fix test suite names
- 137. By Michał Sawicz
-
Add missing dependency on folderlistmodel
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2015-08-02 14:42:46 +0000 | |||
3 | +++ CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
4 | @@ -1,6 +1,4 @@ | |||
5 | 1 | |||
6 | 2 | project(settings-components) | 1 | project(settings-components) |
7 | 3 | |||
8 | 4 | cmake_minimum_required(VERSION 2.8.9) | 2 | cmake_minimum_required(VERSION 2.8.9) |
9 | 5 | 3 | ||
10 | 6 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) | 4 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) |
11 | @@ -11,17 +9,13 @@ | |||
12 | 11 | include(FindPkgConfig) | 9 | include(FindPkgConfig) |
13 | 12 | 10 | ||
14 | 13 | find_package(Qt5Quick REQUIRED) | 11 | find_package(Qt5Quick REQUIRED) |
23 | 14 | set(OUR_QT_QUICK_LIB ${Qt5Quick_LIBRARIES}) | 12 | |
24 | 15 | 13 | set(QT_IMPORTS_DIR ${CMAKE_INSTALL_LIBDIR}/qt5/qml) | |
17 | 16 | get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) | ||
18 | 17 | exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
19 | 18 | file(TO_CMAKE_PATH "${QT_IMPORTS_DIR}" QT_IMPORTS_DIR) | ||
20 | 19 | |||
21 | 20 | set(OUR_QT_QUICK_INCLUDE ${Qt5Quick_INCLUDE_DIRS}) | ||
22 | 21 | LIST(APPEND QT_PKGCONFIG_DEPENDENCIES "Qt5Quick") | ||
25 | 22 | 14 | ||
26 | 23 | find_package(Qt5Core REQUIRED) | 15 | find_package(Qt5Core REQUIRED) |
27 | 16 | find_package(Qt5Qml REQUIRED) | ||
28 | 24 | find_package(Qt5Quick REQUIRED) | 17 | find_package(Qt5Quick REQUIRED) |
29 | 18 | find_package(Qt5Test REQUIRED) | ||
30 | 25 | find_package(Qt5Widgets REQUIRED) | 19 | find_package(Qt5Widgets REQUIRED) |
31 | 26 | add_definitions(-DQT_NO_KEYWORDS) | 20 | add_definitions(-DQT_NO_KEYWORDS) |
32 | 27 | 21 | ||
33 | @@ -34,39 +28,10 @@ | |||
34 | 34 | add_definitions(-DQT_QML_DEBUG) | 28 | add_definitions(-DQT_QML_DEBUG) |
35 | 35 | endif() | 29 | endif() |
36 | 36 | 30 | ||
70 | 37 | include(EnableCoverageReport) | 31 | # Quiet logger |
71 | 38 | ##################################################################### | 32 | set(QUIET_LOGGER OFF CACHE BOOL "Disable test output on stdout.") |
72 | 39 | # Enable code coverage calculation with gcov/gcovr/lcov | 33 | if(NOT QUIET_LOGGER) |
73 | 40 | # Usage: | 34 | set(STDOUT_LOGGER "-o" "-,txt") |
41 | 41 | # * Switch build type to coverage (use ccmake or cmake-gui) | ||
42 | 42 | # * Invoke make, make test, make coverage (or ninja if you use that backend) | ||
43 | 43 | # * Find html report in subdir coveragereport | ||
44 | 44 | # * Find xml report feasible for jenkins in coverage.xml | ||
45 | 45 | ##################################################################### | ||
46 | 46 | if(cmake_build_type_lower MATCHES coverage) | ||
47 | 47 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage" ) | ||
48 | 48 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage" ) | ||
49 | 49 | set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --coverage" ) | ||
50 | 50 | set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage" ) | ||
51 | 51 | ENABLE_COVERAGE_REPORT(TARGETS ${SHELL_APP} FILTER /usr/include ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*) | ||
52 | 52 | endif() | ||
53 | 53 | |||
54 | 54 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" | ||
55 | 55 | "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | ||
56 | 56 | IMMEDIATE @ONLY) | ||
57 | 57 | add_custom_target(uninstall "${CMAKE_COMMAND}" | ||
58 | 58 | -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") | ||
59 | 59 | |||
60 | 60 | # Doc | ||
61 | 61 | OPTION(GENERATE_DOC "Enable qdoc generation" OFF) | ||
62 | 62 | if(GENERATE_DOC) | ||
63 | 63 | message(STATUS "QDoc enabled.") | ||
64 | 64 | find_program(QDOC_BIN qdoc) | ||
65 | 65 | if(NOT QDOC_BIN) | ||
66 | 66 | message(FATAL_ERROR "qdoc command not found") | ||
67 | 67 | else() | ||
68 | 68 | add_subdirectory(doc) | ||
69 | 69 | endif() | ||
74 | 70 | endif() | 35 | endif() |
75 | 71 | 36 | ||
76 | 72 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") | 37 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") |
77 | 73 | 38 | ||
78 | === removed file 'SettingsComponents.qmlproject' | |||
79 | --- SettingsComponents.qmlproject 2013-06-07 15:39:04 +0000 | |||
80 | +++ SettingsComponents.qmlproject 1970-01-01 00:00:00 +0000 | |||
81 | @@ -1,23 +0,0 @@ | |||
82 | 1 | /* File generated by Qt Creator (with Ubuntu Plugin), version 2.7.0 */ | ||
83 | 2 | |||
84 | 3 | import QmlProject 1.1 | ||
85 | 4 | |||
86 | 5 | Project { | ||
87 | 6 | mainFile: "SettingsComponents.qml" | ||
88 | 7 | |||
89 | 8 | /* Include .qml, .js, and image files from current directory and subdirectories */ | ||
90 | 9 | QmlFiles { | ||
91 | 10 | directory: "." | ||
92 | 11 | } | ||
93 | 12 | JavaScriptFiles { | ||
94 | 13 | directory: "." | ||
95 | 14 | } | ||
96 | 15 | ImageFiles { | ||
97 | 16 | directory: "." | ||
98 | 17 | } | ||
99 | 18 | Files { | ||
100 | 19 | filter: "*.desktop" | ||
101 | 20 | } | ||
102 | 21 | /* List of plugin directories passed to QML runtime */ | ||
103 | 22 | importPaths: [ "." ,"/usr/bin","/usr/lib/x86_64-linux-gnu/qt5/qml" ] | ||
104 | 23 | } | ||
105 | 24 | 0 | ||
106 | === removed file 'cmake/modules/EnableCoverageReport.cmake' | |||
107 | --- cmake/modules/EnableCoverageReport.cmake 2013-10-04 10:52:27 +0000 | |||
108 | +++ cmake/modules/EnableCoverageReport.cmake 1970-01-01 00:00:00 +0000 | |||
109 | @@ -1,166 +0,0 @@ | |||
110 | 1 | # - Creates a special coverage build type and target on GCC. | ||
111 | 2 | # | ||
112 | 3 | # Defines a function ENABLE_COVERAGE_REPORT which generates the coverage target | ||
113 | 4 | # for selected targets. Optional arguments to this function are used to filter | ||
114 | 5 | # unwanted results using globbing expressions. Moreover targets with tests for | ||
115 | 6 | # the source code can be specified to trigger regenerating the report if the | ||
116 | 7 | # test has changed | ||
117 | 8 | # | ||
118 | 9 | # ENABLE_COVERAGE_REPORT(TARGETS target... [FILTER filter...] [TESTS test targets...]) | ||
119 | 10 | # | ||
120 | 11 | # To generate a coverage report first build the project with | ||
121 | 12 | # CMAKE_BUILD_TYPE=coverage, then call make test and afterwards make coverage. | ||
122 | 13 | # | ||
123 | 14 | # The coverage report is based on gcov. Depending on the availability of lcov | ||
124 | 15 | # a HTML report will be generated and/or an XML report of gcovr is found. | ||
125 | 16 | # The generated coverage target executes all found solutions. Special targets | ||
126 | 17 | # exist to create e.g. only the xml report: coverage-xml. | ||
127 | 18 | # | ||
128 | 19 | # Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de> | ||
129 | 20 | # | ||
130 | 21 | # This program is free software; you can redistribute it | ||
131 | 22 | # and/or modify it under the terms of the GNU General | ||
132 | 23 | # Public License as published by the Free Software Foundation; | ||
133 | 24 | # either version 2, or (at your option) | ||
134 | 25 | # any later version. | ||
135 | 26 | # | ||
136 | 27 | # This program is distributed in the hope that it will be useful, | ||
137 | 28 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
138 | 29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
139 | 30 | # GNU General Public License for more details. | ||
140 | 31 | # | ||
141 | 32 | |||
142 | 33 | INCLUDE(ParseArguments) | ||
143 | 34 | |||
144 | 35 | FIND_PACKAGE(Lcov) | ||
145 | 36 | FIND_PACKAGE(gcovr) | ||
146 | 37 | |||
147 | 38 | FUNCTION(ENABLE_COVERAGE_REPORT) | ||
148 | 39 | |||
149 | 40 | # argument parsing | ||
150 | 41 | PARSE_ARGUMENTS(ARG "FILTER;TARGETS;TESTS" "" ${ARGN}) | ||
151 | 42 | |||
152 | 43 | SET(COVERAGE_RAW_FILE "${CMAKE_BINARY_DIR}/coverage.raw.info") | ||
153 | 44 | SET(COVERAGE_FILTERED_FILE "${CMAKE_BINARY_DIR}/coverage.info") | ||
154 | 45 | SET(COVERAGE_REPORT_DIR "${CMAKE_BINARY_DIR}/coveragereport") | ||
155 | 46 | SET(COVERAGE_XML_FILE "${CMAKE_BINARY_DIR}/coverage.xml") | ||
156 | 47 | SET(COVERAGE_XML_COMMAND_FILE "${CMAKE_BINARY_DIR}/coverage-xml.cmake") | ||
157 | 48 | |||
158 | 49 | # decide if there is any tool to create coverage data | ||
159 | 50 | SET(TOOL_FOUND FALSE) | ||
160 | 51 | IF(LCOV_FOUND OR GCOVR_FOUND) | ||
161 | 52 | SET(TOOL_FOUND TRUE) | ||
162 | 53 | ENDIF() | ||
163 | 54 | IF(NOT TOOL_FOUND) | ||
164 | 55 | MESSAGE(STATUS "Cannot enable coverage targets because neither lcov nor gcovr are found.") | ||
165 | 56 | ENDIF() | ||
166 | 57 | |||
167 | 58 | STRING(TOLOWER "${CMAKE_BUILD_TYPE}" COVERAGE_BUILD_TYPE) | ||
168 | 59 | IF(CMAKE_COMPILER_IS_GNUCXX AND TOOL_FOUND AND "${COVERAGE_BUILD_TYPE}" MATCHES "coverage") | ||
169 | 60 | |||
170 | 61 | MESSAGE(STATUS "Coverage support enabled for targets: ${ARG_TARGETS}") | ||
171 | 62 | |||
172 | 63 | # create coverage build type | ||
173 | 64 | SET(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG} PARENT_SCOPE) | ||
174 | 65 | SET(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG} PARENT_SCOPE) | ||
175 | 66 | SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} coverage PARENT_SCOPE) | ||
176 | 67 | |||
177 | 68 | # instrument targets | ||
178 | 69 | SET_TARGET_PROPERTIES(${ARG_TARGETS} PROPERTIES COMPILE_FLAGS --coverage | ||
179 | 70 | LINK_FLAGS --coverage) | ||
180 | 71 | |||
181 | 72 | # html report | ||
182 | 73 | IF (LCOV_FOUND) | ||
183 | 74 | |||
184 | 75 | MESSAGE(STATUS "Enabling HTML coverage report") | ||
185 | 76 | |||
186 | 77 | # set up coverage target | ||
187 | 78 | |||
188 | 79 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_RAW_FILE} | ||
189 | 80 | COMMAND ${LCOV_EXECUTABLE} -c -d ${CMAKE_BINARY_DIR} -o ${COVERAGE_RAW_FILE} | ||
190 | 81 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
191 | 82 | COMMENT "Collecting coverage data" | ||
192 | 83 | DEPENDS ${ARG_TARGETS} ${ARG_TESTS} | ||
193 | 84 | VERBATIM) | ||
194 | 85 | |||
195 | 86 | # filter unwanted stuff | ||
196 | 87 | LIST(LENGTH ARG_FILTER FILTER_LENGTH) | ||
197 | 88 | IF(${FILTER_LENGTH} GREATER 0) | ||
198 | 89 | SET(FILTER COMMAND ${LCOV_EXECUTABLE}) | ||
199 | 90 | FOREACH(F ${ARG_FILTER}) | ||
200 | 91 | SET(FILTER ${FILTER} -r ${COVERAGE_FILTERED_FILE} ${F}) | ||
201 | 92 | ENDFOREACH() | ||
202 | 93 | SET(FILTER ${FILTER} -o ${COVERAGE_FILTERED_FILE}) | ||
203 | 94 | ELSE() | ||
204 | 95 | SET(FILTER "") | ||
205 | 96 | ENDIF() | ||
206 | 97 | |||
207 | 98 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_FILTERED_FILE} | ||
208 | 99 | COMMAND ${LCOV_EXECUTABLE} -e ${COVERAGE_RAW_FILE} "${CMAKE_SOURCE_DIR}*" -o ${COVERAGE_FILTERED_FILE} | ||
209 | 100 | ${FILTER} | ||
210 | 101 | DEPENDS ${COVERAGE_RAW_FILE} | ||
211 | 102 | COMMENT "Filtering recorded coverage data for project-relevant entries" | ||
212 | 103 | VERBATIM) | ||
213 | 104 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_REPORT_DIR} | ||
214 | 105 | COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_REPORT_DIR} | ||
215 | 106 | COMMAND ${GENHTML_EXECUTABLE} --legend --show-details -t "${PROJECT_NAME} test coverage" -o ${COVERAGE_REPORT_DIR} ${COVERAGE_FILTERED_FILE} | ||
216 | 107 | DEPENDS ${COVERAGE_FILTERED_FILE} | ||
217 | 108 | COMMENT "Generating HTML coverage report in ${COVERAGE_REPORT_DIR}" | ||
218 | 109 | VERBATIM) | ||
219 | 110 | |||
220 | 111 | ADD_CUSTOM_TARGET(coverage-html | ||
221 | 112 | DEPENDS ${COVERAGE_REPORT_DIR}) | ||
222 | 113 | |||
223 | 114 | ENDIF() | ||
224 | 115 | |||
225 | 116 | # xml coverage report | ||
226 | 117 | IF(GCOVR_FOUND) | ||
227 | 118 | |||
228 | 119 | MESSAGE(STATUS "Enabling XML coverage report") | ||
229 | 120 | |||
230 | 121 | # filter unwanted stuff | ||
231 | 122 | SET(GCOV_FILTER "") | ||
232 | 123 | LIST(LENGTH ARG_FILTER FILTER_LENGTH) | ||
233 | 124 | IF(${FILTER_LENGTH} GREATER 0) | ||
234 | 125 | FOREACH(F ${ARG_FILTER}) | ||
235 | 126 | SET(GCOV_FILTER "${GCOV_FILTER} -e \"${F}\"") | ||
236 | 127 | ENDFOREACH() | ||
237 | 128 | ENDIF() | ||
238 | 129 | |||
239 | 130 | # gcovr cannot write directly to a file so the execution needs to | ||
240 | 131 | # be wrapped in a cmake file that generates the file output | ||
241 | 132 | FILE(WRITE ${COVERAGE_XML_COMMAND_FILE} | ||
242 | 133 | "SET(ENV{LANG} en)\n") | ||
243 | 134 | FILE(APPEND ${COVERAGE_XML_COMMAND_FILE} | ||
244 | 135 | "EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" -x -r \"${CMAKE_SOURCE_DIR}\" ${GCOV_FILTER} OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n") | ||
245 | 136 | |||
246 | 137 | ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_XML_FILE} | ||
247 | 138 | COMMAND ${CMAKE_COMMAND} ARGS -P ${COVERAGE_XML_COMMAND_FILE} | ||
248 | 139 | COMMENT "Generating coverage XML report" | ||
249 | 140 | VERBATIM) | ||
250 | 141 | |||
251 | 142 | ADD_CUSTOM_TARGET(coverage-xml | ||
252 | 143 | DEPENDS ${COVERAGE_XML_FILE}) | ||
253 | 144 | |||
254 | 145 | ENDIF() | ||
255 | 146 | |||
256 | 147 | # provide a global coverage target executing both steps if available | ||
257 | 148 | SET(GLOBAL_DEPENDS "") | ||
258 | 149 | IF(LCOV_FOUND) | ||
259 | 150 | LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_REPORT_DIR}) | ||
260 | 151 | ENDIF() | ||
261 | 152 | IF(GCOVR_FOUND) | ||
262 | 153 | LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_XML_FILE}) | ||
263 | 154 | ENDIF() | ||
264 | 155 | IF(LCOV_FOUND OR GCOVR_FOUND) | ||
265 | 156 | ADD_CUSTOM_TARGET(coverage | ||
266 | 157 | DEPENDS ${GLOBAL_DEPENDS}) | ||
267 | 158 | ENDIF() | ||
268 | 159 | |||
269 | 160 | ENDIF() | ||
270 | 161 | |||
271 | 162 | # This gets rid of any stale .gcda files. Run this if a running a binary causes lots of messages about | ||
272 | 163 | # about a "merge mismatch for summaries". | ||
273 | 164 | ADD_CUSTOM_TARGET(clean-coverage COMMAND find ${CMAKE_BINARY_DIR} -name '*.gcda' | xargs rm -f) | ||
274 | 165 | |||
275 | 166 | ENDFUNCTION() | ||
276 | 167 | 0 | ||
277 | === removed file 'cmake/modules/FindLcov.cmake' | |||
278 | --- cmake/modules/FindLcov.cmake 2013-10-04 10:52:27 +0000 | |||
279 | +++ cmake/modules/FindLcov.cmake 1970-01-01 00:00:00 +0000 | |||
280 | @@ -1,29 +0,0 @@ | |||
281 | 1 | # - Find lcov | ||
282 | 2 | # Will define: | ||
283 | 3 | # | ||
284 | 4 | # LCOV_EXECUTABLE - the lcov binary | ||
285 | 5 | # GENHTML_EXECUTABLE - the genhtml executable | ||
286 | 6 | # | ||
287 | 7 | # Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de> | ||
288 | 8 | # | ||
289 | 9 | # This program is free software; you can redistribute it | ||
290 | 10 | # and/or modify it under the terms of the GNU General | ||
291 | 11 | # Public License as published by the Free Software Foundation; | ||
292 | 12 | # either version 2, or (at your option) | ||
293 | 13 | # any later version. | ||
294 | 14 | # | ||
295 | 15 | # This program is distributed in the hope that it will be useful, | ||
296 | 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
297 | 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
298 | 18 | # GNU General Public License for more details. | ||
299 | 19 | # | ||
300 | 20 | |||
301 | 21 | INCLUDE(FindPackageHandleStandardArgs) | ||
302 | 22 | |||
303 | 23 | FIND_PROGRAM(LCOV_EXECUTABLE lcov) | ||
304 | 24 | FIND_PROGRAM(GENHTML_EXECUTABLE genhtml) | ||
305 | 25 | |||
306 | 26 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lcov DEFAULT_MSG LCOV_EXECUTABLE GENHTML_EXECUTABLE) | ||
307 | 27 | |||
308 | 28 | # only visible in advanced view | ||
309 | 29 | MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE) | ||
310 | 30 | 0 | ||
311 | === removed file 'cmake/modules/Findgcovr.cmake' | |||
312 | --- cmake/modules/Findgcovr.cmake 2013-10-04 10:52:27 +0000 | |||
313 | +++ cmake/modules/Findgcovr.cmake 1970-01-01 00:00:00 +0000 | |||
314 | @@ -1,31 +0,0 @@ | |||
315 | 1 | # - Find gcovr scrip | ||
316 | 2 | # Will define: | ||
317 | 3 | # | ||
318 | 4 | # GCOVR_EXECUTABLE - the gcovr script | ||
319 | 5 | # | ||
320 | 6 | # Uses: | ||
321 | 7 | # | ||
322 | 8 | # GCOVR_ROOT - root to search for the script | ||
323 | 9 | # | ||
324 | 10 | # Copyright (C) 2011 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de> | ||
325 | 11 | # | ||
326 | 12 | # This program is free software; you can redistribute it | ||
327 | 13 | # and/or modify it under the terms of the GNU General | ||
328 | 14 | # Public License as published by the Free Software Foundation; | ||
329 | 15 | # either version 2, or (at your option) | ||
330 | 16 | # any later version. | ||
331 | 17 | # | ||
332 | 18 | # This program is distributed in the hope that it will be useful, | ||
333 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
334 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
335 | 21 | # GNU General Public License for more details. | ||
336 | 22 | # | ||
337 | 23 | |||
338 | 24 | INCLUDE(FindPackageHandleStandardArgs) | ||
339 | 25 | |||
340 | 26 | FIND_PROGRAM(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") | ||
341 | 27 | |||
342 | 28 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(gcovr DEFAULT_MSG GCOVR_EXECUTABLE) | ||
343 | 29 | |||
344 | 30 | # only visible in advanced view | ||
345 | 31 | MARK_AS_ADVANCED(GCOVR_EXECUTABLE) | ||
346 | 32 | 0 | ||
347 | === removed file 'cmake/modules/ParseArguments.cmake' | |||
348 | --- cmake/modules/ParseArguments.cmake 2013-10-04 10:52:27 +0000 | |||
349 | +++ cmake/modules/ParseArguments.cmake 1970-01-01 00:00:00 +0000 | |||
350 | @@ -1,52 +0,0 @@ | |||
351 | 1 | # Parse arguments passed to a function into several lists separated by | ||
352 | 2 | # upper-case identifiers and options that do not have an associated list e.g.: | ||
353 | 3 | # | ||
354 | 4 | # SET(arguments | ||
355 | 5 | # hello OPTION3 world | ||
356 | 6 | # LIST3 foo bar | ||
357 | 7 | # OPTION2 | ||
358 | 8 | # LIST1 fuz baz | ||
359 | 9 | # ) | ||
360 | 10 | # PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments}) | ||
361 | 11 | # | ||
362 | 12 | # results in 7 distinct variables: | ||
363 | 13 | # * ARG_DEFAULT_ARGS: hello;world | ||
364 | 14 | # * ARG_LIST1: fuz;baz | ||
365 | 15 | # * ARG_LIST2: | ||
366 | 16 | # * ARG_LIST3: foo;bar | ||
367 | 17 | # * ARG_OPTION1: FALSE | ||
368 | 18 | # * ARG_OPTION2: TRUE | ||
369 | 19 | # * ARG_OPTION3: TRUE | ||
370 | 20 | # | ||
371 | 21 | # taken from http://www.cmake.org/Wiki/CMakeMacroParseArguments | ||
372 | 22 | |||
373 | 23 | MACRO(PARSE_ARGUMENTS prefix arg_names option_names) | ||
374 | 24 | SET(DEFAULT_ARGS) | ||
375 | 25 | FOREACH(arg_name ${arg_names}) | ||
376 | 26 | SET(${prefix}_${arg_name}) | ||
377 | 27 | ENDFOREACH(arg_name) | ||
378 | 28 | FOREACH(option ${option_names}) | ||
379 | 29 | SET(${prefix}_${option} FALSE) | ||
380 | 30 | ENDFOREACH(option) | ||
381 | 31 | |||
382 | 32 | SET(current_arg_name DEFAULT_ARGS) | ||
383 | 33 | SET(current_arg_list) | ||
384 | 34 | FOREACH(arg ${ARGN}) | ||
385 | 35 | SET(larg_names ${arg_names}) | ||
386 | 36 | LIST(FIND larg_names "${arg}" is_arg_name) | ||
387 | 37 | IF (is_arg_name GREATER -1) | ||
388 | 38 | SET(${prefix}_${current_arg_name} ${current_arg_list}) | ||
389 | 39 | SET(current_arg_name ${arg}) | ||
390 | 40 | SET(current_arg_list) | ||
391 | 41 | ELSE (is_arg_name GREATER -1) | ||
392 | 42 | SET(loption_names ${option_names}) | ||
393 | 43 | LIST(FIND loption_names "${arg}" is_option) | ||
394 | 44 | IF (is_option GREATER -1) | ||
395 | 45 | SET(${prefix}_${arg} TRUE) | ||
396 | 46 | ELSE (is_option GREATER -1) | ||
397 | 47 | SET(current_arg_list ${current_arg_list} ${arg}) | ||
398 | 48 | ENDIF (is_option GREATER -1) | ||
399 | 49 | ENDIF (is_arg_name GREATER -1) | ||
400 | 50 | ENDFOREACH(arg) | ||
401 | 51 | SET(${prefix}_${current_arg_name} ${current_arg_list}) | ||
402 | 52 | ENDMACRO(PARSE_ARGUMENTS) | ||
403 | 53 | 0 | ||
404 | === removed file 'cmake/modules/QmlPlugins.cmake' | |||
405 | --- cmake/modules/QmlPlugins.cmake 2015-04-07 09:44:47 +0000 | |||
406 | +++ cmake/modules/QmlPlugins.cmake 1970-01-01 00:00:00 +0000 | |||
407 | @@ -1,150 +0,0 @@ | |||
408 | 1 | # If you need to override the qmlplugindump binary, create the qmlplugin executable | ||
409 | 2 | # target before loading this plugin. | ||
410 | 3 | |||
411 | 4 | if(NOT TARGET qmlplugindump) | ||
412 | 5 | find_program(qmlplugindump_exe qmlplugindump) | ||
413 | 6 | |||
414 | 7 | if(NOT qmlplugindump_exe) | ||
415 | 8 | msg(FATAL_ERROR "Could not locate qmlplugindump.") | ||
416 | 9 | endif() | ||
417 | 10 | |||
418 | 11 | add_executable(qmlplugindump IMPORTED) | ||
419 | 12 | set_target_properties(qmlplugindump PROPERTIES IMPORTED_LOCATION ${qmlplugindump_exe}) | ||
420 | 13 | endif() | ||
421 | 14 | |||
422 | 15 | # | ||
423 | 16 | # A custom target for building the qmltypes files manually. | ||
424 | 17 | # | ||
425 | 18 | if (NOT TARGET qmltypes) | ||
426 | 19 | add_custom_target(qmltypes) | ||
427 | 20 | endif() | ||
428 | 21 | |||
429 | 22 | # Creates a target for copying resource files into build dir and optionally installing them. | ||
430 | 23 | # | ||
431 | 24 | # Files will be copied into ${BINARY_DIR}/${path} or ${CMAKE_CURRENT_BINARY_DIR} and installed | ||
432 | 25 | # into ${DESTINATION}/${path}. | ||
433 | 26 | # | ||
434 | 27 | # Resource file names are matched against {*.{qml,js,jpg,png,sci,svg},qmldir}. | ||
435 | 28 | # | ||
436 | 29 | # export_qmlfiles(plugin path | ||
437 | 30 | # [SEARCH_PATH path] # Path to search for resources in (defaults to ${CMAKE_CURRENT_SOURCE_DIR}) | ||
438 | 31 | # [BINARY_DIR path] | ||
439 | 32 | # [DESTINATION path] | ||
440 | 33 | # [TARGET_PREFIX string] # Will be prefixed to the target name | ||
441 | 34 | # ) | ||
442 | 35 | # | ||
443 | 36 | # Created target: | ||
444 | 37 | # - ${TARGET_PREFIX}${plugin}-qmlfiles - Copies resources into the binary dir. | ||
445 | 38 | |||
446 | 39 | macro(export_qmlfiles PLUGIN PATH) | ||
447 | 40 | set(single SEARCH_PATH BINARY_DIR DESTINATION TARGET_PREFIX) | ||
448 | 41 | cmake_parse_arguments(QMLFILES "" "${single}" "" ${ARGN}) | ||
449 | 42 | |||
450 | 43 | if(NOT QMLFILES_SEARCH_PATH) | ||
451 | 44 | set(QMLFILES_SEARCH_PATH ${CMAKE_CURRENT_SOURCE_DIR}) | ||
452 | 45 | endif() | ||
453 | 46 | |||
454 | 47 | if(QMLFILES_BINARY_DIR) | ||
455 | 48 | set(qmlfiles_dir ${QMLFILES_BINARY_DIR}/${PATH}) | ||
456 | 49 | else() | ||
457 | 50 | set(qmlfiles_dir ${CMAKE_CURRENT_BINARY_DIR}) | ||
458 | 51 | endif() | ||
459 | 52 | |||
460 | 53 | file(GLOB QMLFILES | ||
461 | 54 | ${QMLFILES_SEARCH_PATH}/*.qml | ||
462 | 55 | ${QMLFILES_SEARCH_PATH}/*.js | ||
463 | 56 | ${QMLFILES_SEARCH_PATH}/*.jpg | ||
464 | 57 | ${QMLFILES_SEARCH_PATH}/*.png | ||
465 | 58 | ${QMLFILES_SEARCH_PATH}/*.sci | ||
466 | 59 | ${QMLFILES_SEARCH_PATH}/*.svg | ||
467 | 60 | ${QMLFILES_SEARCH_PATH}/*.qmltypes | ||
468 | 61 | ${QMLFILES_SEARCH_PATH}/qmldir | ||
469 | 62 | ) | ||
470 | 63 | |||
471 | 64 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${qmlfiles_dir}) | ||
472 | 65 | |||
473 | 66 | # copy the files | ||
474 | 67 | add_custom_target(${QMLFILES_TARGET_PREFIX}${PLUGIN}-qmlfiles ALL | ||
475 | 68 | COMMAND cp ${QMLFILES} ${qmlfiles_dir} | ||
476 | 69 | DEPENDS ${QMLFILES} | ||
477 | 70 | SOURCES ${QMLFILES} | ||
478 | 71 | ) | ||
479 | 72 | |||
480 | 73 | if(QMLFILES_DESTINATION) | ||
481 | 74 | # install the qmlfiles file. | ||
482 | 75 | install(FILES ${QMLFILES} | ||
483 | 76 | DESTINATION ${QMLFILES_DESTINATION}/${PATH} | ||
484 | 77 | ) | ||
485 | 78 | endif() | ||
486 | 79 | endmacro() | ||
487 | 80 | |||
488 | 81 | |||
489 | 82 | # Creates a target for generating the typeinfo file for a QML plugin and/or installs the plugin | ||
490 | 83 | # targets. | ||
491 | 84 | # | ||
492 | 85 | # Files will be copied into ${BINARY_DIR}/${path} or ${CMAKE_CURRENT_BINARY_DIR} and installed | ||
493 | 86 | # into ${DESTINATION}/${path}. If you don't pass BINARY_DIR, it's assumed that current source | ||
494 | 87 | # path ends with ${path}. | ||
495 | 88 | # | ||
496 | 89 | # The generated file will be named after the last segment of the plugin name, e.g. Foo.qmltypes. | ||
497 | 90 | # | ||
498 | 91 | # export_qmlplugin(plugin version path | ||
499 | 92 | # [BINARY_DIR path] | ||
500 | 93 | # [DESTINATION path] | ||
501 | 94 | # [TARGET_PREFIX string] # Will be prefixed to the target name | ||
502 | 95 | # [ENVIRONMENT string] # Will be added to qmlplugindump's env | ||
503 | 96 | # [TARGETS target1 [target2 ...]] # Targets to depend on and install (e.g. the plugin shared object) | ||
504 | 97 | # [NO_TYPES] # Do not create the qmltypes target | ||
505 | 98 | # ) | ||
506 | 99 | # | ||
507 | 100 | # Created target: | ||
508 | 101 | # - ${TARGET_PREFIX}${plugin}-qmltypes - Generates the qmltypes file in the source dir. | ||
509 | 102 | # It will be made a dependency of the "qmltypes" target. | ||
510 | 103 | |||
511 | 104 | macro(export_qmlplugin PLUGIN VERSION PATH) | ||
512 | 105 | set(options NO_TYPES) | ||
513 | 106 | set(single BINARY_DIR DESTINATION TARGET_PREFIX ENVIRONMENT) | ||
514 | 107 | set(multi TARGETS) | ||
515 | 108 | cmake_parse_arguments(QMLPLUGIN "${options}" "${single}" "${multi}" ${ARGN}) | ||
516 | 109 | |||
517 | 110 | get_target_property(qmlplugindump_executable qmlplugindump LOCATION) | ||
518 | 111 | |||
519 | 112 | if(QMLPLUGIN_BINARY_DIR) | ||
520 | 113 | set(qmlplugin_dir ${QMLPLUGIN_BINARY_DIR}/${PATH}) | ||
521 | 114 | else() | ||
522 | 115 | # Find import path to point qmlplugindump at | ||
523 | 116 | string(REGEX REPLACE "/${PATH}$" "" QMLPLUGIN_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") | ||
524 | 117 | set(qmlplugin_dir ${CMAKE_CURRENT_BINARY_DIR}) | ||
525 | 118 | endif() | ||
526 | 119 | |||
527 | 120 | if(NOT QMLPLUGIN_NO_TYPES) | ||
528 | 121 | # Relative path for the module | ||
529 | 122 | string(REPLACE "${CMAKE_BINARY_DIR}/" "" QMLPLUGIN_MODULE_DIR "${QMLPLUGIN_BINARY_DIR}") | ||
530 | 123 | |||
531 | 124 | # Find the last segment of the plugin name to use as qmltypes basename | ||
532 | 125 | string(REGEX MATCH "[^.]+$" plugin_suffix ${PLUGIN}) | ||
533 | 126 | set(target_prefix ${QMLPLUGIN_TARGET_PREFIX}${PLUGIN}) | ||
534 | 127 | set(qmltypes_path ${CMAKE_CURRENT_SOURCE_DIR}/${plugin_suffix}.qmltypes) | ||
535 | 128 | |||
536 | 129 | add_custom_target(${target_prefix}-qmltypes | ||
537 | 130 | COMMAND env ${QMLPLUGIN_ENVIRONMENT} ${qmlplugindump_executable} -notrelocatable | ||
538 | 131 | ${PLUGIN} ${VERSION} ${QMLPLUGIN_MODULE_DIR} > ${qmltypes_path} | ||
539 | 132 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
540 | 133 | ) | ||
541 | 134 | add_dependencies(${target_prefix}-qmltypes ${target_prefix}-qmlfiles ${QMLPLUGIN_TARGETS}) | ||
542 | 135 | add_dependencies(qmltypes ${target_prefix}-qmltypes) | ||
543 | 136 | endif() | ||
544 | 137 | |||
545 | 138 | set_target_properties(${QMLPLUGIN_TARGETS} PROPERTIES | ||
546 | 139 | ARCHIVE_OUTPUT_DIRECTORY ${qmlplugin_dir} | ||
547 | 140 | LIBRARY_OUTPUT_DIRECTORY ${qmlplugin_dir} | ||
548 | 141 | RUNTIME_OUTPUT_DIRECTORY ${qmlplugin_dir} | ||
549 | 142 | ) | ||
550 | 143 | |||
551 | 144 | if (QMLPLUGIN_DESTINATION) | ||
552 | 145 | # Install additional targets | ||
553 | 146 | install(TARGETS ${QMLPLUGIN_TARGETS} | ||
554 | 147 | DESTINATION ${QMLPLUGIN_DESTINATION}/${PATH} | ||
555 | 148 | ) | ||
556 | 149 | endif() | ||
557 | 150 | endmacro() | ||
558 | 151 | 0 | ||
559 | === modified file 'cmake/modules/QmlTest.cmake' | |||
560 | --- cmake/modules/QmlTest.cmake 2015-03-20 15:49:18 +0000 | |||
561 | +++ cmake/modules/QmlTest.cmake 2016-03-24 12:20:44 +0000 | |||
562 | @@ -1,120 +1,313 @@ | |||
573 | 1 | # add_qml_test(path component_name [NO_ADD_TEST] [NO_TARGETS] | 1 | # If you need to override the qmlscene or qmltestrunner executables, |
574 | 2 | # [TARGETS target1 [target2 [...]]] | 2 | # create the corresponding executable target. |
575 | 3 | # [IMPORT_PATHS import_path1 [import_path2 [...]] | 3 | |
576 | 4 | # [PROPERTIES prop1 value1 [prop2 value2 [...]]]) | 4 | # These functions respect the global STDOUT_LOGGER and ARTIFACTS_DIR variables. |
577 | 5 | # | 5 | |
578 | 6 | # NO_ADD_TEST will prevent adding the test to the "test" target | 6 | # You can use those with cmake_parse_arguments |
579 | 7 | # NO_TARGETS will prevent adding the test to any targets | 7 | # if you need to wrap and mangle arguments. |
580 | 8 | # TARGETS lists the targets the test should be added to | 8 | set(QMLTEST_OPTIONS ADD_TEST CACHE INTERNAL "") |
581 | 9 | # IMPORT_PATHS will pass those paths to qmltestrunner as "-import" arguments | 9 | set(QMLTEST_SINGLE ITERATIONS ARG_PREFIX CACHE INTERNAL "") |
582 | 10 | # PROPERTIES will be set on the target and test target. See CMake's set_target_properties() | 10 | set(QMLTEST_MULTI ARGS ENVIRONMENT DEPENDS IMPORT_PATHS TARGETS CACHE INTERNAL "") |
583 | 11 | |||
584 | 12 | # import_executables(name1 [name2 [...]] | ||
585 | 13 | # [OPTIONAL] # continue when not found | ||
586 | 14 | # ) | ||
587 | 15 | # | ||
588 | 16 | # This will find the named executables and import them | ||
589 | 17 | # to an imported target of the same name. | ||
590 | 18 | |||
591 | 19 | function(import_executables) | ||
592 | 20 | cmake_parse_arguments(QMLTEST "OPTIONAL" "" "" ${ARGN}) | ||
593 | 21 | |||
594 | 22 | foreach(NAME ${QMLTEST_UNPARSED_ARGUMENTS}) | ||
595 | 23 | if(NOT TARGET ${NAME}) | ||
596 | 24 | add_executable(${NAME} IMPORTED GLOBAL) | ||
597 | 25 | find_program(${NAME}_exe ${NAME}) | ||
598 | 26 | |||
599 | 27 | if(NOT QMLTEST_OPTIONAL AND NOT ${NAME}_exe) | ||
600 | 28 | message(FATAL_ERROR "Could not locate ${NAME}.") | ||
601 | 29 | elseif(NOT ${NAME}_exe) | ||
602 | 30 | message(STATUS "Could not locate ${NAME}, skipping.") | ||
603 | 31 | else() | ||
604 | 32 | set_target_properties(${NAME} PROPERTIES IMPORTED_LOCATION ${${NAME}_exe}) | ||
605 | 33 | endif() | ||
606 | 34 | endif() | ||
607 | 35 | endforeach() | ||
608 | 36 | endfunction() | ||
609 | 37 | |||
610 | 38 | |||
611 | 39 | # add_qml_test(path component_name | ||
612 | 40 | # [...] | ||
613 | 41 | # ) | ||
614 | 42 | # | ||
615 | 43 | # Add test targets for ${component_name} under ${path}. It's assumed | ||
616 | 44 | # that the test file is named ${path}/tst_${component_name}.qml. | ||
617 | 45 | # | ||
618 | 46 | # This function wraps add_manual_qml_test and add_qml_unittest, | ||
619 | 47 | # see below for available arguments. | ||
620 | 48 | |||
621 | 49 | function(add_qml_test PATH COMPONENT_NAME) | ||
622 | 50 | cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN}) | ||
623 | 51 | mangle_arguments() | ||
624 | 52 | |||
625 | 53 | add_qml_unittest(${ARGV}) | ||
626 | 54 | add_manual_qml_test(${ARGV}) | ||
627 | 55 | endfunction() | ||
628 | 56 | |||
629 | 57 | |||
630 | 58 | # add_qml_unittest(path component_name | ||
631 | 59 | # [...] | ||
632 | 60 | # ) | ||
633 | 61 | # | ||
634 | 62 | # Add test targets for ${component_name} under ${path}. It's assumed | ||
635 | 63 | # that the test file is named ${path}/tst_${component_name}.qml. | ||
636 | 64 | # | ||
637 | 65 | # This function wraps add_executable_test, see below for available arguments. | ||
638 | 66 | |||
639 | 67 | function(add_qml_unittest PATH COMPONENT_NAME) | ||
640 | 68 | import_executables(qmltestrunner) | ||
641 | 69 | |||
642 | 70 | add_executable_test(${COMPONENT_NAME} qmltestrunner | ||
643 | 71 | ${ARGN} | ||
644 | 72 | ARGS -input ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS} | ||
645 | 73 | ) | ||
646 | 74 | endfunction() | ||
647 | 75 | |||
648 | 76 | |||
649 | 77 | # add_manual_qml_test(path component_name | ||
650 | 78 | # [...] | ||
651 | 79 | # ) | ||
652 | 80 | # | ||
653 | 81 | # Add manual test targets for ${component_name} under ${path}. It's assumed | ||
654 | 82 | # that the test file is named ${path}/tst_${component_name}.qml. | ||
655 | 83 | # | ||
656 | 84 | # This function wraps add_manual_test, see below for available arguments. | ||
657 | 85 | |||
658 | 86 | function(add_manual_qml_test PATH COMPONENT_NAME) | ||
659 | 87 | import_executables(qmlscene) | ||
660 | 88 | cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN}) | ||
661 | 89 | |||
662 | 90 | add_manual_test(${COMPONENT_NAME} qmlscene | ||
663 | 91 | ${ARGN} | ||
664 | 92 | ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS} | ||
665 | 93 | ) | ||
666 | 94 | endfunction() | ||
667 | 95 | |||
668 | 96 | |||
669 | 97 | # add_executable_test(target component_name | ||
670 | 98 | # [...] # see doc for add_manual_qml_test for common arguments | ||
671 | 99 | # [ADD_TEST] # whether to add to the "test" target | ||
672 | 100 | # [ARG_PREFIX arg_prefix] # prefix logging arguments with this string | ||
673 | 101 | # [ARGS] arg1 [arg2 [...]] # pass these arguments to the test executable | ||
674 | 102 | # [TARGETS target1 [target2 [...]]] # make the listed targets depend on this test | ||
675 | 103 | # # if a corresponding xvfbtarget1, xvfbtarget2 etc. exists, | ||
676 | 104 | # # this test running under xvfb will be added as a dependency | ||
677 | 105 | # # of those targets | ||
678 | 106 | # [ITERATIONS count] # run this test as a benchmark for ${count} iterations | ||
679 | 107 | # ) | ||
680 | 108 | # | ||
681 | 109 | # Logging options in the standard form of "-o filename,format" | ||
682 | 110 | # will be appended to the arguments list, prefixed with ARG_PREFIX. | ||
683 | 111 | # XUnitXML files will be stored in current binary dir or under | ||
684 | 112 | # ARTIFACTS_DIR, if set. | ||
685 | 113 | # | ||
686 | 114 | # Three targets will be created: | ||
687 | 115 | # - test${component_name} - Runs the test | ||
688 | 116 | # - xvfbtest${component_name} - Runs the test under xvfb | ||
689 | 117 | # - gdbtest${component_name} - Runs the test under gdb | ||
690 | 118 | |||
691 | 119 | function(add_executable_test COMPONENT_NAME TARGET) | ||
692 | 120 | import_executables(gdb xvfb-run OPTIONAL) | ||
693 | 121 | |||
694 | 122 | cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN}) | ||
695 | 123 | mangle_arguments() | ||
696 | 124 | |||
697 | 125 | if(ARTIFACTS_DIR) | ||
698 | 126 | file(RELATIVE_PATH path ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) | ||
699 | 127 | file(MAKE_DIRECTORY ${ARTIFACTS_DIR}/${path}) | ||
700 | 128 | set(file_logger -o ${ARTIFACTS_DIR}/${path}/test${COMPONENT_NAME}.xml,xunitxml) | ||
701 | 129 | else() | ||
702 | 130 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
703 | 131 | set(file_logger -o ${CMAKE_CURRENT_BINARY_DIR}/test${COMPONENT_NAME}.xml,xunitxml) | ||
704 | 132 | endif() | ||
705 | 133 | |||
706 | 134 | bake_arguments("${QMLTEST_ARG_PREFIX}" args ${iterations} ${file_logger} ${STDOUT_LOGGER}) | ||
707 | 135 | |||
708 | 136 | set(qmltest_command | ||
709 | 137 | $<TARGET_FILE:${TARGET}> | ||
710 | 138 | ${QMLTEST_ARGS} | ||
711 | 139 | ${args} | ||
712 | 140 | ) | ||
713 | 141 | |||
714 | 142 | add_qmltest_target(test${COMPONENT_NAME} ${TARGET} | ||
715 | 143 | COMMAND ${qmltest_command} | ||
716 | 144 | ${depends} | ||
717 | 145 | ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT} | ||
718 | 146 | ${add_test} | ||
719 | 147 | ${targets} | ||
720 | 148 | ) | ||
721 | 149 | |||
722 | 150 | if(TARGET xvfb-run) | ||
723 | 151 | add_qmltest_target(xvfbtest${COMPONENT_NAME} ${TARGET} | ||
724 | 152 | COMMAND $<TARGET_FILE:xvfb-run> --server-args "-screen 0 1024x768x24" --auto-servernum ${qmltest_command} | ||
725 | 153 | ${depends} | ||
726 | 154 | ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT} LD_PRELOAD=/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/mesa/libGL.so.1 | ||
727 | 155 | TARGETS ${xvfb_targets} | ||
728 | 156 | ) | ||
729 | 157 | endif() | ||
730 | 158 | |||
731 | 159 | if(TARGET gdb) | ||
732 | 160 | add_qmltest_target(gdbtest${COMPONENT_NAME} ${TARGET} | ||
733 | 161 | COMMAND $<TARGET_FILE:gdb> -ex run -args ${qmltest_command} | ||
734 | 162 | ${depends} | ||
735 | 163 | ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT} | ||
736 | 164 | ) | ||
737 | 165 | endif() | ||
738 | 166 | endfunction() | ||
739 | 167 | |||
740 | 168 | |||
741 | 169 | # add_manual_test(target component_name | ||
742 | 170 | # [DEPENDS target1 [target2 [...]]] # make this test depend on the specified targets | ||
743 | 171 | # [IMPORT_PATHS import_path1 [import_path2 [...]] # use these QML import paths | ||
744 | 172 | # # (they're searched first to last) | ||
745 | 173 | # [ENVIRONMENT var1=value1 [var2=value2 [...]]] # set these environment variables | ||
746 | 174 | # ) | ||
747 | 11 | # | 175 | # |
748 | 12 | # Two targets will be created: | 176 | # Two targets will be created: |
857 | 13 | # - testComponentName - Runs the test with qmltestrunner | 177 | # - try${component_name} - Runs the test for manual interaction |
858 | 14 | # - tryComponentName - Runs the test with uqmlscene, for manual interaction | 178 | # - gdbtry${component_name} - Runs the test under gdb |
859 | 15 | # | 179 | |
860 | 16 | # To change/set a default value for the whole test suite, prior to calling add_qml_test, set: | 180 | function(add_manual_test COMPONENT_NAME TARGET) |
861 | 17 | # qmltest_DEFAULT_NO_ADD_TEST (default: FALSE) | 181 | import_executables(gdb OPTIONAL) |
862 | 18 | # qmltest_DEFAULT_TARGETS | 182 | |
863 | 19 | # qmltest_DEFAULT_IMPORT_PATHS | 183 | cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN}) |
864 | 20 | # qmltest_DEFAULT_PROPERTIES | 184 | mangle_arguments() |
865 | 21 | 185 | ||
866 | 22 | find_program(qmltestrunner_exe qmltestrunner) | 186 | bake_arguments("${QMLTEST_ARG_PREFIX}" args -qmljsdebugger=port:3768) |
867 | 23 | find_program(qmlscene_exe qmlscene) | 187 | |
868 | 24 | 188 | set(qmltry_command | |
869 | 25 | if(NOT qmltestrunner_exe) | 189 | $<TARGET_FILE:${TARGET}> |
870 | 26 | msg(FATAL_ERROR "Could not locate qmltestrunner.") | 190 | ${QMLTEST_ARGS} |
871 | 27 | endif() | 191 | ${args} |
872 | 28 | 192 | ) | |
873 | 29 | macro(add_manual_qml_test SUBPATH COMPONENT_NAME) | 193 | |
874 | 30 | set(options NO_ADD_TEST NO_TARGETS) | 194 | add_qmltest_target(try${COMPONENT_NAME} ${TARGET} |
875 | 31 | set(multi_value_keywords IMPORT_PATHS TARGETS PROPERTIES ENVIRONMENT) | 195 | COMMAND ${qmltry_command} |
876 | 32 | 196 | ${depends} | |
877 | 33 | cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN}) | 197 | ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT} |
878 | 34 | 198 | ) | |
879 | 35 | set(qmlscene_TARGET try${COMPONENT_NAME}) | 199 | |
880 | 36 | set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME}) | 200 | if(TARGET gdb) |
881 | 37 | 201 | add_qmltest_target(gdbtry${COMPONENT_NAME} ${TARGET} | |
882 | 38 | set(qmlscene_imports "") | 202 | COMMAND $<TARGET_FILE:gdb> -ex run -args ${qmltry_command} |
883 | 39 | if(NOT "${qmltest_IMPORT_PATHS}" STREQUAL "") | 203 | ${depends} |
884 | 40 | foreach(IMPORT_PATH ${qmltest_IMPORT_PATHS}) | 204 | ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT} |
885 | 41 | list(APPEND qmlscene_imports "-I") | 205 | ) |
886 | 42 | list(APPEND qmlscene_imports ${IMPORT_PATH}) | 206 | endif() |
887 | 43 | endforeach(IMPORT_PATH) | 207 | endfunction() |
888 | 44 | elseif(NOT "${qmltest_DEFAULT_IMPORT_PATHS}" STREQUAL "") | 208 | |
889 | 45 | foreach(IMPORT_PATH ${qmltest_DEFAULT_IMPORT_PATHS}) | 209 | |
890 | 46 | list(APPEND qmlscene_imports "-I") | 210 | ################### INTERNAL #################### |
891 | 47 | list(APPEND qmlscene_imports ${IMPORT_PATH}) | 211 | |
892 | 48 | endforeach(IMPORT_PATH) | 212 | # add_qmltest_target(target_name target |
893 | 49 | endif() | 213 | # COMMAND test_exe [arg1 [...]] # execute this test with arguments |
894 | 50 | 214 | # [...] # see above for available arguments: | |
895 | 51 | set(qmlscene_command | 215 | # # ADD_TEST, ENVIRONMENT, DEPENDS and TARGETS |
896 | 52 | env ${qmltest_ENVIRONMENT} | 216 | # ) |
897 | 53 | ${qmlscene_exe} ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml | 217 | |
898 | 54 | ${qmlscene_imports} | 218 | function(add_qmltest_target TARGET_NAME TARGET) |
899 | 55 | ) | 219 | cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "COMMAND;${QMLTEST_MULTI}" ${ARGN}) |
900 | 56 | add_custom_target(${qmlscene_TARGET} ${qmlscene_command}) | 220 | mangle_arguments() |
901 | 57 | 221 | ||
902 | 58 | endmacro(add_manual_qml_test) | 222 | # Additional arguments |
903 | 59 | 223 | string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_lower) | |
904 | 60 | macro(add_qml_test SUBPATH COMPONENT_NAME) | 224 | if(cmake_generator_lower STREQUAL "unix makefiles") |
905 | 61 | set(options NO_ADD_TEST NO_TARGETS) | 225 | set(function "$(FUNCTION)") |
906 | 62 | set(multi_value_keywords IMPORT_PATHS TARGETS PROPERTIES ENVIRONMENT) | 226 | endif() |
907 | 63 | 227 | ||
908 | 64 | cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN}) | 228 | add_custom_target(${TARGET_NAME} |
909 | 65 | 229 | env ${QMLTEST_ENVIRONMENT} | |
910 | 66 | set(qmltest_TARGET test${COMPONENT_NAME}) | 230 | ${QMLTEST_COMMAND} ${function} |
911 | 67 | set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME}) | 231 | DEPENDS ${TARGET} ${QMLTEST_DEPENDS} |
912 | 68 | 232 | ) | |
913 | 69 | set(qmltestrunner_imports "") | 233 | |
914 | 70 | if(NOT "${qmltest_IMPORT_PATHS}" STREQUAL "") | 234 | if(QMLTEST_ADD_TEST) |
915 | 71 | foreach(IMPORT_PATH ${qmltest_IMPORT_PATHS}) | 235 | add_test( |
916 | 72 | list(APPEND qmltestrunner_imports "-import") | 236 | NAME ${TARGET_NAME} |
917 | 73 | list(APPEND qmltestrunner_imports ${IMPORT_PATH}) | 237 | COMMAND ${QMLTEST_COMMAND} |
918 | 74 | endforeach(IMPORT_PATH) | 238 | ) |
919 | 75 | elseif(NOT "${qmltest_DEFAULT_IMPORT_PATHS}" STREQUAL "") | 239 | |
920 | 76 | foreach(IMPORT_PATH ${qmltest_DEFAULT_IMPORT_PATHS}) | 240 | foreach(ENV ${QMLTEST_ENVIRONMENT}) |
921 | 77 | list(APPEND qmltestrunner_imports "-import") | 241 | set_property(TEST ${TARGET_NAME} APPEND PROPERTY ENVIRONMENT ${ENV}) |
922 | 78 | list(APPEND qmltestrunner_imports ${IMPORT_PATH}) | 242 | endforeach() |
923 | 79 | endforeach(IMPORT_PATH) | 243 | |
924 | 80 | endif() | 244 | set_property(TEST ${TARGET_NAME} APPEND PROPERTY DEPENDS ${TARGET}) |
925 | 81 | 245 | foreach(DEPEND ${DEPENDS}) | |
926 | 82 | set(qmltest_command | 246 | set_property(TEST ${TARGET_NAME} APPEND PROPERTY DEPENDS ${DEPEND}) |
927 | 83 | env ${qmltest_ENVIRONMENT} | 247 | endforeach() |
928 | 84 | ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml | 248 | endif() |
929 | 85 | ${qmltestrunner_imports} | 249 | |
930 | 86 | -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml | 250 | foreach(UPSTREAM_TARGET ${QMLTEST_TARGETS}) |
931 | 87 | -o -,txt | 251 | add_dependencies(${UPSTREAM_TARGET} ${TARGET_NAME}) |
932 | 88 | ) | 252 | endforeach() |
933 | 89 | add_custom_target(${qmltest_TARGET} ${qmltest_command}) | 253 | endfunction() |
934 | 90 | 254 | ||
935 | 91 | if(NOT "${qmltest_PROPERTIES}" STREQUAL "") | 255 | |
936 | 92 | set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES}) | 256 | # mangle_arguments(${ARGN}) |
937 | 93 | elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "") | 257 | # |
938 | 94 | set_target_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES}) | 258 | # Verify there were no unparsed arguments and |
939 | 95 | endif() | 259 | # mangle the known ones for further processing. |
940 | 96 | 260 | ||
941 | 97 | if("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE") | 261 | macro(mangle_arguments) |
942 | 98 | add_test(${qmltest_TARGET} ${qmltest_command}) | 262 | if(QMLTEST_UNPARSED_ARGUMENTS) |
943 | 99 | 263 | message(FATAL_ERROR "Unexpected arguments: ${QMLTEST_UNPARSED_ARGUMENTS}") | |
944 | 100 | if(NOT "${qmltest_UNPARSED_ARGUMENTS}" STREQUAL "") | 264 | endif() |
945 | 101 | set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_PROPERTIES}) | 265 | |
946 | 102 | elseif(NOT "${qmltest_DEFAULT_PROPERTIES}" STREQUAL "") | 266 | if(QMLTEST_ADD_TEST) |
947 | 103 | set_tests_properties(${qmltest_TARGET} PROPERTIES ${qmltest_DEFAULT_PROPERTIES}) | 267 | set(add_test ADD_TEST) |
948 | 104 | endif() | 268 | endif() |
949 | 105 | endif("${qmltest_NO_ADD_TEST}" STREQUAL FALSE AND NOT "${qmltest_DEFAULT_NO_ADD_TEST}" STREQUAL "TRUE") | 269 | |
950 | 106 | 270 | if(QMLTEST_IMPORT_PATHS) | |
951 | 107 | if("${qmltest_NO_TARGETS}" STREQUAL "FALSE") | 271 | string(REPLACE ";" ":" imports "${QMLTEST_IMPORT_PATHS}") |
952 | 108 | if(NOT "${qmltest_TARGETS}" STREQUAL "") | 272 | endif() |
953 | 109 | foreach(TARGET ${qmltest_TARGETS}) | 273 | |
954 | 110 | add_dependencies(${TARGET} ${qmltest_TARGET}) | 274 | if(QMLTEST_ITERATIONS) |
955 | 111 | endforeach(TARGET) | 275 | set(iterations -iterations ${QMLTEST_ITERATIONS}) |
956 | 112 | elseif(NOT "${qmltest_DEFAULT_TARGETS}" STREQUAL "") | 276 | endif() |
957 | 113 | foreach(TARGET ${qmltest_DEFAULT_TARGETS}) | 277 | |
958 | 114 | add_dependencies(${TARGET} ${qmltest_TARGET}) | 278 | if(QMLTEST_DEPENDS) |
959 | 115 | endforeach(TARGET) | 279 | set(depends DEPENDS ${QMLTEST_DEPENDS}) |
960 | 116 | endif() | 280 | endif() |
961 | 117 | endif("${qmltest_NO_TARGETS}" STREQUAL "FALSE") | 281 | |
962 | 118 | 282 | if(QMLTEST_TARGETS) | |
963 | 119 | add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN}) | 283 | set(targets TARGETS ${QMLTEST_TARGETS}) |
964 | 120 | endmacro(add_qml_test) | 284 | endif() |
965 | 285 | |||
966 | 286 | set(xvfb_targets "") | ||
967 | 287 | foreach(target ${QMLTEST_TARGETS}) | ||
968 | 288 | if(TARGET xvfb${target}) | ||
969 | 289 | list(APPEND xvfb_targets xvfb${target}) | ||
970 | 290 | endif() | ||
971 | 291 | endforeach() | ||
972 | 292 | set(xvfb_targets "${xvfb_targets}" PARENT_SCOPE) | ||
973 | 293 | endmacro() | ||
974 | 294 | |||
975 | 295 | |||
976 | 296 | # bake_arguments(prefix output | ||
977 | 297 | # arg1 [arg2 [...]] | ||
978 | 298 | # ) | ||
979 | 299 | # | ||
980 | 300 | # If set, add the argument prefix before every passed | ||
981 | 301 | # argument and store the result in ${OUTPUT} variable. | ||
982 | 302 | |||
983 | 303 | function(bake_arguments PREFIX OUTPUT) | ||
984 | 304 | set(args "${ARGN}") | ||
985 | 305 | if(PREFIX) | ||
986 | 306 | set(args "") | ||
987 | 307 | foreach(arg ${ARGN}) | ||
988 | 308 | list(APPEND args ${PREFIX}) | ||
989 | 309 | list(APPEND args ${arg}) | ||
990 | 310 | endforeach() | ||
991 | 311 | endif() | ||
992 | 312 | set(${OUTPUT} "${args}" PARENT_SCOPE) | ||
993 | 313 | endfunction() | ||
994 | 121 | 314 | ||
995 | === removed file 'cmake_uninstall.cmake.in' | |||
996 | --- cmake_uninstall.cmake.in 2013-05-16 17:18:42 +0000 | |||
997 | +++ cmake_uninstall.cmake.in 1970-01-01 00:00:00 +0000 | |||
998 | @@ -1,21 +0,0 @@ | |||
999 | 1 | IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||
1000 | 2 | MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") | ||
1001 | 3 | ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||
1002 | 4 | |||
1003 | 5 | FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) | ||
1004 | 6 | STRING(REGEX REPLACE "\n" ";" files "${files}") | ||
1005 | 7 | FOREACH(file ${files}) | ||
1006 | 8 | MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") | ||
1007 | 9 | IF(EXISTS "$ENV{DESTDIR}${file}") | ||
1008 | 10 | EXEC_PROGRAM( | ||
1009 | 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" | ||
1010 | 12 | OUTPUT_VARIABLE rm_out | ||
1011 | 13 | RETURN_VALUE rm_retval | ||
1012 | 14 | ) | ||
1013 | 15 | IF(NOT "${rm_retval}" STREQUAL 0) | ||
1014 | 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") | ||
1015 | 17 | ENDIF(NOT "${rm_retval}" STREQUAL 0) | ||
1016 | 18 | ELSE(EXISTS "$ENV{DESTDIR}${file}") | ||
1017 | 19 | MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") | ||
1018 | 20 | ENDIF(EXISTS "$ENV{DESTDIR}${file}") | ||
1019 | 21 | ENDFOREACH(file) | ||
1020 | 22 | 0 | ||
1021 | === modified file 'debian/changelog' | |||
1022 | --- debian/changelog 2016-03-21 16:54:09 +0000 | |||
1023 | +++ debian/changelog 2016-03-24 12:20:44 +0000 | |||
1024 | @@ -52,6 +52,12 @@ | |||
1025 | 52 | 52 | ||
1026 | 53 | -- Zoltan Balogh <zoltan.balogh@canonical.com> Wed, 02 Mar 2016 21:39:36 +0000 | 53 | -- Zoltan Balogh <zoltan.balogh@canonical.com> Wed, 02 Mar 2016 21:39:36 +0000 |
1027 | 54 | 54 | ||
1028 | 55 | ubuntu-system-components (0.7-0ubuntu1) UNRELEASED; urgency=medium | ||
1029 | 56 | |||
1030 | 57 | * New package name: ubuntu-system-components | ||
1031 | 58 | |||
1032 | 59 | -- Michal Sawicz <michal.sawicz@canonical.com> Fri, 29 Jan 2016 00:10:05 +0100 | ||
1033 | 60 | |||
1034 | 55 | ubuntu-settings-components (0.6+16.04.20151102-0ubuntu1) xenial; urgency=medium | 61 | ubuntu-settings-components (0.6+16.04.20151102-0ubuntu1) xenial; urgency=medium |
1035 | 56 | 62 | ||
1036 | 57 | [ CI Train Bot ] | 63 | [ CI Train Bot ] |
1037 | 58 | 64 | ||
1038 | === modified file 'debian/control' | |||
1039 | --- debian/control 2016-03-01 15:37:36 +0000 | |||
1040 | +++ debian/control 2016-03-24 12:20:44 +0000 | |||
1041 | @@ -1,10 +1,12 @@ | |||
1043 | 1 | Source: ubuntu-settings-components | 1 | Source: ubuntu-system-components |
1044 | 2 | Section: misc | 2 | Section: misc |
1045 | 3 | Priority: optional | 3 | Priority: optional |
1047 | 4 | Maintainer: Andrea Cimitan <andrea.cimitan@canonical.com> | 4 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
1048 | 5 | Build-Depends: cmake, | 5 | Build-Depends: cmake, |
1049 | 6 | cmake-extras (>= 0.6), | ||
1050 | 6 | debhelper (>= 9), | 7 | debhelper (>= 9), |
1051 | 7 | pkg-config, | 8 | pkg-config, |
1052 | 9 | python3:any, | ||
1053 | 8 | qml-module-qtquick-layouts, | 10 | qml-module-qtquick-layouts, |
1054 | 9 | qt5-default, | 11 | qt5-default, |
1055 | 10 | qtbase5-private-dev, | 12 | qtbase5-private-dev, |
1056 | @@ -26,13 +28,24 @@ | |||
1057 | 26 | Package: qtdeclarative5-ubuntu-settings-components | 28 | Package: qtdeclarative5-ubuntu-settings-components |
1058 | 27 | Architecture: any | 29 | Architecture: any |
1059 | 28 | Multi-Arch: same | 30 | Multi-Arch: same |
1060 | 31 | Section: oldlibs | ||
1061 | 32 | Depends: qml-module-ubuntu-system-components, ${misc:Depends} | ||
1062 | 33 | Description: transitional dummy package for Ubuntu system components | ||
1063 | 34 | Ubuntu system components for Unity | ||
1064 | 35 | . | ||
1065 | 36 | This is a transitional dummy package which can be safely removed. | ||
1066 | 37 | |||
1067 | 38 | Package: qml-module-ubuntu-system-components | ||
1068 | 39 | Architecture: any | ||
1069 | 40 | Multi-Arch: same | ||
1070 | 29 | Pre-Depends: dpkg (>= 1.15.6~) | 41 | Pre-Depends: dpkg (>= 1.15.6~) |
1071 | 30 | Depends: qml-module-qtquick-layouts, | 42 | Depends: qml-module-qtquick-layouts, |
1072 | 31 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1), | 43 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1), |
1073 | 32 | suru-icon-theme, | 44 | suru-icon-theme, |
1074 | 33 | ${misc:Depends}, | 45 | ${misc:Depends}, |
1075 | 34 | ${shlibs:Depends}, | 46 | ${shlibs:Depends}, |
1076 | 35 | Breaks: qtdeclarative5-ubuntu-settings-components-assets (<< 0.3), | ||
1077 | 36 | Replaces: qtdeclarative5-ubuntu-settings-components-assets (<< 0.3), | ||
1078 | 37 | Description: Ubuntu Settings Components | ||
1079 | 38 | Ubuntu settings components for Unity | ||
1080 | 39 | \ No newline at end of file | 47 | \ No newline at end of file |
1081 | 48 | Breaks: qtdeclarative5-ubuntu-settings-components (<< 0.7), | ||
1082 | 49 | Replaces: qtdeclarative5-ubuntu-settings-components (<< 0.7), | ||
1083 | 50 | Provides: qtdeclarative5-ubuntu-settings-components, | ||
1084 | 51 | Description: Ubuntu System Components | ||
1085 | 52 | Ubuntu system components for Unity | ||
1086 | 40 | 53 | ||
1087 | === added file 'debian/qml-module-ubuntu-system-components.install' | |||
1088 | --- debian/qml-module-ubuntu-system-components.install 1970-01-01 00:00:00 +0000 | |||
1089 | +++ debian/qml-module-ubuntu-system-components.install 2016-03-24 12:20:44 +0000 | |||
1090 | @@ -0,0 +1,2 @@ | |||
1091 | 1 | usr/lib/*/qt5/qml/Ubuntu/Settings/Components | ||
1092 | 2 | usr/lib/*/qt5/qml/Ubuntu/Settings/Menus | ||
1093 | 0 | 3 | ||
1094 | === added directory 'debian/tests' | |||
1095 | === added file 'debian/tests/control' | |||
1096 | --- debian/tests/control 1970-01-01 00:00:00 +0000 | |||
1097 | +++ debian/tests/control 2016-03-24 12:20:44 +0000 | |||
1098 | @@ -0,0 +1,4 @@ | |||
1099 | 1 | Tests: qmluitests.sh | ||
1100 | 2 | Depends: @, | ||
1101 | 3 | @builddeps@, | ||
1102 | 4 | xvfb, | ||
1103 | 0 | 5 | ||
1104 | === added file 'debian/tests/qmluitests.sh' | |||
1105 | --- debian/tests/qmluitests.sh 1970-01-01 00:00:00 +0000 | |||
1106 | +++ debian/tests/qmluitests.sh 2016-03-24 12:20:44 +0000 | |||
1107 | @@ -0,0 +1,5 @@ | |||
1108 | 1 | #!/bin/sh | ||
1109 | 2 | |||
1110 | 3 | dh_auto_configure -- -DARTIFACTS_DIR=${ADT_ARTIFACTS} | ||
1111 | 4 | |||
1112 | 5 | dh_auto_build --parallel -- -k xvfballtests | ||
1113 | 0 | 6 | ||
1114 | === modified file 'plugins/Ubuntu/Settings/Components/CMakeLists.txt' | |||
1115 | --- plugins/Ubuntu/Settings/Components/CMakeLists.txt 2015-04-07 09:42:19 +0000 | |||
1116 | +++ plugins/Ubuntu/Settings/Components/CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
1117 | @@ -1,12 +1,5 @@ | |||
1118 | 1 | project(UbuntuSettingsComponentsQml) | 1 | project(UbuntuSettingsComponentsQml) |
1119 | 2 | 2 | ||
1120 | 3 | find_package(Qt5Core REQUIRED) | ||
1121 | 4 | |||
1122 | 5 | include_directories( | ||
1123 | 6 | ${CMAKE_CURRENT_SOURCE_DIR} | ||
1124 | 7 | ${CMAKE_CURRENT_BINARY_DIR} | ||
1125 | 8 | ) | ||
1126 | 9 | |||
1127 | 10 | add_definitions(-DUBUNTUSETTINGSCOMPONENTS_LIBRARY) | 3 | add_definitions(-DUBUNTUSETTINGSCOMPONENTS_LIBRARY) |
1128 | 11 | 4 | ||
1129 | 12 | add_library(UbuntuSettingsComponentsQml MODULE | 5 | add_library(UbuntuSettingsComponentsQml MODULE |
1130 | @@ -14,6 +7,10 @@ | |||
1131 | 14 | serverpropertysynchroniser.cpp | 7 | serverpropertysynchroniser.cpp |
1132 | 15 | ) | 8 | ) |
1133 | 16 | 9 | ||
1135 | 17 | qt5_use_modules(UbuntuSettingsComponentsQml Core Qml Quick) | 10 | target_link_libraries(UbuntuSettingsComponentsQml |
1136 | 11 | Qt5::Core | ||
1137 | 12 | Qt5::Qml | ||
1138 | 13 | Qt5::Quick | ||
1139 | 14 | ) | ||
1140 | 18 | 15 | ||
1141 | 19 | add_usc_plugin(Ubuntu.Settings.Components 0.1 Ubuntu/Settings/Components TARGETS UbuntuSettingsComponentsQml) | 16 | add_usc_plugin(Ubuntu.Settings.Components 0.1 Ubuntu/Settings/Components TARGETS UbuntuSettingsComponentsQml) |
1142 | 20 | 17 | ||
1143 | === modified file 'plugins/Ubuntu/Settings/Components/Components.qmltypes' | |||
1144 | --- plugins/Ubuntu/Settings/Components/Components.qmltypes 2015-04-07 09:42:19 +0000 | |||
1145 | +++ plugins/Ubuntu/Settings/Components/Components.qmltypes 2016-03-24 12:20:44 +0000 | |||
1146 | @@ -1,4 +1,4 @@ | |||
1148 | 1 | import QtQuick.tooling 1.1 | 1 | import QtQuick.tooling 1.2 |
1149 | 2 | 2 | ||
1150 | 3 | // This file describes the plugin-supplied types contained in the library. | 3 | // This file describes the plugin-supplied types contained in the library. |
1151 | 4 | // It is used for QML tooling purposes only. | 4 | // It is used for QML tooling purposes only. |
1152 | @@ -7,6 +7,22 @@ | |||
1153 | 7 | // 'qmlplugindump -notrelocatable Ubuntu.Settings.Components 0.1 plugins' | 7 | // 'qmlplugindump -notrelocatable Ubuntu.Settings.Components 0.1 plugins' |
1154 | 8 | 8 | ||
1155 | 9 | Module { | 9 | Module { |
1156 | 10 | dependencies: [ | ||
1157 | 11 | "QtFeedback 5.0", | ||
1158 | 12 | "QtGraphicalEffects 1.0", | ||
1159 | 13 | "QtQml 2.0", | ||
1160 | 14 | "QtQuick 2.4", | ||
1161 | 15 | "QtQuick.Layouts 1.1", | ||
1162 | 16 | "QtQuick.Window 2.2", | ||
1163 | 17 | "Ubuntu.Components 1.3", | ||
1164 | 18 | "Ubuntu.Components.ListItems 1.3", | ||
1165 | 19 | "Ubuntu.Components.Popups 1.3", | ||
1166 | 20 | "Ubuntu.Components.Styles 1.3", | ||
1167 | 21 | "Ubuntu.Components.Themes 1.3", | ||
1168 | 22 | "Ubuntu.Components.Themes.Ambiance 1.3", | ||
1169 | 23 | "Ubuntu.PerformanceMetrics 1.0", | ||
1170 | 24 | "com.canonical.Oxide 1.9" | ||
1171 | 25 | ] | ||
1172 | 10 | Component { | 26 | Component { |
1173 | 11 | name: "ServerPropertySynchroniser" | 27 | name: "ServerPropertySynchroniser" |
1174 | 12 | prototype: "QObject" | 28 | prototype: "QObject" |
1175 | @@ -70,4 +86,52 @@ | |||
1176 | 70 | Method { name: "activate" } | 86 | Method { name: "activate" } |
1177 | 71 | Method { name: "reset" } | 87 | Method { name: "reset" } |
1178 | 72 | } | 88 | } |
1179 | 89 | Component { | ||
1180 | 90 | prototype: "Palette_QMLTYPE_2" | ||
1181 | 91 | name: "Palette" | ||
1182 | 92 | exports: ["Palette -1.-1"] | ||
1183 | 93 | exportMetaObjectRevisions: [-1] | ||
1184 | 94 | isComposite: true | ||
1185 | 95 | } | ||
1186 | 96 | Component { | ||
1187 | 97 | prototype: "QObject" | ||
1188 | 98 | name: "PaletteValues" | ||
1189 | 99 | exports: ["PaletteValues -1.-1"] | ||
1190 | 100 | exportMetaObjectRevisions: [-1] | ||
1191 | 101 | isComposite: true | ||
1192 | 102 | Property { name: "background"; type: "QColor" } | ||
1193 | 103 | Property { name: "backgroundText"; type: "QColor" } | ||
1194 | 104 | Property { name: "base"; type: "QColor" } | ||
1195 | 105 | Property { name: "baseText"; type: "QColor" } | ||
1196 | 106 | Property { name: "foreground"; type: "QColor" } | ||
1197 | 107 | Property { name: "foregroundText"; type: "QColor" } | ||
1198 | 108 | Property { name: "overlay"; type: "QColor" } | ||
1199 | 109 | Property { name: "overlayText"; type: "QColor" } | ||
1200 | 110 | Property { name: "field"; type: "QColor" } | ||
1201 | 111 | Property { name: "fieldText"; type: "QColor" } | ||
1202 | 112 | Property { name: "selection"; type: "QColor" } | ||
1203 | 113 | } | ||
1204 | 114 | Component { | ||
1205 | 115 | prototype: "QObject" | ||
1206 | 116 | name: "UbuntuColors" | ||
1207 | 117 | exports: ["UbuntuColors -1.-1"] | ||
1208 | 118 | exportMetaObjectRevisions: [-1] | ||
1209 | 119 | isComposite: true | ||
1210 | 120 | isCreatable: false | ||
1211 | 121 | isSingleton: true | ||
1212 | 122 | Property { name: "orange"; type: "QColor"; isReadonly: true } | ||
1213 | 123 | Property { name: "lightAubergine"; type: "QColor"; isReadonly: true } | ||
1214 | 124 | Property { name: "midAubergine"; type: "QColor"; isReadonly: true } | ||
1215 | 125 | Property { name: "darkAubergine"; type: "QColor"; isReadonly: true } | ||
1216 | 126 | Property { name: "warmGrey"; type: "QColor"; isReadonly: true } | ||
1217 | 127 | Property { name: "coolGrey"; type: "QColor"; isReadonly: true } | ||
1218 | 128 | Property { name: "orangeGradient"; type: "QQuickGradient"; isPointer: true } | ||
1219 | 129 | Property { name: "greyGradient"; type: "QQuickGradient"; isPointer: true } | ||
1220 | 130 | Property { name: "lightGrey"; type: "QColor"; isReadonly: true } | ||
1221 | 131 | Property { name: "darkGrey"; type: "QColor"; isReadonly: true } | ||
1222 | 132 | Property { name: "red"; type: "QColor"; isReadonly: true } | ||
1223 | 133 | Property { name: "green"; type: "QColor"; isReadonly: true } | ||
1224 | 134 | Property { name: "blue"; type: "QColor"; isReadonly: true } | ||
1225 | 135 | Property { name: "purple"; type: "QColor"; isReadonly: true } | ||
1226 | 136 | } | ||
1227 | 73 | } | 137 | } |
1228 | 74 | 138 | ||
1229 | === modified file 'plugins/Ubuntu/Settings/Components/serverpropertysynchroniser.cpp' | |||
1230 | --- plugins/Ubuntu/Settings/Components/serverpropertysynchroniser.cpp 2015-05-06 16:31:57 +0000 | |||
1231 | +++ plugins/Ubuntu/Settings/Components/serverpropertysynchroniser.cpp 2016-03-24 12:20:44 +0000 | |||
1232 | @@ -18,7 +18,6 @@ | |||
1233 | 18 | 18 | ||
1234 | 19 | #include <QQmlProperty> | 19 | #include <QQmlProperty> |
1235 | 20 | #include <QTimer> | 20 | #include <QTimer> |
1236 | 21 | #include <QDebug> | ||
1237 | 22 | 21 | ||
1238 | 23 | ServerPropertySynchroniser::ServerPropertySynchroniser(QObject* parent) | 22 | ServerPropertySynchroniser::ServerPropertySynchroniser(QObject* parent) |
1239 | 24 | : QObject(parent) | 23 | : QObject(parent) |
1240 | 25 | 24 | ||
1241 | === modified file 'plugins/Ubuntu/Settings/Menus/CMakeLists.txt' | |||
1242 | --- plugins/Ubuntu/Settings/Menus/CMakeLists.txt 2014-07-31 13:05:44 +0000 | |||
1243 | +++ plugins/Ubuntu/Settings/Menus/CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
1244 | @@ -1,29 +1,21 @@ | |||
1245 | 1 | project(UbuntuSettingsMenusQml) | 1 | project(UbuntuSettingsMenusQml) |
1246 | 2 | 2 | ||
1255 | 3 | find_package(Qt5Core REQUIRED) | 3 | add_definitions(-DUBUNTUSETTINGSCOMPONENTS_LIBRARY) |
1256 | 4 | 4 | ||
1257 | 5 | include_directories( | 5 | add_library(UbuntuSettingsMenusQml MODULE |
1250 | 6 | ${CMAKE_CURRENT_SOURCE_DIR} | ||
1251 | 7 | ${CMAKE_CURRENT_BINARY_DIR} | ||
1252 | 8 | ) | ||
1253 | 9 | |||
1254 | 10 | set(UbuntuSettingsMenusQml_SOURCES | ||
1258 | 11 | plugin.cpp | 6 | plugin.cpp |
1259 | 12 | types.h | 7 | types.h |
1260 | 13 | ) | ||
1261 | 14 | add_definitions(-DUBUNTUSETTINGSCOMPONENTS_LIBRARY) | ||
1262 | 15 | |||
1263 | 16 | add_library(UbuntuSettingsMenusQml MODULE | ||
1264 | 17 | ${UbuntuSettingsMenusQml_SOURCES} | 8 | ${UbuntuSettingsMenusQml_SOURCES} |
1265 | 18 | ) | 9 | ) |
1266 | 19 | 10 | ||
1267 | 20 | target_link_libraries(UbuntuSettingsMenusQml | 11 | target_link_libraries(UbuntuSettingsMenusQml |
1268 | 12 | Qt5::Core | ||
1269 | 13 | Qt5::Qml | ||
1270 | 14 | Qt5::Quick | ||
1271 | 21 | ${GLIB_LIBRARIES} | 15 | ${GLIB_LIBRARIES} |
1272 | 22 | ${GIO_LIBRARIES} | 16 | ${GIO_LIBRARIES} |
1273 | 23 | ${QMENUMODEL_LDFLAGS} | 17 | ${QMENUMODEL_LDFLAGS} |
1274 | 24 | ${LIBUPSTART_LIBRARIES} | 18 | ${LIBUPSTART_LIBRARIES} |
1275 | 25 | ) | 19 | ) |
1276 | 26 | 20 | ||
1277 | 27 | qt5_use_modules(UbuntuSettingsMenusQml Core Qml Quick) | ||
1278 | 28 | |||
1279 | 29 | add_usc_plugin(Ubuntu.Settings.Menus 0.1 Ubuntu/Settings/Menus TARGETS UbuntuSettingsMenusQml) | 21 | add_usc_plugin(Ubuntu.Settings.Menus 0.1 Ubuntu/Settings/Menus TARGETS UbuntuSettingsMenusQml) |
1280 | 30 | 22 | ||
1281 | === modified file 'plugins/Ubuntu/Settings/Menus/Menus.qmltypes' | |||
1282 | --- plugins/Ubuntu/Settings/Menus/Menus.qmltypes 2015-04-07 09:42:19 +0000 | |||
1283 | +++ plugins/Ubuntu/Settings/Menus/Menus.qmltypes 2016-03-24 12:20:44 +0000 | |||
1284 | @@ -1,4 +1,4 @@ | |||
1286 | 1 | import QtQuick.tooling 1.1 | 1 | import QtQuick.tooling 1.2 |
1287 | 2 | 2 | ||
1288 | 3 | // This file describes the plugin-supplied types contained in the library. | 3 | // This file describes the plugin-supplied types contained in the library. |
1289 | 4 | // It is used for QML tooling purposes only. | 4 | // It is used for QML tooling purposes only. |
1290 | @@ -7,6 +7,23 @@ | |||
1291 | 7 | // 'qmlplugindump -notrelocatable Ubuntu.Settings.Menus 0.1 plugins' | 7 | // 'qmlplugindump -notrelocatable Ubuntu.Settings.Menus 0.1 plugins' |
1292 | 8 | 8 | ||
1293 | 9 | Module { | 9 | Module { |
1294 | 10 | dependencies: [ | ||
1295 | 11 | "QtFeedback 5.0", | ||
1296 | 12 | "QtGraphicalEffects 1.0", | ||
1297 | 13 | "QtQml 2.0", | ||
1298 | 14 | "QtQuick 2.4", | ||
1299 | 15 | "QtQuick.Layouts 1.1", | ||
1300 | 16 | "QtQuick.Window 2.2", | ||
1301 | 17 | "Ubuntu.Components 1.3", | ||
1302 | 18 | "Ubuntu.Components.ListItems 1.3", | ||
1303 | 19 | "Ubuntu.Components.Popups 1.3", | ||
1304 | 20 | "Ubuntu.Components.Styles 1.3", | ||
1305 | 21 | "Ubuntu.Components.Themes 1.3", | ||
1306 | 22 | "Ubuntu.Components.Themes.Ambiance 1.3", | ||
1307 | 23 | "Ubuntu.PerformanceMetrics 1.0", | ||
1308 | 24 | "Ubuntu.Settings.Components 0.1", | ||
1309 | 25 | "com.canonical.Oxide 1.9" | ||
1310 | 26 | ] | ||
1311 | 10 | Component { | 27 | Component { |
1312 | 11 | name: "TransferState" | 28 | name: "TransferState" |
1313 | 12 | prototype: "QObject" | 29 | prototype: "QObject" |
1314 | @@ -27,4 +44,52 @@ | |||
1315 | 27 | } | 44 | } |
1316 | 28 | } | 45 | } |
1317 | 29 | } | 46 | } |
1318 | 47 | Component { | ||
1319 | 48 | prototype: "Palette_QMLTYPE_2" | ||
1320 | 49 | name: "Palette" | ||
1321 | 50 | exports: ["Palette -1.-1"] | ||
1322 | 51 | exportMetaObjectRevisions: [-1] | ||
1323 | 52 | isComposite: true | ||
1324 | 53 | } | ||
1325 | 54 | Component { | ||
1326 | 55 | prototype: "QObject" | ||
1327 | 56 | name: "PaletteValues" | ||
1328 | 57 | exports: ["PaletteValues -1.-1"] | ||
1329 | 58 | exportMetaObjectRevisions: [-1] | ||
1330 | 59 | isComposite: true | ||
1331 | 60 | Property { name: "background"; type: "QColor" } | ||
1332 | 61 | Property { name: "backgroundText"; type: "QColor" } | ||
1333 | 62 | Property { name: "base"; type: "QColor" } | ||
1334 | 63 | Property { name: "baseText"; type: "QColor" } | ||
1335 | 64 | Property { name: "foreground"; type: "QColor" } | ||
1336 | 65 | Property { name: "foregroundText"; type: "QColor" } | ||
1337 | 66 | Property { name: "overlay"; type: "QColor" } | ||
1338 | 67 | Property { name: "overlayText"; type: "QColor" } | ||
1339 | 68 | Property { name: "field"; type: "QColor" } | ||
1340 | 69 | Property { name: "fieldText"; type: "QColor" } | ||
1341 | 70 | Property { name: "selection"; type: "QColor" } | ||
1342 | 71 | } | ||
1343 | 72 | Component { | ||
1344 | 73 | prototype: "QObject" | ||
1345 | 74 | name: "UbuntuColors" | ||
1346 | 75 | exports: ["UbuntuColors -1.-1"] | ||
1347 | 76 | exportMetaObjectRevisions: [-1] | ||
1348 | 77 | isComposite: true | ||
1349 | 78 | isCreatable: false | ||
1350 | 79 | isSingleton: true | ||
1351 | 80 | Property { name: "orange"; type: "QColor"; isReadonly: true } | ||
1352 | 81 | Property { name: "lightAubergine"; type: "QColor"; isReadonly: true } | ||
1353 | 82 | Property { name: "midAubergine"; type: "QColor"; isReadonly: true } | ||
1354 | 83 | Property { name: "darkAubergine"; type: "QColor"; isReadonly: true } | ||
1355 | 84 | Property { name: "warmGrey"; type: "QColor"; isReadonly: true } | ||
1356 | 85 | Property { name: "coolGrey"; type: "QColor"; isReadonly: true } | ||
1357 | 86 | Property { name: "orangeGradient"; type: "QQuickGradient"; isPointer: true } | ||
1358 | 87 | Property { name: "greyGradient"; type: "QQuickGradient"; isPointer: true } | ||
1359 | 88 | Property { name: "lightGrey"; type: "QColor"; isReadonly: true } | ||
1360 | 89 | Property { name: "darkGrey"; type: "QColor"; isReadonly: true } | ||
1361 | 90 | Property { name: "red"; type: "QColor"; isReadonly: true } | ||
1362 | 91 | Property { name: "green"; type: "QColor"; isReadonly: true } | ||
1363 | 92 | Property { name: "blue"; type: "QColor"; isReadonly: true } | ||
1364 | 93 | Property { name: "purple"; type: "QColor"; isReadonly: true } | ||
1365 | 94 | } | ||
1366 | 30 | } | 95 | } |
1367 | 31 | 96 | ||
1368 | === modified file 'runtests.sh' | |||
1369 | --- runtests.sh 2014-08-04 14:27:30 +0000 | |||
1370 | +++ runtests.sh 2016-03-24 12:20:44 +0000 | |||
1371 | @@ -53,7 +53,7 @@ | |||
1372 | 53 | 53 | ||
1373 | 54 | cd - | 54 | cd - |
1374 | 55 | 55 | ||
1376 | 56 | make -k qmltests | 56 | make -k alltests |
1377 | 57 | 57 | ||
1378 | 58 | cd - | 58 | cd - |
1379 | 59 | 59 | ||
1380 | 60 | 60 | ||
1381 | === modified file 'tests/CMakeLists.txt' | |||
1382 | --- tests/CMakeLists.txt 2016-02-29 18:14:22 +0000 | |||
1383 | +++ tests/CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
1384 | @@ -1,10 +1,27 @@ | |||
1385 | 1 | include(QmlTest) | ||
1386 | 2 | |||
1387 | 3 | # QML tests that require graphical capabilities. | ||
1388 | 4 | add_custom_target(uitests) | ||
1389 | 5 | add_custom_target(xvfbuitests) | ||
1390 | 6 | |||
1391 | 7 | add_custom_target(alltests) | ||
1392 | 8 | add_dependencies(alltests uitests) | ||
1393 | 9 | |||
1394 | 10 | add_custom_target(xvfballtests) | ||
1395 | 11 | add_dependencies(xvfballtests xvfbuitests) | ||
1396 | 12 | |||
1397 | 1 | add_subdirectory(utils) | 13 | add_subdirectory(utils) |
1398 | 2 | 14 | ||
1406 | 3 | # QML tests that require graphical capabitlies. | 15 | # add a graphical qml test |
1407 | 4 | add_custom_target(qmluitests) | 16 | # see QmlTest.cmake for additional options |
1408 | 5 | add_dependencies(qmluitests UbuntuTest) | 17 | function(add_usc_qmltest PATH COMPONENT_NAME) |
1409 | 6 | 18 | add_qml_test(${PATH} ${COMPONENT_NAME} | |
1410 | 7 | add_custom_target(qmltests) | 19 | DEPENDS UbuntuTest |
1411 | 8 | add_dependencies(qmltests qmluitests) | 20 | IMPORT_PATHS ${CMAKE_BINARY_DIR}/tests/utils/modules |
1412 | 9 | 21 | TARGETS uitests | |
1413 | 22 | ${ARGN} | ||
1414 | 23 | ) | ||
1415 | 24 | endfunction() | ||
1416 | 25 | |||
1417 | 26 | add_subdirectory(imports) | ||
1418 | 10 | add_subdirectory(qmltests) | 27 | add_subdirectory(qmltests) |
1419 | 11 | 28 | ||
1420 | === added directory 'tests/imports' | |||
1421 | === added file 'tests/imports/CMakeLists.txt' | |||
1422 | --- tests/imports/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1423 | +++ tests/imports/CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
1424 | @@ -0,0 +1,5 @@ | |||
1425 | 1 | |||
1426 | 2 | # | ||
1427 | 3 | # Test that all imports for QtQuick and Ubuntu.Components use the wanted version | ||
1428 | 4 | # | ||
1429 | 5 | add_test(imports ${CMAKE_CURRENT_SOURCE_DIR}/check_imports.py ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) | ||
1430 | 0 | 6 | ||
1431 | === added file 'tests/imports/check_imports.py' | |||
1432 | --- tests/imports/check_imports.py 1970-01-01 00:00:00 +0000 | |||
1433 | +++ tests/imports/check_imports.py 2016-03-24 12:20:44 +0000 | |||
1434 | @@ -0,0 +1,125 @@ | |||
1435 | 1 | #! /usr/bin/env python3 | ||
1436 | 2 | |||
1437 | 3 | # | ||
1438 | 4 | # Copyright (C) 2015 Canonical Ltd | ||
1439 | 5 | # | ||
1440 | 6 | # This program is free software: you can redistribute it and/or modify | ||
1441 | 7 | # it under the terms of the GNU General Public License version 3 as | ||
1442 | 8 | # published by the Free Software Foundation. | ||
1443 | 9 | # | ||
1444 | 10 | # This program is distributed in the hope that it will be useful, | ||
1445 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1446 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1447 | 13 | # GNU General Public License for more details. | ||
1448 | 14 | # | ||
1449 | 15 | # You should have received a copy of the GNU General Public License | ||
1450 | 16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1451 | 17 | # | ||
1452 | 18 | |||
1453 | 19 | # | ||
1454 | 20 | # Little helper program to test that all source files import | ||
1455 | 21 | # versions we want | ||
1456 | 22 | # | ||
1457 | 23 | # Usage: check_imports.py directory [ignore_prefix] | ||
1458 | 24 | # | ||
1459 | 25 | # The directory specifies the (recursive) location of the source files. Any | ||
1460 | 26 | # files with a path that starts with ignore_prefix are not checked. This is | ||
1461 | 27 | # useful to exclude files that are generated into the build directory. | ||
1462 | 28 | # | ||
1463 | 29 | # See the file_pat definition below for a list of files that are checked. | ||
1464 | 30 | # | ||
1465 | 31 | |||
1466 | 32 | from __future__ import print_function | ||
1467 | 33 | |||
1468 | 34 | import argparse | ||
1469 | 35 | import os | ||
1470 | 36 | import re | ||
1471 | 37 | import sys | ||
1472 | 38 | |||
1473 | 39 | |||
1474 | 40 | # Print msg on stderr, preceded by program name and followed by newline | ||
1475 | 41 | def error(msg): | ||
1476 | 42 | print(os.path.basename(sys.argv[0]) + ": " + msg, file=sys.stderr) | ||
1477 | 43 | |||
1478 | 44 | |||
1479 | 45 | # Function to raise errors encountered by os.walk | ||
1480 | 46 | def raise_error(e): | ||
1481 | 47 | raise e | ||
1482 | 48 | |||
1483 | 49 | # Qt Quick patterns | ||
1484 | 50 | # If you increase this make sure you increase | ||
1485 | 51 | # the Qt version in debian/control and in CMakeLists.txt | ||
1486 | 52 | quick_pat = re.compile(r'.*import QtQuick.*$') | ||
1487 | 53 | quick_good_pat = re.compile(r'.*import QtQuick 2\.4.*$') | ||
1488 | 54 | quick_layouts_good_pat = re.compile(r'.*import QtQuick.Layouts 1\.1.*$') | ||
1489 | 55 | quick_window_good_pat = re.compile(r'.*import QtQuick.Window 2\.2.*$') | ||
1490 | 56 | |||
1491 | 57 | # Ubuntu Components patterns | ||
1492 | 58 | ubuntu_components_pat = re.compile(r'.*import Ubuntu.Components.*') | ||
1493 | 59 | ubuntu_good_components_pat = re.compile(r'.*import Ubuntu.Components.*1\.3.*') | ||
1494 | 60 | |||
1495 | 61 | def scan_for_bad_import(file_path, all_pat, good_pats): | ||
1496 | 62 | errors = [] | ||
1497 | 63 | with open(file_path, 'rt', encoding='utf-8') as ifile: | ||
1498 | 64 | for lino, line in enumerate(ifile, start=1): | ||
1499 | 65 | if all_pat.match(line): | ||
1500 | 66 | good_found = False | ||
1501 | 67 | for good_pat in good_pats: | ||
1502 | 68 | if good_pat.match(line): | ||
1503 | 69 | good_found = True | ||
1504 | 70 | if not good_found: | ||
1505 | 71 | errors.append(lino) | ||
1506 | 72 | if 0 < len(errors) <= 10: | ||
1507 | 73 | if len(errors) > 1: | ||
1508 | 74 | plural = 's' | ||
1509 | 75 | else: | ||
1510 | 76 | plural = '' | ||
1511 | 77 | print( | ||
1512 | 78 | "%s: bad import version in line%s %s" % ( | ||
1513 | 79 | file_path, plural, ", ".join((str(i) for i in errors)))) | ||
1514 | 80 | elif errors: | ||
1515 | 81 | print("%s: bad import version in multiple lines" % file_path) | ||
1516 | 82 | return bool(errors) | ||
1517 | 83 | |||
1518 | 84 | # Parse args | ||
1519 | 85 | |||
1520 | 86 | parser = argparse.ArgumentParser( | ||
1521 | 87 | description='Test that source files contain the wanted import version.') | ||
1522 | 88 | parser.add_argument( | ||
1523 | 89 | 'dir', nargs=1, | ||
1524 | 90 | help='The directory to (recursively) search for source files') | ||
1525 | 91 | parser.add_argument( | ||
1526 | 92 | 'ignore_prefix', nargs='?', default=None, | ||
1527 | 93 | help='Ignore source files with a path that starts with the given prefix.') | ||
1528 | 94 | args = parser.parse_args() | ||
1529 | 95 | |||
1530 | 96 | # Files we want to check for import version. | ||
1531 | 97 | |||
1532 | 98 | file_pat = ( | ||
1533 | 99 | r'(.*\.(js|qml)$)') | ||
1534 | 100 | pat = re.compile(file_pat) | ||
1535 | 101 | |||
1536 | 102 | # Find all the files with matching file extension in the specified | ||
1537 | 103 | # directory and check them | ||
1538 | 104 | |||
1539 | 105 | directory = os.path.abspath(args.dir[0]) | ||
1540 | 106 | ignore = args.ignore_prefix and os.path.abspath(args.ignore_prefix) or None | ||
1541 | 107 | |||
1542 | 108 | found_bad_import = False | ||
1543 | 109 | try: | ||
1544 | 110 | for root, dirs, files in os.walk(directory, onerror=raise_error): | ||
1545 | 111 | for file in files: | ||
1546 | 112 | path = os.path.join(root, file) | ||
1547 | 113 | if not (ignore and path.startswith(ignore)) and pat.match(file): | ||
1548 | 114 | quick_good_pats = [quick_good_pat, quick_layouts_good_pat, quick_window_good_pat] | ||
1549 | 115 | if scan_for_bad_import(path, quick_pat, quick_good_pats): | ||
1550 | 116 | found_bad_import = True | ||
1551 | 117 | if scan_for_bad_import(path, ubuntu_components_pat, [ubuntu_good_components_pat]): | ||
1552 | 118 | found_bad_import = True | ||
1553 | 119 | |||
1554 | 120 | except OSError as e: | ||
1555 | 121 | error("cannot create file list for \"" + dir + "\": " + e.strerror) | ||
1556 | 122 | sys.exit(1) | ||
1557 | 123 | |||
1558 | 124 | if found_bad_import: | ||
1559 | 125 | sys.exit(1) | ||
1560 | 0 | 126 | ||
1561 | === modified file 'tests/qmltests/CMakeLists.txt' | |||
1562 | --- tests/qmltests/CMakeLists.txt 2016-03-09 14:04:14 +0000 | |||
1563 | +++ tests/qmltests/CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
1564 | @@ -1,42 +1,30 @@ | |||
1607 | 1 | # add_qml_test macro | 1 | add_usc_qmltest(Components Calendar) |
1608 | 2 | include(QmlTest) | 2 | add_usc_qmltest(Components ServerPropertySynchroniser) |
1609 | 3 | 3 | add_usc_qmltest(Components StatusIcon) | |
1610 | 4 | set(qmltest_DEFAULT_TARGETS qmluitests) | 4 | |
1611 | 5 | set(qmltest_DEFAULT_NO_ADD_TEST TRUE) | 5 | add_usc_qmltest(Menus AccessPointMenu) |
1612 | 6 | set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C") | 6 | add_usc_qmltest(Menus ButtonMenu) |
1613 | 7 | 7 | add_usc_qmltest(Menus CalendarMenu) | |
1614 | 8 | set(qmltest_DEFAULT_IMPORT_PATHS | 8 | add_usc_qmltest(Menus CheckableMenu) |
1615 | 9 | ${CMAKE_BINARY_DIR}/plugins | 9 | add_usc_qmltest(Menus EventMenu) |
1616 | 10 | ${CMAKE_BINARY_DIR}/tests/utils/modules | 10 | add_usc_qmltest(Menus GroupedMessageMenu) |
1617 | 11 | ) | 11 | add_usc_qmltest(Menus MediaPlayerMenu) |
1618 | 12 | 12 | add_usc_qmltest(Menus PlaybackItemMenu) | |
1619 | 13 | add_qml_test(Components Calendar) | 13 | add_usc_qmltest(Menus ProgressBarMenu) |
1620 | 14 | add_qml_test(Components ServerPropertySynchroniser) | 14 | add_usc_qmltest(Menus ProgressValueMenu) |
1621 | 15 | add_qml_test(Components StatusIcon) | 15 | add_usc_qmltest(Menus SectionMenu) |
1622 | 16 | 16 | add_usc_qmltest(Menus SimpleMessageMenu) | |
1623 | 17 | add_qml_test(Menus AccessPointMenu) | 17 | add_usc_qmltest(Menus SliderMenu) |
1624 | 18 | add_qml_test(Menus ButtonMenu) | 18 | add_usc_qmltest(Menus SnapDecisionMenu) |
1625 | 19 | add_qml_test(Menus CalendarMenu) | 19 | add_usc_qmltest(Menus SwitchMenu) |
1626 | 20 | add_qml_test(Menus CheckableMenu) | 20 | add_usc_qmltest(Menus UserSessionMenu) |
1627 | 21 | add_qml_test(Menus EventMenu) | 21 | add_usc_qmltest(Menus TextMessageMenu) |
1628 | 22 | add_qml_test(Menus GroupedMessageMenu) | 22 | add_usc_qmltest(Menus TimeZoneMenu) |
1629 | 23 | add_qml_test(Menus MediaPlayerMenu) | 23 | add_usc_qmltest(Menus TransferMenu) |
1630 | 24 | add_qml_test(Menus PlaybackItemMenu) | 24 | |
1631 | 25 | add_qml_test(Menus ProgressBarMenu) | 25 | add_usc_qmltest(Vpn VpnList) |
1632 | 26 | add_qml_test(Menus ProgressValueMenu) | 26 | add_usc_qmltest(Vpn VpnEditor) |
1633 | 27 | add_qml_test(Menus SectionMenu) | 27 | add_usc_qmltest(Vpn VpnOpenvpnEditor) |
1634 | 28 | add_qml_test(Menus SimpleMessageMenu) | 28 | add_usc_qmltest(Vpn VpnPptpEditor) |
1635 | 29 | add_qml_test(Menus SliderMenu) | 29 | add_usc_qmltest(Vpn VpnPreviewDialogCertificateChecks) |
1636 | 30 | add_qml_test(Menus SnapDecisionMenu) | 30 | add_usc_qmltest(Vpn VpnPreviewDialog ENVIRONMENT NO_SSL_CERTIFICATE_CHECK=1) |
1595 | 31 | add_qml_test(Menus SwitchMenu) | ||
1596 | 32 | add_qml_test(Menus UserSessionMenu) | ||
1597 | 33 | add_qml_test(Menus TextMessageMenu) | ||
1598 | 34 | add_qml_test(Menus TimeZoneMenu) | ||
1599 | 35 | add_qml_test(Menus TransferMenu) | ||
1600 | 36 | |||
1601 | 37 | add_qml_test(Vpn VpnList) | ||
1602 | 38 | add_qml_test(Vpn VpnEditor) | ||
1603 | 39 | add_qml_test(Vpn VpnOpenvpnEditor) | ||
1604 | 40 | add_qml_test(Vpn VpnPptpEditor) | ||
1605 | 41 | add_qml_test(Vpn VpnPreviewDialogCertificateChecks) | ||
1606 | 42 | add_qml_test(Vpn VpnPreviewDialog ENVIRONMENT NO_SSL_CERTIFICATE_CHECK=1) | ||
1637 | 43 | 31 | ||
1638 | === modified file 'tests/utils/modules/CMakeLists.txt' | |||
1639 | --- tests/utils/modules/CMakeLists.txt 2013-10-04 10:10:47 +0000 | |||
1640 | +++ tests/utils/modules/CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
1641 | @@ -1,1 +1,3 @@ | |||
1642 | 1 | include(QmlPlugins) | ||
1643 | 2 | |||
1644 | 1 | add_subdirectory(Ubuntu) | 3 | add_subdirectory(Ubuntu) |
1645 | 2 | 4 | ||
1646 | === modified file 'tests/utils/modules/Ubuntu/Test/CMakeLists.txt' | |||
1647 | --- tests/utils/modules/Ubuntu/Test/CMakeLists.txt 2013-10-04 10:52:27 +0000 | |||
1648 | +++ tests/utils/modules/Ubuntu/Test/CMakeLists.txt 2016-03-24 12:20:44 +0000 | |||
1649 | @@ -1,27 +1,21 @@ | |||
1651 | 1 | add_definitions(-DQT_NO_KEYWORDS) | 1 | include_directories( |
1652 | 2 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | ||
1653 | 3 | ) | ||
1654 | 2 | 4 | ||
1656 | 3 | set(UbuntuTestQML_SOURCES | 5 | add_library(UbuntuTestQml MODULE |
1657 | 4 | testutil.cpp | 6 | testutil.cpp |
1658 | 5 | plugin.cpp | 7 | plugin.cpp |
1659 | 6 | TouchEventSequenceWrapper.cpp | 8 | TouchEventSequenceWrapper.cpp |
1660 | 7 | ) | 9 | ) |
1661 | 8 | 10 | ||
1677 | 9 | include_directories( | 11 | target_link_libraries(UbuntuTestQml |
1678 | 10 | ${CMAKE_CURRENT_SOURCE_DIR} | 12 | Qt5::Core |
1679 | 11 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} | 13 | Qt5::Quick |
1680 | 12 | ) | 14 | Qt5::Test |
1666 | 13 | |||
1667 | 14 | add_library(UbuntuTestQml MODULE ${UbuntuTestQML_SOURCES}) | ||
1668 | 15 | |||
1669 | 16 | qt5_use_modules(UbuntuTestQml Core Quick Test) | ||
1670 | 17 | |||
1671 | 18 | # copy qml files into build directory for shadow builds | ||
1672 | 19 | file(GLOB QML_JS_FILES *.js *.qml qmldir) | ||
1673 | 20 | |||
1674 | 21 | add_custom_target(UbuntuTestQmlJsFiles ALL | ||
1675 | 22 | COMMAND cp ${QML_JS_FILES} ${CMAKE_CURRENT_BINARY_DIR} | ||
1676 | 23 | DEPENDS ${QML_JS_FILES} | ||
1681 | 24 | ) | 15 | ) |
1682 | 25 | 16 | ||
1683 | 17 | export_qmlfiles(Ubuntu.Test Ubuntu/Test NO_INSTALL) | ||
1684 | 18 | export_qmlplugin(Ubuntu.Test 0.1 Ubuntu/Test TARGETS UbuntuTestQml NO_INSTALL) | ||
1685 | 19 | |||
1686 | 26 | add_custom_target(UbuntuTest) | 20 | add_custom_target(UbuntuTest) |
1688 | 27 | add_dependencies(UbuntuTest UbuntuTestQml UbuntuTestQmlJsFiles) | 21 | add_dependencies(UbuntuTest UbuntuTestQml Ubuntu.Test-qmlfiles) |
1689 | 28 | 22 | ||
1690 | === added file 'tests/utils/modules/Ubuntu/Test/Test.qmltypes' | |||
1691 | --- tests/utils/modules/Ubuntu/Test/Test.qmltypes 1970-01-01 00:00:00 +0000 | |||
1692 | +++ tests/utils/modules/Ubuntu/Test/Test.qmltypes 2016-03-24 12:20:44 +0000 | |||
1693 | @@ -0,0 +1,124 @@ | |||
1694 | 1 | import QtQuick.tooling 1.2 | ||
1695 | 2 | |||
1696 | 3 | // This file describes the plugin-supplied types contained in the library. | ||
1697 | 4 | // It is used for QML tooling purposes only. | ||
1698 | 5 | // | ||
1699 | 6 | // This file was auto-generated by: | ||
1700 | 7 | // 'qmlplugindump -notrelocatable Ubuntu.Test 0.1 tests/utils/modules' | ||
1701 | 8 | |||
1702 | 9 | Module { | ||
1703 | 10 | dependencies: [ | ||
1704 | 11 | "QtFeedback 5.0", | ||
1705 | 12 | "QtGraphicalEffects 1.0", | ||
1706 | 13 | "QtQml 2.0", | ||
1707 | 14 | "QtQuick 2.4", | ||
1708 | 15 | "QtQuick.Layouts 1.1", | ||
1709 | 16 | "QtQuick.Window 2.2", | ||
1710 | 17 | "QtTest 1.1", | ||
1711 | 18 | "Ubuntu.Components 1.3", | ||
1712 | 19 | "Ubuntu.Components.ListItems 1.3", | ||
1713 | 20 | "Ubuntu.Components.Popups 1.3", | ||
1714 | 21 | "Ubuntu.Components.Styles 1.3", | ||
1715 | 22 | "Ubuntu.Components.Themes 1.3", | ||
1716 | 23 | "Ubuntu.Components.Themes.Ambiance 1.3", | ||
1717 | 24 | "Ubuntu.PerformanceMetrics 1.0", | ||
1718 | 25 | "com.canonical.Oxide 1.9" | ||
1719 | 26 | ] | ||
1720 | 27 | Component { | ||
1721 | 28 | name: "TestUtil" | ||
1722 | 29 | prototype: "QObject" | ||
1723 | 30 | exports: ["Ubuntu.Test/Util 0.1"] | ||
1724 | 31 | isCreatable: false | ||
1725 | 32 | isSingleton: true | ||
1726 | 33 | exportMetaObjectRevisions: [0] | ||
1727 | 34 | Method { | ||
1728 | 35 | name: "isInstanceOf" | ||
1729 | 36 | type: "bool" | ||
1730 | 37 | Parameter { type: "QObject"; isPointer: true } | ||
1731 | 38 | Parameter { type: "string" } | ||
1732 | 39 | } | ||
1733 | 40 | Method { name: "touchEvent"; type: "TouchEventSequenceWrapper*" } | ||
1734 | 41 | } | ||
1735 | 42 | Component { | ||
1736 | 43 | name: "TouchEventSequenceWrapper" | ||
1737 | 44 | prototype: "QObject" | ||
1738 | 45 | exports: ["Ubuntu.Test/TouchEventSequence 0.1"] | ||
1739 | 46 | isCreatable: false | ||
1740 | 47 | exportMetaObjectRevisions: [0] | ||
1741 | 48 | Method { | ||
1742 | 49 | name: "commit" | ||
1743 | 50 | Parameter { name: "processEvents"; type: "bool" } | ||
1744 | 51 | } | ||
1745 | 52 | Method { name: "commit" } | ||
1746 | 53 | Method { | ||
1747 | 54 | name: "move" | ||
1748 | 55 | Parameter { name: "touchId"; type: "int" } | ||
1749 | 56 | Parameter { name: "x"; type: "int" } | ||
1750 | 57 | Parameter { name: "y"; type: "int" } | ||
1751 | 58 | } | ||
1752 | 59 | Method { | ||
1753 | 60 | name: "press" | ||
1754 | 61 | Parameter { name: "touchId"; type: "int" } | ||
1755 | 62 | Parameter { name: "x"; type: "int" } | ||
1756 | 63 | Parameter { name: "y"; type: "int" } | ||
1757 | 64 | } | ||
1758 | 65 | Method { | ||
1759 | 66 | name: "release" | ||
1760 | 67 | Parameter { name: "touchId"; type: "int" } | ||
1761 | 68 | Parameter { name: "x"; type: "int" } | ||
1762 | 69 | Parameter { name: "y"; type: "int" } | ||
1763 | 70 | } | ||
1764 | 71 | Method { | ||
1765 | 72 | name: "stationary" | ||
1766 | 73 | Parameter { name: "touchId"; type: "int" } | ||
1767 | 74 | } | ||
1768 | 75 | } | ||
1769 | 76 | Component { | ||
1770 | 77 | prototype: "Palette_QMLTYPE_2" | ||
1771 | 78 | name: "Palette" | ||
1772 | 79 | exports: ["Palette -1.-1"] | ||
1773 | 80 | exportMetaObjectRevisions: [-1] | ||
1774 | 81 | isComposite: true | ||
1775 | 82 | } | ||
1776 | 83 | Component { | ||
1777 | 84 | prototype: "QObject" | ||
1778 | 85 | name: "PaletteValues" | ||
1779 | 86 | exports: ["PaletteValues -1.-1"] | ||
1780 | 87 | exportMetaObjectRevisions: [-1] | ||
1781 | 88 | isComposite: true | ||
1782 | 89 | Property { name: "background"; type: "QColor" } | ||
1783 | 90 | Property { name: "backgroundText"; type: "QColor" } | ||
1784 | 91 | Property { name: "base"; type: "QColor" } | ||
1785 | 92 | Property { name: "baseText"; type: "QColor" } | ||
1786 | 93 | Property { name: "foreground"; type: "QColor" } | ||
1787 | 94 | Property { name: "foregroundText"; type: "QColor" } | ||
1788 | 95 | Property { name: "overlay"; type: "QColor" } | ||
1789 | 96 | Property { name: "overlayText"; type: "QColor" } | ||
1790 | 97 | Property { name: "field"; type: "QColor" } | ||
1791 | 98 | Property { name: "fieldText"; type: "QColor" } | ||
1792 | 99 | Property { name: "selection"; type: "QColor" } | ||
1793 | 100 | } | ||
1794 | 101 | Component { | ||
1795 | 102 | prototype: "QObject" | ||
1796 | 103 | name: "UbuntuColors" | ||
1797 | 104 | exports: ["UbuntuColors -1.-1"] | ||
1798 | 105 | exportMetaObjectRevisions: [-1] | ||
1799 | 106 | isComposite: true | ||
1800 | 107 | isCreatable: false | ||
1801 | 108 | isSingleton: true | ||
1802 | 109 | Property { name: "orange"; type: "QColor"; isReadonly: true } | ||
1803 | 110 | Property { name: "lightAubergine"; type: "QColor"; isReadonly: true } | ||
1804 | 111 | Property { name: "midAubergine"; type: "QColor"; isReadonly: true } | ||
1805 | 112 | Property { name: "darkAubergine"; type: "QColor"; isReadonly: true } | ||
1806 | 113 | Property { name: "warmGrey"; type: "QColor"; isReadonly: true } | ||
1807 | 114 | Property { name: "coolGrey"; type: "QColor"; isReadonly: true } | ||
1808 | 115 | Property { name: "orangeGradient"; type: "QQuickGradient"; isPointer: true } | ||
1809 | 116 | Property { name: "greyGradient"; type: "QQuickGradient"; isPointer: true } | ||
1810 | 117 | Property { name: "lightGrey"; type: "QColor"; isReadonly: true } | ||
1811 | 118 | Property { name: "darkGrey"; type: "QColor"; isReadonly: true } | ||
1812 | 119 | Property { name: "red"; type: "QColor"; isReadonly: true } | ||
1813 | 120 | Property { name: "green"; type: "QColor"; isReadonly: true } | ||
1814 | 121 | Property { name: "blue"; type: "QColor"; isReadonly: true } | ||
1815 | 122 | Property { name: "purple"; type: "QColor"; isReadonly: true } | ||
1816 | 123 | } | ||
1817 | 124 | } |
PASSED: Continuous integration, rev:115 /unity8- jenkins. ubuntu. com/job/ lp-ubuntu- settings- components- 1-ci/7/
https:/
Executed test runs:
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-ubuntu- settings- components- 1-ci/7/ rebuild
https:/