[Pkg-owncloud-commits] [php-sabredav] 21/23: Add DEP-8 compliant tests

David Prévot taffit at moszumanska.debian.org
Wed Mar 19 17:41:40 UTC 2014


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

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

commit d3c3674166a42326a84ae50148c6e7c1fdd99fbe
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 de30bd9..b13ccaa 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,7 @@ Standards-Version: 3.9.5
 Homepage: http://code.google.com/p/sabredav/
 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..cbe3d22
--- /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 0c654fd..8e3a6bb 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/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