[Pkg-owncloud-commits] [php-sabredav] 07/13: Add DEP-8 compliant tests
David Prévot
taffit at moszumanska.debian.org
Tue May 20 23:10:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 31d6fd833eb0319f857d7ecb2caeb4022cc6fe2e
Author: David Prévot <taffit at debian.org>
Date: Wed Mar 19 11:32:53 2014 -0400
Add DEP-8 compliant tests
---
debian/control | 1 +
...ip-failing-tests-starting-with-PHP-5.5.10.patch | 36 ++++++++++++++++++++++
debian/patches/0003-Increase-timeout.patch | 28 +++++++++++++++++
...-Work-around-the-lack-of-PSR-4-autoloader.patch | 18 +++++++++++
debian/patches/series | 3 ++
debian/tests/control | 3 ++
debian/tests/phpunit | 8 +++++
7 files changed, 97 insertions(+)
diff --git a/debian/control b/debian/control
index 24c0d2d..159a02c 100644
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Standards-Version: 3.9.5
Homepage: http://sabre.io/dav/
Vcs-Git: git://anonscm.debian.org/pkg-owncloud/php-sabredav.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-owncloud/php-sabredav.git
+XS-Testsuite: autopkgtest
Package: php-sabre-dav
Architecture: all
diff --git a/debian/patches/0002-Skip-failing-tests-starting-with-PHP-5.5.10.patch b/debian/patches/0002-Skip-failing-tests-starting-with-PHP-5.5.10.patch
new file mode 100644
index 0000000..9693ef6
--- /dev/null
+++ b/debian/patches/0002-Skip-failing-tests-starting-with-PHP-5.5.10.patch
@@ -0,0 +1,36 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Sun, 13 Apr 2014 16:07:48 -0400
+Subject: Skip failing tests starting with PHP 5.5.10
+
+Bug-Debian: https://bugs.debian.org/743111
+Bug: https://github.com/fruux/sabre-dav/issues/425
+---
+ tests/Sabre/CalDAV/CalendarQueryParserTest.php | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/tests/Sabre/CalDAV/CalendarQueryParserTest.php b/tests/Sabre/CalDAV/CalendarQueryParserTest.php
+index fdfe4de..32a47f4 100644
+--- a/tests/Sabre/CalDAV/CalendarQueryParserTest.php
++++ b/tests/Sabre/CalDAV/CalendarQueryParserTest.php
+@@ -124,6 +124,10 @@ class CalendarQueryParserTest extends \PHPUnit_Framework_TestCase {
+
+ function testCompTimeRange() {
+
++ if (version_compare(PHP_VERSION, '5.5.10') >= 0) {
++ $this->markTestSkipped('Failing test starting with PHP 5.5.10');
++ }
++
+ $xml = array(
+ '<c:filter>',
+ ' <c:comp-filter name="VCALENDAR">',
+@@ -257,6 +261,10 @@ class CalendarQueryParserTest extends \PHPUnit_Framework_TestCase {
+
+ function testComplex() {
+
++ if (version_compare(PHP_VERSION, '5.5.10') >= 0) {
++ $this->markTestSkipped('Failing test starting with PHP 5.5.10');
++ }
++
+ $xml = array(
+ '<c:filter>',
+ ' <c:comp-filter name="VCALENDAR">',
diff --git a/debian/patches/0003-Increase-timeout.patch b/debian/patches/0003-Increase-timeout.patch
new file mode 100644
index 0000000..b777f42
--- /dev/null
+++ b/debian/patches/0003-Increase-timeout.patch
@@ -0,0 +1,28 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Tue, 20 May 2014 16:12:50 -0400
+Subject: Increase timeout
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Tests are failing in strict mode with the PHPUnit version currently in
+Debian. Hopefully, this patch can be dropped once version 4 will be in
+the archive.
+
+Forwarded: not-needed
+---
+ tests/phpunit.xml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/phpunit.xml b/tests/phpunit.xml
+index ba4b3e1..f26b317 100644
+--- a/tests/phpunit.xml
++++ b/tests/phpunit.xml
+@@ -5,6 +5,7 @@
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ strict="true"
++ timeoutForSmallTests="10"
+ >
+ <testsuite name="sabre-vobject">
+ <directory>../vendor/sabre/vobject/tests/Sabre/VObject</directory>
diff --git a/debian/patches/0004-Work-around-the-lack-of-PSR-4-autoloader.patch b/debian/patches/0004-Work-around-the-lack-of-PSR-4-autoloader.patch
new file mode 100644
index 0000000..674b9c6
--- /dev/null
+++ b/debian/patches/0004-Work-around-the-lack-of-PSR-4-autoloader.patch
@@ -0,0 +1,18 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Tue, 20 May 2014 16:16:30 -0400
+Subject: Work around the lack of PSR-4 autoloader
+
+Forwarded: not-needed
+---
+ lib/Sabre | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 120000 lib/Sabre
+
+diff --git a/lib/Sabre b/lib/Sabre
+new file mode 120000
+index 0000000..945c9b4
+--- /dev/null
++++ b/lib/Sabre
+@@ -0,0 +1 @@
++.
+\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
index e4166b6..f8fd584 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
0001-Use-ClassLoader-from-Symfony-instead-of-autoload.patch
+0002-Skip-failing-tests-starting-with-PHP-5.5.10.patch
+0003-Increase-timeout.patch
+0004-Work-around-the-lack-of-PSR-4-autoloader.patch
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..ea505f5
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: phpunit
+Restrictions: rw-build-tree
+Depends: @, patch, php-symfony-classloader, php5-curl, php5-sqlite, phpunit
diff --git a/debian/tests/phpunit b/debian/tests/phpunit
new file mode 100755
index 0000000..a565bca
--- /dev/null
+++ b/debian/tests/phpunit
@@ -0,0 +1,8 @@
+#! /bin/sh
+patch -Rp1 < debian/patches/0004-Work-around-the-lack-of-PSR-4-autoloader.patch
+cd tests
+phpunit
+exit=$?
+cd ..
+patch -p1 < debian/patches/0004-Work-around-the-lack-of-PSR-4-autoloader.patch
+exit $exit
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list