Merge lp:~mzanetti/unity8/make-xvfbtestSomething into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 785
Merged at revision: 813
Proposed branch: lp:~mzanetti/unity8/make-xvfbtestSomething
Merge into: lp:unity8
Prerequisite: lp:~mzanetti/unity8/make-single-testfunction
Diff against target: 208 lines (+72/-43)
7 files modified
build (+1/-0)
cmake/modules/QmlTest.cmake (+64/-19)
tests/CMakeLists.txt (+2/-2)
tests/plugins/Ubuntu/Gestures/CMakeLists.txt (+2/-11)
tests/qmltests/CMakeLists.txt (+0/-1)
tests/qmltests/Components/CMakeLists.txt (+2/-10)
tests/qmltests/Components/tst_LazyImage.qml (+1/-0)
To merge this branch: bzr merge lp:~mzanetti/unity8/make-xvfbtestSomething
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Michał Sawicz Needs Fixing
Andrea Cimitan Pending
Review via email: mp+211573@code.launchpad.net

This proposal supersedes a proposal from 2014-03-18.

Commit message

add "make xvfbtestSomething" target to run qml tests in xvfb

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote : Posted in a previous version of this proposal

I think we need to make xvfb optional in ./build, otherwise it might not work on the devices without X (like mobile)

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote : Posted in a previous version of this proposal

> I think we need to make xvfb optional in ./build, otherwise it might not work
> on the devices without X (like mobile)

this is only installed with ./build -s. For running on the device you should use ./run_on_device -s

Revision history for this message
Andrea Cimitan (cimi) : Posted in a previous version of this proposal
review: Abstain
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

You need NO_ADD_TEST for non-ui tests:

11/26 Test #11: testUnityTest ............................ Passed 0.18 sec
12/26 Test #12: xvfbtestUnityTest ........................***Failed 0.01 sec
/usr/bin/env: xvfb-run: No such file or directory

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1

Ah, this won't work outside of amd64... Not sure if we should try and make it work across the board or just warn about it somewhere.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

set(xfvbtestCommand... could use abstracting

review: Needs Fixing
781. By Michael Zanetti

always add NO_ADD_TEST to xvfb target

782. By Michael Zanetti

abstract binary qml test targets into add_binary_qml_test macro

783. By Michael Zanetti

make it a bit more generic

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> You need NO_ADD_TEST for non-ui tests:
>
> 11/26 Test #11: testUnityTest ............................ Passed 0.18
> sec
> 12/26 Test #12: xvfbtestUnityTest ........................***Failed 0.01
> sec
> /usr/bin/env: xvfb-run: No such file or directory

fixed

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> LD_PRELOAD=/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
>
> Ah, this won't work outside of amd64... Not sure if we should try and make it
> work across the board or just warn about it somewhere.

fixed. Calling gcc -dumpmachine to determine arch-triplet.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> set(xfvbtestCommand... could use abstracting

ack. abstracted into add_binary_qmltest macro

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:781
http://jenkins.qa.ubuntu.com/job/unity8-ci/2590/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4141
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3725/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1460
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1111
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1115
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1115/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1111
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3606
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4205
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4205/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3727
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3727/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6034/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5076

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2590/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:783
http://jenkins.qa.ubuntu.com/job/unity8-ci/2591/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4142
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3726
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1461
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1112
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1116
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1116/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1112
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3607
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4206
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4206/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3728
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3728/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6035
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5077

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2591/rebuild

review: Needs Fixing (continuous-integration)
784. By Michael Zanetti

set LD_LIBRARY_PATH conditionally, depending on the availability of gcc

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:784
http://jenkins.qa.ubuntu.com/job/unity8-ci/2619/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4224
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3808/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1489
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1140
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1144
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1144/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1140
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3665
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4297
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4297/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3810
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3810/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6103/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5179

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2619/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/qmltests/CMakeLists.txt

review: Needs Fixing
785. By Michael Zanetti

merge trunk

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> Text conflict in tests/qmltests/CMakeLists.txt

fixed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:785
http://jenkins.qa.ubuntu.com/job/unity8-ci/2711/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4453/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4053/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1581
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1232
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1236
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1236/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1232
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3849/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4559
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4559/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4086
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4086/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6307/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5554

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2711/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:785
http://jenkins.qa.ubuntu.com/job/unity8-ci/2712/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4458/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4058
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1582
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1233
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1237
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1237/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1233
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3851/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4564
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4564/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4091
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4091/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6311
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5559

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2712/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

We have now lost the hability to run all qmluitests without xvfb, previously you achieved that by doing

make qmluitests

but that now runs the xvfb variants, i wonder if it would make sense to keep the behaviour of

make qmluitests as it was

and then introduce

make xvfbqmluitests

that runs the xvfb variant

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

I think it's fine as is, we don't want to encourage running them outside of xvfb, other than for debugging, when you run only one test/suite at a time.

We'll be running them under xvfb during CI as well, so that we have as close an env locally.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Ok :-)

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes, tests, run

* Did CI run pass? If not, please explain why.
No, some tests are broken, being fixed in a different MR

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build'
2--- build 2014-04-01 22:56:02 +0000
3+++ build 2014-04-02 12:13:20 +0000
4@@ -54,6 +54,7 @@
5 unity-scope-home \
6 unity-lens-applications \
7 unity-plugin-scopes \
8+ xvfb \
9 || exit 5
10 }
11
12
13=== modified file 'cmake/modules/QmlTest.cmake'
14--- cmake/modules/QmlTest.cmake 2014-03-28 00:32:46 +0000
15+++ cmake/modules/QmlTest.cmake 2014-04-02 12:13:20 +0000
16@@ -65,6 +65,7 @@
17 cmake_parse_arguments(qmltest "${options}" "" "${multi_value_keywords}" ${ARGN})
18
19 set(qmltest_TARGET test${COMPONENT_NAME})
20+ set(qmltest_xvfb_TARGET xvfbtest${COMPONENT_NAME})
21 set(qmltest_FILE ${SUBPATH}/tst_${COMPONENT_NAME})
22
23 set(qmltestrunner_imports "")
24@@ -82,24 +83,69 @@
25
26 string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_lower)
27 if(cmake_generator_lower STREQUAL "unix makefiles")
28- set(qmltest_command
29- env ${qmltest_ENVIRONMENT}
30- ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
31- ${qmltestrunner_imports}
32- -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml
33- -o -,txt
34- $(FUNCTION)
35- )
36+ set(function_ARGS $(FUNCTION))
37 else()
38- set(qmltest_command
39- env ${qmltest_ENVIRONMENT}
40- ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
41- ${qmltestrunner_imports}
42- -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml
43- -o -,txt
44- )
45- endif()
46-
47+ set(function_ARGS "")
48+ endif()
49+
50+ set(qmltest_command
51+ env ${qmltest_ENVIRONMENT}
52+ ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
53+ ${qmltestrunner_imports}
54+ -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml
55+ -o -,txt
56+ ${function_ARGS}
57+ )
58+ find_program( HAVE_GCC gcc )
59+ if (NOT ${HAVE_GCC} STREQUAL "")
60+ exec_program( gcc ARGS "-dumpmachine" OUTPUT_VARIABLE ARCH_TRIPLET )
61+ set(LD_PRELOAD_PATH "LD_PRELOAD=/usr/lib/${ARCH_TRIPLET}/mesa/libGL.so.1")
62+ endif()
63+ set(qmltest_xvfb_command
64+ env ${qmltest_ENVIRONMENT} ${LD_PRELOAD_PATH}
65+ xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum
66+ ${qmltestrunner_exe} -input ${CMAKE_CURRENT_SOURCE_DIR}/${qmltest_FILE}.qml
67+ ${qmltestrunner_imports}
68+ -o ${CMAKE_BINARY_DIR}/${qmltest_TARGET}.xml,xunitxml
69+ -o -,txt
70+ ${function_ARGS}
71+ )
72+
73+ add_qmltest_target(${qmltest_TARGET} "${qmltest_command}" TRUE ${qmltest_NO_ADD_TEST})
74+ add_qmltest_target(${qmltest_xvfb_TARGET} "${qmltest_xvfb_command}" ${qmltest_NO_TARGETS} TRUE)
75+ add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN})
76+endmacro(add_qml_test)
77+
78+macro(add_binary_qml_test CLASS_NAME LD_PATH DEPS)
79+ set(testCommand
80+ LD_LIBRARY_PATH=${LD_PATH}
81+ ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec
82+ -o ${CMAKE_BINARY_DIR}/${CLASSNAME}Test.xml,xunitxml
83+ -o -,txt)
84+
85+ add_qmltest_target(test${CLASS_NAME} "${testCommand}" FALSE TRUE)
86+ add_dependencies(test${CLASS_NAME} ${CLASS_NAME}TestExec ${DEPS})
87+
88+ find_program( HAVE_GCC gcc )
89+ if (NOT ${HAVE_GCC} STREQUAL "")
90+ exec_program( gcc ARGS "-dumpmachine" OUTPUT_VARIABLE ARCH_TRIPLET )
91+ set(LD_PRELOAD_PATH "LD_PRELOAD=/usr/lib/${ARCH_TRIPLET}/mesa/libGL.so.1")
92+ endif()
93+ set(xvfbtestCommand
94+ ${LD_PRELOAD_PATH}
95+ LD_LIBRARY_PATH=${LD_PATH}
96+ xvfb-run --server-args "-screen 0 1024x768x24" --auto-servernum
97+ ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_NAME}TestExec
98+ -o ${CMAKE_BINARY_DIR}/${CLASS_NAME}Test.xml,xunitxml
99+ -o -,txt)
100+
101+ add_qmltest_target(xvfbtest${CLASS_NAME} "${xvfbtestCommand}" FALSE TRUE)
102+ add_dependencies(qmluitests xvfbtest${CLASS_NAME})
103+
104+ add_manual_qml_test(. ${CLASS_NAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
105+endmacro(add_binary_qml_test)
106+
107+macro(add_qmltest_target qmltest_TARGET qmltest_command qmltest_NO_TARGETS qmltest_NO_ADD_TEST)
108 add_custom_target(${qmltest_TARGET} ${qmltest_command})
109
110 if(NOT "${qmltest_PROPERTIES}" STREQUAL "")
111@@ -130,5 +176,4 @@
112 endif()
113 endif("${qmltest_NO_TARGETS}" STREQUAL "FALSE")
114
115- add_manual_qml_test(${SUBPATH} ${COMPONENT_NAME} ${ARGN})
116-endmacro(add_qml_test)
117+endmacro(add_qmltest_target)
118
119=== modified file 'tests/CMakeLists.txt'
120--- tests/CMakeLists.txt 2013-07-04 14:47:47 +0000
121+++ tests/CMakeLists.txt 2014-04-02 12:13:20 +0000
122@@ -1,7 +1,7 @@
123-# QML tests that do not require graphical capabitlies.
124+# QML tests that do not require graphical capabilities.
125 add_custom_target(qmlunittests)
126
127-# QML tests that require graphical capabitlies.
128+# QML tests that require graphical capabilities.
129 add_custom_target(qmluitests)
130
131 add_custom_target(qmltests)
132
133=== modified file 'tests/plugins/Ubuntu/Gestures/CMakeLists.txt'
134--- tests/plugins/Ubuntu/Gestures/CMakeLists.txt 2013-12-17 14:56:25 +0000
135+++ tests/plugins/Ubuntu/Gestures/CMakeLists.txt 2014-04-02 12:13:20 +0000
136@@ -15,20 +15,11 @@
137 add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
138
139 macro(add_gesture_ui_test CLASSNAME)
140- set(testCommand
141- LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
142- ${CMAKE_CURRENT_BINARY_DIR}/${CLASSNAME}TestExec
143- -o ${CMAKE_BINARY_DIR}/${CLASSNAME}Test.xml,xunitxml
144- -o -,txt)
145-
146- add_custom_target(test${CLASSNAME} ${testCommand})
147- add_dependencies(qmluitests test${CLASSNAME})
148- add_dependencies(test${CLASSNAME} ${CLASSNAME}TestExec UbuntuGesturesTestQmlFiles)
149-
150 add_executable(${CLASSNAME}TestExec tst_${CLASSNAME}.cpp GestureTest.cpp)
151 qt5_use_modules(${CLASSNAME}TestExec Test Core Qml Gui Quick)
152 target_link_libraries(${CLASSNAME}TestExec UbuntuGestureQml)
153- add_manual_qml_test(. ${CLASSNAME} IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
154+
155+ add_binary_qml_test(${CLASSNAME} ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures UbuntuGesturesTestQmlFiles)
156 endmacro(add_gesture_ui_test)
157
158 macro(add_gesture_test CLASSNAME)
159
160=== modified file 'tests/qmltests/CMakeLists.txt'
161--- tests/qmltests/CMakeLists.txt 2014-04-01 22:55:28 +0000
162+++ tests/qmltests/CMakeLists.txt 2014-04-02 12:13:20 +0000
163@@ -21,7 +21,6 @@
164
165 add_qml_test(. Shell IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks
166 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
167-add_manual_qml_test(Components DragHandle IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins)
168 add_qml_test(Components Carousel)
169 add_qml_test(Components DraggingArea)
170 add_qml_test(Components EdgeDemoOverlay)
171
172=== modified file 'tests/qmltests/Components/CMakeLists.txt'
173--- tests/qmltests/Components/CMakeLists.txt 2013-12-17 14:56:25 +0000
174+++ tests/qmltests/Components/CMakeLists.txt 2014-04-02 12:13:20 +0000
175@@ -6,19 +6,11 @@
176 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
177 )
178
179-set(testCommand
180- LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures
181- ${CMAKE_CURRENT_BINARY_DIR}/DragHandleTestExec
182- -o ${CMAKE_BINARY_DIR}/DragHandleTest.xml,xunitxml
183- -o -,txt)
184-
185-add_custom_target(testDragHandle ${testCommand})
186-add_dependencies(qmluitests testDragHandle)
187-add_dependencies(testDragHandle DragHandleTestExec)
188-
189 add_executable(DragHandleTestExec tst_DragHandle.cpp)
190 qt5_use_modules(DragHandleTestExec Test Core Qml Gui Quick)
191 target_link_libraries(DragHandleTestExec UbuntuGestureQml)
192
193+add_binary_qml_test(DragHandle ${CMAKE_BINARY_DIR}/plugins/Ubuntu/Gestures "")
194+
195 add_definitions(-DUBUNTU_GESTURES_PLUGIN_DIR="${CMAKE_BINARY_DIR}/plugins")
196 add_definitions(-DTEST_DIR="${CMAKE_CURRENT_LIST_DIR}")
197
198=== modified file 'tests/qmltests/Components/tst_LazyImage.qml'
199--- tests/qmltests/Components/tst_LazyImage.qml 2014-03-21 10:48:42 +0000
200+++ tests/qmltests/Components/tst_LazyImage.qml 2014-04-02 12:13:20 +0000
201@@ -152,6 +152,7 @@
202
203 function test_lazyimage(data) {
204 data.func();
205+ waitForRendering(baseRect);
206
207 if (data.transition) {
208 // wait for the transition to complete

Subscribers

People subscribed via source and target branches