on xenial help sign in
More test fixes
d181cb2Michael Terry
cmake/modules/QmlTest.cmake+2−2
@@ -83,7 +83,7 @@ function(add_qml_test_data PATH COMPONENT_NAME)
83
83
84 if ("${filename}" MATCHES "\\.qml$")
84 if ("${filename}" MATCHES "\\.qml$")
85 file(READ "${filename}" contents)
85 file(READ "${filename}" contents)
86− string(REGEX REPLACE "(\"[./]*/)qml/" "\\1" contents "${contents}")
86+ string(REGEX REPLACE "(\"[./]*)/qml(/|\")" "\\1\\2" contents "${contents}")
87 set(filename "${CMAKE_CURRENT_BINARY_DIR}/${PATH}/${COMPONENT_NAME}")
87 set(filename "${CMAKE_CURRENT_BINARY_DIR}/${PATH}/${COMPONENT_NAME}")
88 file(WRITE "${filename}" "${contents}")
88 file(WRITE "${filename}" "${contents}")
89 endif()
89 endif()
@@ -316,7 +316,7 @@ function(add_test_target TARGET_NAME)
316 # END OF CODE BLOCK --------------------------------------------------
316 # END OF CODE BLOCK --------------------------------------------------
317
317
318 install(FILES "${filename}"
318 install(FILES "${filename}"
319− PERMISSIONS OWNER_EXECUTE OWNER_READ
319+ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
320 GROUP_EXECUTE GROUP_READ
320 GROUP_EXECUTE GROUP_READ
321 WORLD_EXECUTE WORLD_READ
321 WORLD_EXECUTE WORLD_READ
322 DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/scripts"
322 DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/scripts"
tests/CMakeLists.txt+1−1
@@ -132,7 +132,7 @@ function(add_unity8_qmltest_data PATH COMPONENT_NAME)
132endfunction()
132endfunction()
133
133
134
134
135−install(DIRECTORY graphics
135+install(DIRECTORY data graphics
136 DESTINATION "${SHELL_APP_DIR}/tests"
136 DESTINATION "${SHELL_APP_DIR}/tests"
137)
137)
138
138
tests/graphics/screenshots/gallery@12.pngnew file

Binary file not shown.

tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp+3−1
@@ -29,6 +29,8 @@
29
29
30#include "TestItem.h"
30#include "TestItem.h"
31
31
32+#include <paths.h>
33+
32class CandidateItem : public QQuickItem
34class CandidateItem : public QQuickItem
33{
35{
34 Q_OBJECT
36 Q_OBJECT
@@ -96,7 +98,7 @@ void tst_TouchGate::init()
96 touchRegistry = TouchRegistry::instance();
98 touchRegistry = TouchRegistry::instance();
97
99
98 view = createView();
100 view = createView();
99− view->setSource(QUrl::fromLocalFile("touchGateExample.qml"));
101+ view->setSource(QUrl::fromLocalFile(testLibDir() + "/plugins/Ubuntu/Gestures/touchGateExample.qml"));
100 view->show();
102 view->show();
101 QVERIFY(QTest::qWaitForWindowExposed(view));
103 QVERIFY(QTest::qWaitForWindowExposed(view));
102 QVERIFY(view->rootObject() != 0);
104 QVERIFY(view->rootObject() != 0);
tests/plugins/Unity/Session/CMakeLists.txt+3
@@ -17,6 +17,9 @@ target_link_libraries(sessionbackendtestExec
17 unity8-private
17 unity8-private
18 )
18 )
19qt5_use_modules(sessionbackendtestExec Test Core Qml DBus)
19qt5_use_modules(sessionbackendtestExec Test Core Qml DBus)
20+install(TARGETS sessionbackendtestExec
21+ DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Unity/Session"
22+)
20
23
21add_unity8_unittest(SessionBackend dbus-test-runner
24add_unity8_unittest(SessionBackend dbus-test-runner
22 ARG_PREFIX "--parameter"
25 ARG_PREFIX "--parameter"
tests/qmltests/Components/tst_ZoomableImage.qml+1−1
@@ -36,7 +36,7 @@ Rectangle {
36 }
36 }
37
37
38 property var widgetData2: {
38 property var widgetData2: {
39− "source": "../../mocks/Unity/Application/resources/screenshots/gallery@12.png",
39+ "source": Qt.resolvedUrl("../../graphics/screenshots/gallery@12.png"),
40 "zoomable": true
40 "zoomable": true
41 }
41 }
42
42
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml+13−13
@@ -31,31 +31,31 @@ Rectangle {
31
31
32 property var sourcesModel1: {
32 property var sourcesModel1: {
33 "sources": [
33 "sources": [
34− "../../graphics/phone_background.jpg",
34+ Qt.resolvedUrl("../../../../graphics/phone_background.jpg"),
35− "../../graphics/tablet_background.jpg",
35+ Qt.resolvedUrl("../../../../graphics/tablet_background.jpg"),
36− "../../../tests/graphics/clock@18.png",
36+ Qt.resolvedUrl("../../../graphics/clock@18.png"),
37− "../../graphics/borked"
37+ Qt.resolvedUrl("../../../../graphics/borked")
38 ]
38 ]
39 }
39 }
40
40
41 property var sourcesModel1WithFallback: {
41 property var sourcesModel1WithFallback: {
42 "sources": [
42 "sources": [
43− "../../graphics/phone_background.jpg",
43+ Qt.resolvedUrl("../../../../graphics/phone_background.jpg"),
44− "../../graphics/tablet_background.jpg",
44+ Qt.resolvedUrl("../../../../graphics/tablet_background.jpg"),
45− "../../../tests/graphics/clock@18.png",
45+ Qt.resolvedUrl("../../../graphics/clock@18.png"),
46− "../../graphics/borked"
46+ Qt.resolvedUrl("../../../../graphics/borked")
47 ]
47 ]
48− , "fallback": "../../../tests/graphics/clock@18.png"
48+ , "fallback": Qt.resolvedUrl("../../../graphics/clock@18.png")
49 }
49 }
50
50
51 property var sourcesModelEmptyWithFallback: {
51 property var sourcesModelEmptyWithFallback: {
52 "sources": [
52 "sources": [
53− "../../graphics/phone_background.jpg",
53+ Qt.resolvedUrl("../../../../graphics/phone_background.jpg"),
54− "../../graphics/tablet_background.jpg",
54+ Qt.resolvedUrl("../../../../graphics/tablet_background.jpg"),
55− "../../../tests/graphics/clock@18.png",
55+ Qt.resolvedUrl("../../../graphics/clock@18.png"),
56 ""
56 ""
57 ]
57 ]
58− , "fallback": "../../../tests/graphics/clock@18.png"
58+ , "fallback": Qt.resolvedUrl("../../../graphics/clock@18.png")
59 }
59 }
60
60
61 PreviewImageGallery {
61 PreviewImageGallery {
tests/qmltests/Notifications/tst_Notifications.qml+11−11
@@ -76,8 +76,8 @@ Item {
76 "hints": {},
76 "hints": {},
77 "summary": "Cole Raby",
77 "summary": "Cole Raby",
78 "body": "I did not expect it to be <b>that</b> late.",
78 "body": "I did not expect it to be <b>that</b> late.",
79− "icon": "../../tests/graphics/avatars/amanda.png",
79+ "icon": Qt.resolvedUrl("../../graphics/avatars/amanda.png"),
80− "secondaryIcon": "../../tests/graphics/applicationIcons/facebook.png",
80+ "secondaryIcon": Qt.resolvedUrl("../../graphics/applicationIcons/facebook.png"),
81 "rawActions": ["reply_id", "Dummy"]})
81 "rawActions": ["reply_id", "Dummy"]})
82 n.completed.connect(mockModel.onCompleted)
82 n.completed.connect(mockModel.onCompleted)
83 mockModel.append(n)
83 mockModel.append(n)
@@ -90,7 +90,7 @@ Item {
90 "hints": {"x-canonical-non-shaped-icon": "true"},
90 "hints": {"x-canonical-non-shaped-icon": "true"},
91 "summary": "Contacts",
91 "summary": "Contacts",
92 "body": "Synchronised contacts-database &amp; cloud-storage.",
92 "body": "Synchronised contacts-database &amp; cloud-storage.",
93− "icon": "../../tests/graphics/applicationIcons/contacts-app.png",
93+ "icon": Qt.resolvedUrl("../../graphics/applicationIcons/contacts-app.png"),
94 "secondaryIcon": "",
94 "secondaryIcon": "",
95 "rawActions": ["reply_id", "Dummy"]})
95 "rawActions": ["reply_id", "Dummy"]})
96 n.completed.connect(mockModel.onCompleted)
96 n.completed.connect(mockModel.onCompleted)
@@ -104,7 +104,7 @@ Item {
104 "hints": {"x-canonical-non-shaped-icon": "false"},
104 "hints": {"x-canonical-non-shaped-icon": "false"},
105 "summary": "Photo upload completed",
105 "summary": "Photo upload completed",
106 "body": "",
106 "body": "",
107− "icon": "../../tests/graphics/applicationIcons/facebook.png",
107+ "icon": Qt.resolvedUrl("../../graphics/applicationIcons/facebook.png"),
108 "secondaryIcon": "",
108 "secondaryIcon": "",
109 "rawActions": ["reply_id", "Dummy"]})
109 "rawActions": ["reply_id", "Dummy"]})
110 n.completed.connect(mockModel.onCompleted)
110 n.completed.connect(mockModel.onCompleted)
@@ -118,7 +118,7 @@ Item {
118 "hints": {},
118 "hints": {},
119 "summary": "Interactive notification",
119 "summary": "Interactive notification",
120 "body": "This is a notification that can be clicked",
120 "body": "This is a notification that can be clicked",
121− "icon": "../../tests/graphics/avatars/anna_olsson.png",
121+ "icon": Qt.resolvedUrl("../../graphics/avatars/anna_olsson.png"),
122 "secondaryIcon": "",
122 "secondaryIcon": "",
123 "rawActions": ["reply_id", "Dummy"]})
123 "rawActions": ["reply_id", "Dummy"]})
124 n.completed.connect(mockModel.onCompleted)
124 n.completed.connect(mockModel.onCompleted)
@@ -293,7 +293,7 @@ Item {
293 type: Notification.Ephemeral
293 type: Notification.Ephemeral
294 summary: "Photo upload completed"
294 summary: "Photo upload completed"
295 body: ""
295 body: ""
296− icon: "../../tests/graphics/applicationIcons/facebook.png"
296+ icon: Qt.resolvedUrl("../../graphics/applicationIcons/facebook.png")
297 secondaryIcon: ""
297 secondaryIcon: ""
298 value: 0
298 value: 0
299 rawActions: []
299 rawActions: []
@@ -307,7 +307,7 @@ Item {
307 summary: "New comment successfully published"
307 summary: "New comment successfully published"
308 body: ""
308 body: ""
309 icon: ""
309 icon: ""
310− secondaryIcon: "../../tests/graphics/applicationIcons/facebook.png"
310+ secondaryIcon: Qt.resolvedUrl("../../graphics/applicationIcons/facebook.png")
311 value: 0
311 value: 0
312 rawActions: []
312 rawActions: []
313 },
313 },
@@ -318,7 +318,7 @@ Item {
318 "sound-file": "dummy.ogg"}
318 "sound-file": "dummy.ogg"}
319 summary: "Interactive notification"
319 summary: "Interactive notification"
320 body: "This is a notification that can be clicked"
320 body: "This is a notification that can be clicked"
321− icon: "../../tests/graphics/avatars/amanda.png"
321+ icon: Qt.resolvedUrl("../../graphics/avatars/amanda.png")
322 secondaryIcon: ""
322 secondaryIcon: ""
323 value: 0
323 value: 0
324 rawActions: ["reply_id", "Dummy"]
324 rawActions: ["reply_id", "Dummy"]
@@ -330,7 +330,7 @@ Item {
330 "sound-file": "dummy.ogg"}
330 "sound-file": "dummy.ogg"}
331 summary: "Bro Coly"
331 summary: "Bro Coly"
332 body: "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
332 body: "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
333− icon: "../../tests/graphics/avatars/anna_olsson.png"
333+ icon: Qt.resolvedUrl("../../graphics/avatars/anna_olsson.png")
334 secondaryIcon: ""
334 secondaryIcon: ""
335 value: 0
335 value: 0
336 rawActions: ["accept_id", "Accept",
336 rawActions: ["accept_id", "Accept",
@@ -343,8 +343,8 @@ Item {
343 "sound-file": "dummy.ogg"}
343 "sound-file": "dummy.ogg"}
344 summary: "Cole Raby"
344 summary: "Cole Raby"
345 body: "I did not expect it to be that late."
345 body: "I did not expect it to be that late."
346− icon: "../../tests/graphics/avatars/funky.png"
346+ icon: Qt.resolvedUrl("../../graphics/avatars/funky.png")
347− secondaryIcon: "../../tests/graphics/applicationIcons/facebook.png"
347+ secondaryIcon: Qt.resolvedUrl("../../graphics/applicationIcons/facebook.png")
348 value: 0
348 value: 0
349 rawActions: []
349 rawActions: []
350 },
350 },
tests/qmltests/Notifications/tst_SwipeToAct.qml+5−5
@@ -72,7 +72,7 @@ Item {
72 hints: {"x-canonical-snap-decisions-swipe": "true"},
72 hints: {"x-canonical-snap-decisions-swipe": "true"},
73 summary: "Incoming call",
73 summary: "Incoming call",
74 body: "Frank Zappa\n+44 (0)7736 027340",
74 body: "Frank Zappa\n+44 (0)7736 027340",
75− icon: "../../tests/graphics/avatars/amanda.png",
75+ icon: Qt.resolvedUrl("../../graphics/avatars/amanda.png"),
76 secondaryIcon: "incoming-call",
76 secondaryIcon: "incoming-call",
77 actions: [{ id: "ok_id", label: "Ok"},
77 actions: [{ id: "ok_id", label: "Ok"},
78 { id: "cancel_id", label: "Cancel"},
78 { id: "cancel_id", label: "Cancel"},
@@ -182,8 +182,8 @@ Item {
182 hints: {"x-canonical-snap-decisions-swipe": "true"},
182 hints: {"x-canonical-snap-decisions-swipe": "true"},
183 summary: "Incoming call",
183 summary: "Incoming call",
184 body: "Frank Zappa\n+44 (0)7736 027340",
184 body: "Frank Zappa\n+44 (0)7736 027340",
185− icon: "../../tests/graphics/avatars/amanda.png",
185+ icon: Qt.resolvedUrl("../../graphics/avatars/amanda.png"),
186− secondaryIcon: "../../tests/graphics/applicationIcons/facebook.png",
186+ secondaryIcon: Qt.resolvedUrl("../../graphics/applicationIcons/facebook.png"),
187 actions: myActionModel,
187 actions: myActionModel,
188 summaryVisible: true,
188 summaryVisible: true,
189 bodyVisible: true,
189 bodyVisible: true,
@@ -201,8 +201,8 @@ Item {
201 hints: {"x-canonical-snap-decisions-swipe": "true"},
201 hints: {"x-canonical-snap-decisions-swipe": "true"},
202 summary: "Incoming call",
202 summary: "Incoming call",
203 body: "Bro Coly\n+49 (0)221 426973",
203 body: "Bro Coly\n+49 (0)221 426973",
204− icon: "../../tests/graphics/avatars/funky.png",
204+ icon: Qt.resolvedUrl("../../graphics/avatars/funky.png"),
205− secondaryIcon: "../../tests/graphics/applicationIcons/facebook.png",
205+ secondaryIcon: Qt.resolvedUrl("../../graphics/applicationIcons/facebook.png"),
206 actions: myActionModel,
206 actions: myActionModel,
207 summaryVisible: true,
207 summaryVisible: true,
208 bodyVisible: true,
208 bodyVisible: true,