Allan LeSage has proposed merging 
lp:~allanlesage/kubuntu-packaging/qtlocation-enable-tests into 
lp:~kubuntu-packagers/kubuntu-packaging/qtlocation-opensource-src.

Requested reviews:
  Timo Jyrinki (timo-jyrinki)

For more details, see:
https://code.launchpad.net/~allanlesage/kubuntu-packaging/qtlocation-enable-tests/+merge/199367

Add tests to the Debian build; enable coverage reporting for Jenkins 
consumption; skip some failing tests.

Do we want a "make check" target at the root level of this project?  The layout 
is unfamiliar to me, coming from autotools-type projects, however I don't know 
the common patterns of Qt projects, maybe this is standard.
-- 
https://code.launchpad.net/~allanlesage/kubuntu-packaging/qtlocation-enable-tests/+merge/199367
Your team Kubuntu Packagers is subscribed to branch 
lp:~kubuntu-packagers/kubuntu-packaging/qtlocation-opensource-src.
=== modified file 'debian/changelog'
--- debian/changelog	2013-12-03 12:18:51 +0000
+++ debian/changelog	2013-12-17 22:39:34 +0000
@@ -1,5 +1,6 @@
 qtlocation-opensource-src (5.2.0~rc1-0ubuntu1) UNRELEASED; urgency=low
 
+  [ Timo Jyrinki ]
   * New upstream rc release.
   * Add libqt5positioning5 and qtdeclarative5-qtpositioning-plugin packages
   * Refresh add_support_for_ubuntu_platform.patch
@@ -10,6 +11,14 @@
   * Drop debian/patches/disable_nokia_plugin.patch:
     - Compiles and has been updated again.
 
+  [ Allan LeSage ]
+  * Depend on xvfb for existing tests requiring a display.
+  * Add dh_override_auto_test to make check under xvfb-run.
+  * debian/patches/skip_failing_tests.patch
+    - Skip some failing tests pending investigation.
+  * debian/patches/enable_coverage_reporting.patch
+    - Enable standard coverage reporting for Jenkins consumption.
+
  -- Timo Jyrinki <[email protected]>  Thu, 14 Nov 2013 05:14:27 +0000
 
 qtlocation-opensource-src (5.0~git20130805-0ubuntu3) saucy; urgency=low

=== modified file 'debian/control'
--- debian/control	2013-11-21 06:44:07 +0000
+++ debian/control	2013-12-17 22:39:34 +0000
@@ -12,6 +12,7 @@
                qtbase5-private-dev (>= 5.2.0~),
                qtdeclarative5-private-dev (>= 5.2.0~),
                qtdeclarative5-qtquick2-plugin (>= 5.2.0~),
+	       xvfb,
 Standards-Version: 3.9.4
 Homepage: http://qt-project.org/
 Vcs-Bzr: lp:~kubuntu-packagers/kubuntu-packaging/qtlocation-opensource-src

=== added file 'debian/patches/enable_coverage_reporting.patch'
--- debian/patches/enable_coverage_reporting.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/enable_coverage_reporting.patch	2013-12-17 22:39:34 +0000
@@ -0,0 +1,156 @@
+--- a/qtlocation.pro
++++ b/qtlocation.pro
+@@ -1,3 +1,4 @@
++include(coverage.pri)
+ load(configure)
+ qtCompileTest(geoclue)
+ qtCompileTest(geoclue-satellite)
+--- a/src/3rdparty/3rdparty.pro
++++ b/src/3rdparty/3rdparty.pro
+@@ -1,2 +1,4 @@
++include(../../coverage.pri)
++
+ TEMPLATE = subdirs
+ SUBDIRS += poly2tri
+--- a/src/3rdparty/poly2tri/poly2tri.pro
++++ b/src/3rdparty/poly2tri/poly2tri.pro
+@@ -1,3 +1,5 @@
++include(../../../coverage.pri)
++
+ TEMPLATE = lib
+ TARGET = poly2tri
+ 
+--- a/src/imports/location/location.pro
++++ b/src/imports/location/location.pro
+@@ -1,3 +1,5 @@
++include(../../../coverage.pri)
++
+ QT += quick-private network positioning-private location-private qml-private 3d core-private gui-private
+ 
+ INCLUDEPATH += ../../location
+--- a/src/location/location.pro
++++ b/src/location/location.pro
+@@ -1,3 +1,5 @@
++include(../../coverage.pri)
++
+ TARGET = QtLocation
+ QT = core-private positioning
+ 
+--- a/src/location/maps/maps.pri
++++ b/src/location/maps/maps.pri
+@@ -1,3 +1,4 @@
++include(../../../coverage.pri)
+ 
+ INCLUDEPATH += maps
+ 
+--- a/src/plugins/geoservices/osm/osm.pro
++++ b/src/plugins/geoservices/osm/osm.pro
+@@ -1,3 +1,5 @@
++include(../../../../coverage.pri)
++
+ TARGET = qtgeoservices_osm
+ QT += location-private network
+ 
+--- a/src/plugins/position/geoclue/geoclue.pro
++++ b/src/plugins/position/geoclue/geoclue.pro
+@@ -1,3 +1,5 @@
++include(../../../../coverage.pri)
++
+ TARGET = qtposition_geoclue
+ QT = core positioning
+ 
+--- a/src/plugins/position/gypsy/gypsy.pro
++++ b/src/plugins/position/gypsy/gypsy.pro
+@@ -1,3 +1,5 @@
++include(../../../../coverage.pri)
++
+ TARGET = qtposition_gypsy
+ QT = core positioning
+ 
+--- a/src/plugins/position/position.pro
++++ b/src/plugins/position/position.pro
+@@ -1,3 +1,5 @@
++include(../../coverage.pri)
++
+ TEMPLATE = subdirs
+ 
+ config_geoclue:SUBDIRS += geoclue
+--- a/src/plugins/position/simulator/simulator.pro
++++ b/src/plugins/position/simulator/simulator.pro
+@@ -1,3 +1,5 @@
++include(../../../../coverage.pri)
++
+ TARGET = qtposition_simulator
+ QT += positioning gui
+ 
+--- a/src/plugins/position/ubuntu/ubuntu.pro
++++ b/src/plugins/position/ubuntu/ubuntu.pro
+@@ -1,3 +1,5 @@
++include(../../../../coverage.pri)
++
+ TARGET = qtposition_ubuntu
+ QT += location gui
+ 
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -1,3 +1,5 @@
++include(../coverage.pri)
++
+ TEMPLATE = subdirs
+ CONFIG += ordered
+ 
+--- /dev/null
++++ b/coverage.pri
+@@ -0,0 +1,44 @@
++# Coverage
++CONFIG(coverage) {
++    LIBS += -lgcov
++    QMAKE_CXXFLAGS += --coverage
++    QMAKE_LDFLAGS += --coverage
++
++    QMAKE_EXTRA_TARGETS += clean-gcno clean-gcda coverage-html \
++        generate-coverage-html clean-coverage-html coverage-gcovr \
++        generate-gcovr generate-coverage-gcovr clean-coverage-gcovr
++
++    clean-gcno.commands = \
++        "@echo Removing old coverage instrumentation"; \
++        "find -name '*.gcno' -print | xargs -r rm"
++
++    clean-gcda.commands = \
++        "@echo Removing old coverage results"; \
++        "find -name '*.gcda' -print | xargs -r rm"
++
++    coverage-html.depends = clean-gcda check generate-coverage-html
++
++    generate-coverage-html.commands = \
++        "@echo Collecting coverage data"; \
++        "lcov --directory $${TOP_SRC_DIR} --capture --output-file coverage.info --no-checksum --compat-libtool"; \
++        "lcov --extract coverage.info \"*/src/*.cpp\" -o coverage.info"; \
++        "lcov --remove coverage.info \"moc_*.cpp\" -o coverage.info"; \
++        "LANG=C genhtml --prefix $${TOP_SRC_DIR} --output-directory coverage-html --title \"Code Coverage\" --legend --show-details coverage.info"
++
++    clean-coverage-html.depends = clean-gcda
++    clean-coverage-html.commands = \
++        "lcov --directory $${TOP_SRC_DIR} -z"; \
++        "rm -rf coverage.info coverage-html"
++
++    coverage-gcovr.depends = clean-gcda check generate-coverage-gcovr
++
++    generate-coverage-gcovr.commands = \
++        "@echo Generating coverage GCOVR report"; \
++        "gcovr -x -r $${TOP_SRC_DIR} -o $${TOP_SRC_DIR}/coverage.xml -e \".*/moc_.*\" -e \"tests/.*\" -e \".*\\.h\""
++
++    clean-coverage-gcovr.depends = clean-gcda
++    clean-coverage-gcovr.commands = \
++        "rm -rf $${TOP_SRC_DIR}/coverage.xml"
++
++    QMAKE_CLEAN += *.gcda *.gcno coverage.info coverage.xml
++}
+--- a/src/plugins/geoservices/nokia/nokia.pro
++++ b/src/plugins/geoservices/nokia/nokia.pro
+@@ -1,3 +1,5 @@
++include(../../../../coverage.pri)
++
+ TARGET = qtgeoservices_nokia
+ QT += location-private network
+ 

=== modified file 'debian/patches/series'
--- debian/patches/series	2013-11-21 06:37:49 +0000
+++ debian/patches/series	2013-12-17 22:39:34 +0000
@@ -1,1 +1,3 @@
 add_support_for_ubuntu_platform.patch
+skip_failing_tests.patch
+enable_coverage_reporting.patch

=== added file 'debian/patches/skip_failing_tests.patch'
--- debian/patches/skip_failing_tests.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/skip_failing_tests.patch	2013-12-17 22:39:34 +0000
@@ -0,0 +1,44 @@
+--- a/tests/auto/auto.pro
++++ b/tests/auto/auto.pro
+@@ -24,9 +24,10 @@
+            qplacesearchreply \
+            qplacesearchsuggestionreply \
+            qplaceuser \
+-           qplacemanager \
+-           qplacemanager_nokia \
+-           qplacemanager_unsupported \
++           # skip some failling tests
++           #qplacemanager \
++           #qplacemanager_nokia \
++           #qplacemanager_unsupported \
+            placesplugin_unsupported
+ 
+     #misc tests
+@@ -47,13 +48,15 @@
+            qgeoroutereply \
+            qgeorouterequest \
+            qgeoroutesegment \
+-           qgeoroutingmanager \
++           # skip some failing tests
++           #qgeoroutingmanager \
+            qgeoroutingmanagerplugins \
+            qgeotilespec \
+            qgeoroutexmlparser \
+            qgeomapcontroller \
+            maptype \
+-           nokia_services \
++           # skip some failing tests
++           #nokia_services \
+            qgeocameratiles
+ 
+     qtHaveModule(quick) {
+@@ -75,7 +78,8 @@
+            qgeocoordinate \
+            qgeolocation \
+            qgeopositioninfo \
+-           qgeopositioninfosource \
++           # skip some failing tests
++           #qgeopositioninfosource \
+            qgeosatelliteinfo \
+            qgeosatelliteinfosource \
+            qnmeapositioninfosource

=== modified file 'debian/rules'
--- debian/rules	2013-11-21 06:44:07 +0000
+++ debian/rules	2013-12-17 22:39:34 +0000
@@ -26,6 +26,10 @@
 	# Remove binary that includes libtheora in itself
 	rm -f debian/tmp/usr/lib/*/qt5/examples/qtlocation/declarative/mapviewer/qml_location_mapviewer
 
+override_dh_auto_test:
+	export LD_LIBRARY_PATH=$(CURDIR)/lib
+	cd tests/auto/ && ( test -e Makefile || qmake auto.pro -o Makefile ) && xvfb-run -a make -f Makefile check
+
 override_dh_builddeb:
 	dh_builddeb -- -Zxz
 

-- 
kubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel

Reply via email to