[Pkg-owncloud-commits] [php-sabre-vobject] 09/11: Run the test suite on packaging

David Prévot taffit at moszumanska.debian.org
Mon Mar 31 01:19:42 UTC 2014


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

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

commit 10e1937024795eb52b23d2db103e7d11b846827e
Author: David Prévot <taffit at debian.org>
Date:   Wed Mar 19 11:05:11 2014 -0400

    Run the test suite on packaging
---
 debian/control                                     |  5 ++-
 ...ssLoader-from-Symfony-instead-of-autoload.patch | 41 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       |  3 ++
 4 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 3f9553b..9c0ec98 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,10 @@ Section: php
 Priority: optional
 Maintainer: ownCloud for Debian maintainers <pkg-owncloud-maintainers at lists.alioth.debian.org>
 Uploaders: David Prévot <taffit at debian.org>
-Build-Depends: debhelper (>= 9), pkg-php-tools (>= 1.7~)
+Build-Depends: debhelper (>= 9),
+               php-symfony-classloader,
+               phpunit,
+               pkg-php-tools (>= 1.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
diff --git a/debian/patches/0001-Use-ClassLoader-from-Symfony-instead-of-autoload.patch b/debian/patches/0001-Use-ClassLoader-from-Symfony-instead-of-autoload.patch
new file mode 100644
index 0000000..4c6f39b
--- /dev/null
+++ b/debian/patches/0001-Use-ClassLoader-from-Symfony-instead-of-autoload.patch
@@ -0,0 +1,41 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Wed, 19 Mar 2014 11:07:08 -0400
+Subject: Use ClassLoader from Symfony instead of autoload
+
+Work around the lack of proper autoload.php from composer by using the
+ClassLoader element from Symfony.
+
+http://symfony.com/doc/current/components/class_loader/class_loader.html
+
+Forwarded: not-needed
+---
+ tests/bootstrap.php | 19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/tests/bootstrap.php b/tests/bootstrap.php
+index 3608abe..8cb056a 100644
+--- a/tests/bootstrap.php
++++ b/tests/bootstrap.php
+@@ -2,14 +2,11 @@
+ 
+ date_default_timezone_set('UTC');
+ 
+-$try = array(
+-    __DIR__ . '/../vendor/autoload.php',
+-    __DIR__ . '/../../../autoload.php',
+-);
+-
+-foreach($try as $path) {
+-    if (file_exists($path)) {
+-        include $path;
+-        break;
+-    }
+-}
++require_once 'Symfony/Component/ClassLoader/ClassLoader.php';
++use Symfony\Component\ClassLoader\ClassLoader;
++$loader = new ClassLoader();
++$loader->setUseIncludePath(true);
++$loader->register();
++$loader->addPrefixes(array(
++	'Sabre' => __DIR__.'/../lib',
++));
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e4166b6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Use-ClassLoader-from-Symfony-instead-of-autoload.patch
diff --git a/debian/rules b/debian/rules
index 77f013b..1e6b168 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,5 +2,8 @@
 %:
 	dh $@ --with phpcomposer
 
+override_dh_auto_test:
+	cd tests && phpunit
+
 get-orig-source:
 	uscan --verbose --rename --force

-- 
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