[Pkg-owncloud-commits] [php-sabre-vobject] 04/05: Add DEP-8 compliant tests

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


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

taffit pushed a commit to branch 2.1
in repository php-sabre-vobject.

commit 4ca97f333719199801ee838054e6c6accb5929e1
Author: David Prévot <taffit at debian.org>
Date:   Wed Mar 19 11:12:19 2014 -0400

    Add DEP-8 compliant tests
---
 debian/control                                        |  1 +
 .../DEP-8/Use-installed-class-for-DEP-8-tests.patch   | 19 +++++++++++++++++++
 debian/tests/control                                  |  3 +++
 debian/tests/phpunit                                  |  8 ++++++++
 4 files changed, 31 insertions(+)

diff --git a/debian/control b/debian/control
index 9c0ec98..fe0129e 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Standards-Version: 3.9.5
 Homepage: https://github.com/fruux/sabre-vobject
 Vcs-Git: git://anonscm.debian.org/pkg-owncloud/php-sabre-vobject.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-owncloud/php-sabre-vobject.git
+XS-Testsuite: autopkgtest
 
 Package: php-sabre-vobject
 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..863312f
--- /dev/null
+++ b/debian/patches/DEP-8/Use-installed-class-for-DEP-8-tests.patch
@@ -0,0 +1,19 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Wed, 19 Mar 2014 11:08:51 -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 8cb056a..62106a2 100644
+--- a/tests/bootstrap.php
++++ b/tests/bootstrap.php
+@@ -8,5 +8,4 @@ $loader = new ClassLoader();
+ $loader->setUseIncludePath(true);
+ $loader->register();
+ $loader->addPrefixes(array(
+-	'Sabre' => __DIR__.'/../lib',
+ ));
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..ee952d0
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: phpunit
+Restrictions: rw-build-tree
+Depends: @, patch, php-symfony-classloader, 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-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list