Merge lp:~canonical-platform-qa/ubuntu-clock-app/xvfb_and_qml_tests into lp:ubuntu-clock-app

Proposed by Leo Arias
Status: Superseded
Proposed branch: lp:~canonical-platform-qa/ubuntu-clock-app/xvfb_and_qml_tests
Merge into: lp:ubuntu-clock-app
Diff against target: 150 lines (+60/-20)
4 files modified
CMakeLists.txt (+14/-19)
backend/CMakeLists.txt (+2/-0)
tests/CMakeLists.txt (+6/-1)
tests/unit/CMakeLists.txt (+38/-0)
To merge this branch: bzr merge lp:~canonical-platform-qa/ubuntu-clock-app/xvfb_and_qml_tests
Reviewer Review Type Date Requested Status
Nekhelesh Ramananthan Needs Information
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+234421@code.launchpad.net

This proposal has been superseded by a proposal from 2014-09-12.

Commit message

There is one test that fails, I want to see if Jenkins runs it.

Description of the change

There is one test that fails, I want to see if Jenkins runs it.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

FAILED: Continuous integration, rev:96
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~canonical-platform-qa/ubuntu-clock-app/xvfb_and_qml_tests/+merge/234421/+edit-commit-message

http://91.189.93.70:8080/job/ubuntu-clock-app-ci/457/
Executed test runs:
    SUCCESS: http://91.189.93.70:8080/job/generic-mediumtests-utopic-python3/303
        deb: http://91.189.93.70:8080/job/generic-mediumtests-utopic-python3/303/artifact/work/output/*zip*/output.zip
    SUCCESS: http://91.189.93.70:8080/job/ubuntu-clock-app-utopic-amd64-ci/104

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/ubuntu-clock-app-ci/457/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

The test fails on my system as well. It is a known failure. I will fix asap. However jenkins at the moment is only configured to run AP tests. You will need to talk to fginther about enabling jenkins to run the qml tests as well.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

67 -if(NOT CLICK_MODE)
68 - add_subdirectory(tests)
69 -endif(NOT CLICK_MODE)

I believe this was added in the first place to ensure that the tests folder does not make its way into the clock app click package since the click package doesn't need to also include tests. I see that you added,

102 +add_subdirectory(unit)
103 +
104 +if(NOT CLICK_MODE)
105 + add_subdirectory(autopilot)
106 +endif(NOT CLICK_MODE)

But doesn't that mean that the units directory is still included in the click package?

review: Needs Information
Revision history for this message
Leo Arias (elopio) wrote :

I built the package with click-buddy, and then:

click contents com.ubuntu.clock_3.1.96_amd64.click | grep tst

There doesn't seem to be tst files added to the package. Do you know who added that if originally, to ask him?

97. By Leo Arias

Merged with prerequisite.

98. By Leo Arias

Added qttest to the debian build deps.

99. By Leo Arias

Added the make test to the debian build.

100. By Leo Arias

Added xvfb to the deps.

101. By Leo Arias

Added dev tools to the deps.

102. By Leo Arias

Added the ubuntu components to the deps.

103. By Leo Arias

Merged with trunk.

104. By Leo Arias

Merged with prerequisite.

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 2014-09-08 07:37:22 +0000
3+++ CMakeLists.txt 2014-09-12 05:06:07 +0000
4@@ -15,6 +15,9 @@
5
6 option(INSTALL_TESTS "Install the tests on make install" on)
7 option(CLICK_MODE "Build as a click package" on)
8+option(USE_XVFB "Use XVFB to run qml tests" on)
9+
10+enable_testing()
11
12 set(APP_NAME clock)
13 set(APP_HARDCODE ubuntu-clock-app)
14@@ -23,8 +26,8 @@
15 SET(AUTOPILOT_DIR ubuntu_clock_app)
16 set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
17
18-# Standard install paths
19-include(GNUInstallDirs)
20+# Standard install paths
21+include(GNUInstallDirs)
22
23 #set install paths
24 if(CLICK_MODE)
25@@ -35,11 +38,11 @@
26 set(EXEC "qmlscene $@ ${UBUNTU-CLOCK_APP_DIR}/${MAIN_QML}")
27 set(MODULE_PATH ${QT_IMPORTS_DIR})
28 if(NOT BZR_REVNO)
29- execute_process(
30+ execute_process(
31 COMMAND bzr revno
32- OUTPUT_VARIABLE BZR_REVNO
33+ OUTPUT_VARIABLE BZR_REVNO
34 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
35- OUTPUT_STRIP_TRAILING_WHITESPACE
36+ OUTPUT_STRIP_TRAILING_WHITESPACE
37 )
38 endif(NOT BZR_REVNO)
39 if(NOT BZR_SOURCE)
40@@ -48,17 +51,17 @@
41 endif(NOT BZR_SOURCE)
42 else(CLICK_MODE)
43 set(UBUNTU-CLOCK_APP_DIR "${CMAKE_INSTALL_DATADIR}/ubuntu-clock-app")
44- execute_process(
45- COMMAND qmake -query QT_INSTALL_QML
46- OUTPUT_VARIABLE QT_IMPORTS_DIR
47- OUTPUT_STRIP_TRAILING_WHITESPACE
48+ execute_process(
49+ COMMAND qmake -query QT_INSTALL_QML
50+ OUTPUT_VARIABLE QT_IMPORTS_DIR
51+ OUTPUT_STRIP_TRAILING_WHITESPACE
52 )
53 set(MODULE_PATH ${QT_IMPORTS_DIR}/ClockApp)
54 endif(CLICK_MODE)
55
56 if(${CLICK_MODE})
57 message("-- Configuring manifest.json")
58-
59+
60 execute_process(
61 COMMAND dpkg-architecture -qDEB_HOST_ARCH
62 OUTPUT_VARIABLE CLICK_ARCH
63@@ -82,21 +85,13 @@
64 add_subdirectory(app)
65 add_subdirectory(backend)
66 add_subdirectory(po)
67-if(NOT CLICK_MODE)
68- add_subdirectory(tests)
69-endif(NOT CLICK_MODE)
70+add_subdirectory(tests)
71
72 add_custom_target("autopilot" chmod +x ${CMAKE_SOURCE_DIR}/tests/autopilot/run
73 COMMAND ${CMAKE_SOURCE_DIR}/tests/autopilot/run
74 DEPENDS timezone timezone-qmldir alarmsettings alarmsettings-qmldir datetime datetime-qmldir
75 WORKING_DIRECTORY ./app)
76
77-enable_testing()
78-add_test(NAME basic
79- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/app
80- COMMAND /usr/bin/qmltestrunner -input ${CMAKE_SOURCE_DIR}/tests/unit -import ${CMAKE_BINARY_DIR}/backend
81-)
82-
83 add_custom_target("run" /usr/bin/qmlscene -I ${CMAKE_BINARY_DIR}/backend ${CMAKE_SOURCE_DIR}/app/ubuntu-clock-app.qml
84 DEPENDS timezone timezone-qmldir alarmsettings alarmsettings-qmldir datetime datetime-qmldir
85 WORKING_DIRECTORY ./app)
86
87=== modified file 'backend/CMakeLists.txt'
88--- backend/CMakeLists.txt 2014-08-13 14:38:12 +0000
89+++ backend/CMakeLists.txt 2014-09-12 05:06:07 +0000
90@@ -1,3 +1,5 @@
91+project(backend)
92+
93 include_directories(
94 ${CMAKE_CURRENT_SOURCE_DIR}
95 )
96
97=== modified file 'tests/CMakeLists.txt'
98--- tests/CMakeLists.txt 2014-08-08 15:57:16 +0000
99+++ tests/CMakeLists.txt 2014-09-12 05:06:07 +0000
100@@ -1,1 +1,6 @@
101-add_subdirectory(autopilot)
102+add_subdirectory(unit)
103+
104+if(NOT CLICK_MODE)
105+ add_subdirectory(autopilot)
106+endif(NOT CLICK_MODE)
107+
108
109=== added file 'tests/unit/CMakeLists.txt'
110--- tests/unit/CMakeLists.txt 1970-01-01 00:00:00 +0000
111+++ tests/unit/CMakeLists.txt 2014-09-12 05:06:07 +0000
112@@ -0,0 +1,38 @@
113+find_program(QMLTESTRUNNER_BIN
114+ NAMES qmltestrunner
115+ PATHS /usr/lib/*/qt5/bin
116+ NO_DEFAULT_PATH
117+)
118+
119+find_program(XVFB_RUN_BIN
120+ NAMES xvfb-run
121+)
122+
123+macro(DECLARE_QML_TEST TST_NAME TST_QML_FILE)
124+ if(USE_XVFB)
125+ set(COMMAND_PREFIX ${XVFB_RUN_BIN} -a -s "-screen 0 1024x768x24")
126+ else()
127+ set(COMMAND_PREFIX "")
128+ endif()
129+ add_test(NAME ${TST_NAME}
130+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
131+ COMMAND ${COMMAND_PREFIX} ${QMLTESTRUNNER_BIN} -import ${backend_BINARY_DIR} -input ${CMAKE_CURRENT_SOURCE_DIR}/${TST_QML_FILE}
132+ )
133+endmacro()
134+
135+if(QMLTESTRUNNER_BIN AND XVFB_RUN_BIN)
136+ declare_qml_test("AlarmLabel" tst_alarmLabel.qml)
137+ declare_qml_test("AlarmRepeat" tst_alarmRepeat.qml)
138+else()
139+ if (NOT QMLTESTRUNNER_BIN)
140+ message(WARNING "Qml tests disabled: qmltestrunner not found")
141+ else()
142+ message(WARNING "Qml tests disabled: xvfb-run not found")
143+ endif()
144+endif()
145+
146+set(QML_TST_FILES
147+ tst_alarmLabel.qml
148+ tst_alarmRepeat.qml
149+)
150+add_custom_target(tst_QmlFiles ALL SOURCES ${QML_TST_FILES})

Subscribers

People subscribed via source and target branches