uonedb-qt team mailing list archive
-
uonedb-qt team
-
Mailing list archive
-
Message #00250
[Merge] lp:~kalikiana/u1db-qt/useXvfb into lp:u1db-qt
Christian Dywan has proposed merging lp:~kalikiana/u1db-qt/useXvfb into lp:u1db-qt.
Commit message:
Adopt xvfb.sh script from ui toolkit to run tests
Requested reviews:
U1DB Qt developers (uonedb-qt)
Related bugs:
Bug #1271474 in U1DB Qt/ QML: "u1db-qt fails to run some tests against Qt 5.2"
https://bugs.launchpad.net/u1db-qt/+bug/1271474
For more details, see:
https://code.launchpad.net/~kalikiana/u1db-qt/useXvfb/+merge/202657
--
https://code.launchpad.net/~kalikiana/u1db-qt/useXvfb/+merge/202657
Your team U1DB Qt developers is requested to review the proposed merge of lp:~kalikiana/u1db-qt/useXvfb into lp:u1db-qt.
=== modified file 'debian/rules'
--- debian/rules 2013-07-31 08:31:23 +0000
+++ debian/rules 2014-01-22 12:46:35 +0000
@@ -12,3 +12,6 @@
override_dh_auto_configure:
dh_auto_configure -- -DBUILD_DOCS=ON
+override_dh_auto_test:
+ tests/xvfb.sh dh_auto_test || exit $?
+
=== modified file 'tests/CMakeLists.txt'
--- tests/CMakeLists.txt 2013-07-29 15:01:21 +0000
+++ tests/CMakeLists.txt 2014-01-22 12:46:35 +0000
@@ -2,7 +2,7 @@
find_package(Qt5Test REQUIRED)
-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}")
+add_test(NAME plugintest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/strict-qmltestrunner.sh" "-import" "../modules" "-xunitxml" "-o" "plugintest-xunit.xml" "-input" "${CMAKE_CURRENT_SOURCE_DIR}")
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
=== added file 'tests/xvfb.sh'
--- tests/xvfb.sh 1970-01-01 00:00:00 +0000
+++ tests/xvfb.sh 2014-01-22 12:46:35 +0000
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Copyright 2013-2014 Canonical Ltd.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Christian Dywan <christian.dywan@xxxxxxxxxxxxx>
+
+echo Running $@ in virtual frame buffer...
+xvfb-run -a -s "-screen 0 1280x1024x24" -e xvfb.err "$@" 2>test.err
+RETVAL=$?
+if [ $RETVAL -eq 0 ]; then
+ echo $@ finished successfully...
+else
+ echo $@ in virtual frame buffer failed...
+ cat test.err >&2
+ echo Tail of xvfb-run output:
+ tail xvfb.err >&2
+ exit $RETVAL
+fi
Follow ups