Merge lp:~saviq/ubuntu-settings-components/packaging-cleanup into lp:ubuntu-settings-components

Proposed by Michał Sawicz
Status: Superseded
Proposed branch: lp:~saviq/ubuntu-settings-components/packaging-cleanup
Merge into: lp:ubuntu-settings-components
Diff against target: 1889 lines (+614/-869)
36 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 (+7/-0)
debian/control (+23/-10)
debian/qml-module-ubuntu-settings-components.install (+5/-0)
debian/rules (+2/-0)
debian/tests/control (+4/-0)
debian/tests/qmluitests.sh (+9/-0)
examples/Fingerprint.qml (+1/-1)
plugins/Ubuntu/Settings/Components/CMakeLists.txt (+5/-8)
plugins/Ubuntu/Settings/Components/Calendar.qml (+4/-4)
plugins/Ubuntu/Settings/Components/Components.qmltypes (+0/-73)
plugins/Ubuntu/Settings/Components/serverpropertysynchroniser.cpp (+0/-1)
plugins/Ubuntu/Settings/Menus/CMakeLists.txt (+6/-14)
plugins/Ubuntu/Settings/Menus/Menus.qmltypes (+0/-30)
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 (+34/-46)
tests/qmltests/Components/tst_Calendar.qml (+5/-3)
tests/qmltests/Fingerprint/tst_FingerprintNames.qml (+1/-1)
tests/qmltests/Fingerprint/tst_FingerprintSetup.qml (+2/-2)
tests/qmltests/Fingerprint/tst_Fingerprints.qml (+4/-4)
tests/qmltests/mocks/Biometryd/CMakeLists.txt (+6/-4)
tests/qmltests/mocks/CMakeLists.txt (+2/-2)
tests/qmltests/mocks/GSettings.1.0/CMakeLists.txt (+6/-7)
tests/utils/modules/CMakeLists.txt (+2/-0)
tests/utils/modules/Ubuntu/Test/CMakeLists.txt (+12/-18)
To merge this branch: bzr merge lp:~saviq/ubuntu-settings-components/packaging-cleanup
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Michael Terry Pending
Nick Dedekind Pending
PS Jenkins bot continuous-integration Pending
Review via email: mp+303110@code.launchpad.net

This proposal has been superseded by a proposal from 2016-08-17.

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
add an import version checker (UITK hates it when you mix 1.2 and 1.3)
add autopkgtest running the qml UI tests

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:129
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/47/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2567
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1391
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1391
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1391
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2595
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2475
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2475
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2475
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2469/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2469
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2469/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/47/rebuild

review: Needs Fixing (continuous-integration)
130. By Michał Sawicz

Rename install file

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:130
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/48/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2568/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2596
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2476
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2476
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2476
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2470/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2470/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/48/rebuild

review: Needs Fixing (continuous-integration)
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

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:133
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/50/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2571/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2599
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2479
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2479
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2479
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2473/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2473/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/50/rebuild

review: Needs Fixing (continuous-integration)
135. By Michał Sawicz

Add missing thumbnailer dep and transition to qml-module-* dependencies

136. By Michał Sawicz

wrap-and-sort -at

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:134
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/51/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2572
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1393
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1393
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1393
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2600
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2480
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2480
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2480
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2474/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2474
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2474/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/51/rebuild

review: Needs Fixing (continuous-integration)
137. By Michał Sawicz

Add missing dependency on folderlistmodel

138. By Michał Sawicz

Fix test suite names

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:136
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/52/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2573
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1394
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1394
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1394
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2601
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2481
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2481
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2481
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2475/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2475
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2475/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/52/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:138
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/54/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2575/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2603
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2483
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2483
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2483
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2477/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2477/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/54/rebuild

review: Needs Fixing (continuous-integration)
139. By Michał Sawicz

Fix tst_Fingerprints.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

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:140
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/55/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2576/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2604
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2484
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2484
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2484
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2478/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2478/console

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-ubuntu-settings-components-ci/55/rebuild

review: Needs Fixing (continuous-integration)
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

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: