Merge lp:~kalikiana/u1db-qt/useXvfb into lp:u1db-qt

Proposed by Christian Dywan on 2014-01-22
Status: Merged
Merged at revision: 108
Proposed branch: lp:~kalikiana/u1db-qt/useXvfb
Merge into: lp:u1db-qt
Diff against target: 71 lines (+36/-1)
4 files modified
debian/control (+2/-0)
debian/rules (+3/-0)
tests/CMakeLists.txt (+1/-1)
tests/xvfb.sh (+30/-0)
To merge this branch: bzr merge lp:~kalikiana/u1db-qt/useXvfb
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2014-01-23
Timo Jyrinki 2014-01-22 Approve on 2014-01-23
Review via email: mp+202657@code.launchpad.net

Commit message

Adopt xvfb.sh script from ui toolkit to run tests

To post a comment you must log in.
Christian Dywan (kalikiana) wrote :

Only on Quantal:

3/3 Test #1: plugintest .......................***Failed 2.86 sec
Could not initialize GLX
Aborted (core dumped)

Timo Jyrinki (timo-jyrinki) wrote :

Looks good to me:
https://launchpad.net/~canonical-qt5-edgers/+archive/qt5-beta2/+sourcepub/3842844/+listing-archive-extra

Possibly quantal has a random failure, or then truly something different about its environment to both precise and raring. On the other hand, quantal is near its end of life even though it still had 18 months of it (raring on the other hand, while newer, end-of-life:s next weekend already).

review: Approve
Timo Jyrinki (timo-jyrinki) wrote :

I'll just ignore quantal.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-08-01 05:38:19 +0000
3+++ debian/control 2014-01-22 14:03:09 +0000
4@@ -15,6 +15,8 @@
5 qtdeclarative5-test-plugin,
6 qttools5-dev-tools,
7 ubuntu-ui-toolkit-doc,
8+ xvfb,
9+ libgl1-mesa-dri,
10 Standards-Version: 3.9.4
11 Homepage: https://launchpad.net/u1db-qt
12 Vcs-Bzr: https://code.launchpad.net/u1db-qt/trunk
13
14=== modified file 'debian/rules'
15--- debian/rules 2013-07-31 08:31:23 +0000
16+++ debian/rules 2014-01-22 14:03:09 +0000
17@@ -12,3 +12,6 @@
18 override_dh_auto_configure:
19 dh_auto_configure -- -DBUILD_DOCS=ON
20
21+override_dh_auto_test:
22+ sh tests/xvfb.sh dh_auto_test || exit $?
23+
24
25=== modified file 'tests/CMakeLists.txt'
26--- tests/CMakeLists.txt 2013-07-29 15:01:21 +0000
27+++ tests/CMakeLists.txt 2014-01-22 14:03:09 +0000
28@@ -2,7 +2,7 @@
29
30 find_package(Qt5Test REQUIRED)
31
32-add_test(NAME plugintest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/strict-qmltestrunner.sh" "-platform" "minimal" "-import" "../modules" "-xunitxml" "-o" "plugintest-xunit.xml" "-input" "${CMAKE_CURRENT_SOURCE_DIR}")
33+add_test(NAME plugintest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/strict-qmltestrunner.sh" "-import" "../modules" "-xunitxml" "-o" "plugintest-xunit.xml" "-input" "${CMAKE_CURRENT_SOURCE_DIR}")
34
35 include_directories(
36 ${CMAKE_CURRENT_BINARY_DIR}
37
38=== added file 'tests/xvfb.sh'
39--- tests/xvfb.sh 1970-01-01 00:00:00 +0000
40+++ tests/xvfb.sh 2014-01-22 14:03:09 +0000
41@@ -0,0 +1,30 @@
42+#!/bin/sh
43+#
44+# Copyright 2013-2014 Canonical Ltd.
45+#
46+# This program is free software; you can redistribute it and/or modify
47+# it under the terms of the GNU Lesser General Public License as published by
48+# the Free Software Foundation; version 3.
49+#
50+# This program is distributed in the hope that it will be useful,
51+# but WITHOUT ANY WARRANTY; without even the implied warranty of
52+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53+# GNU Lesser General Public License for more details.
54+#
55+# You should have received a copy of the GNU Lesser General Public License
56+# along with this program. If not, see <http://www.gnu.org/licenses/>.
57+#
58+# Author: Christian Dywan <christian.dywan@canonical.com>
59+
60+echo Running $@ in virtual frame buffer...
61+xvfb-run -a -s "-screen 0 1280x1024x24" -e xvfb.err "$@" 2>test.err
62+RETVAL=$?
63+if [ $RETVAL -eq 0 ]; then
64+ echo $@ finished successfully...
65+else
66+ echo $@ in virtual frame buffer failed...
67+ cat test.err >&2
68+ echo Tail of xvfb-run output:
69+ tail xvfb.err >&2
70+ exit $RETVAL
71+fi

Subscribers

People subscribed via source and target branches

to all changes: