[Pkg-owncloud-commits] [php-sabredav] 16/22: Add DEP-8 compliant tests

David Prévot taffit at moszumanska.debian.org
Wed May 28 04:47:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch 1.8
in repository php-sabredav.

commit 1329c220fe437da0ebbe4ae96052830fb19f4bf1
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 +
 .../DEP-8/Use-installed-class-for-DEP-8-tests.patch | 21 +++++++++++++++++++++
 debian/tests/control                                |  3 +++
 debian/tests/phpunit                                |  8 ++++++++
 4 files changed, 33 insertions(+)

diff --git a/debian/control b/debian/control
index 720ff56..ff97f3d 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,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/DEP-8/Use-installed-class-for-DEP-8-tests.patch b/debian/patches/DEP-8/Use-installed-class-for-DEP-8-tests.patch
new file mode 100644
index 0000000..9d0e440
--- /dev/null
+++ b/debian/patches/DEP-8/Use-installed-class-for-DEP-8-tests.patch
@@ -0,0 +1,21 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Wed, 19 Mar 2014 11:24:42 -0400
+Subject: Use installed class for DEP-8 tests
+
+Gbp: Topic DEP-8
+---
+ tests/bootstrap.php | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tests/bootstrap.php b/tests/bootstrap.php
+index 972e278..847beea 100644
+--- a/tests/bootstrap.php
++++ b/tests/bootstrap.php
+@@ -12,7 +12,6 @@ $loader = new ClassLoader();
+ $loader->setUseIncludePath(true);
+ $loader->register();
+ $loader->addPrefixes(array(
+-	'Sabre' => __DIR__.'/../lib',
+ ));
+ include 'Sabre/TestUtil.php';
+ include 'Sabre/DAVServerTest.php';
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..7584ea9
--- /dev/null
+++ b/debian/tests/phpunit
@@ -0,0 +1,8 @@
+#! /bin/sh
+patch -p1 < debian/patches/DEP-8/Use-installed-class-for-DEP-8-tests.patch
+cd tests
+phpunit
+exit=$?
+cd ..
+patch -Rp1 < debian/patches/DEP-8/Use-installed-class-for-DEP-8-tests.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