[Pkg-owncloud-commits] [php-sabredav] 13/22: Run the test suite on packaging

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 e2a199b2cf1cb512d268ce74419a089b8b796f85
Author: David Prévot <taffit at debian.org>
Date:   Wed Mar 19 10:00:02 2014 -0400

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

diff --git a/debian/control b/debian/control
index 8022659..720ff56 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,13 @@ Maintainer: ownCloud for Debian maintainers <pkg-owncloud-maintainers at lists.alio
 Uploaders: Thomas Mueller <thomas.mueller at tmit.eu>,
            Paul van Tilburg <paulvt at debian.org>,
            David Prévot <taffit at debian.org>
-Build-Depends: debhelper (>= 8.0.0), pkg-php-tools (>= 1.7~)
+Build-Depends: debhelper (>= 8.0.0),
+               php-sabre-vobject,
+               php-symfony-classloader,
+               php5-curl,
+               php5-sqlite,
+               phpunit,
+               pkg-php-tools (>= 1.7~)
 Standards-Version: 3.9.5
 Homepage: http://sabre.io/dav/
 Vcs-Git: git://anonscm.debian.org/pkg-owncloud/php-sabredav.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..b878006
--- /dev/null
+++ b/debian/patches/0001-Use-ClassLoader-from-Symfony-instead-of-autoload.patch
@@ -0,0 +1,32 @@
+From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit at debian.org>
+Date: Wed, 19 Mar 2014 11:19:26 -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 | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/tests/bootstrap.php b/tests/bootstrap.php
+index a6493ce..972e278 100644
+--- a/tests/bootstrap.php
++++ b/tests/bootstrap.php
+@@ -6,7 +6,14 @@ define('SABRE_MYSQLPASS','');
+ 
+ set_include_path(__DIR__ . '/../lib/' . PATH_SEPARATOR . __DIR__ . PATH_SEPARATOR . get_include_path());
+ 
+-include __DIR__ . '/../vendor/autoload.php';
++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',
++));
+ include 'Sabre/TestUtil.php';
+ include 'Sabre/DAVServerTest.php';
+ 
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 e613d95..6871a4b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,5 +4,8 @@
 
 override_dh_auto_clean override_dh_auto_build:
 
+override_dh_auto_test:
+	cd tests && phpunit
+
 get-orig-source:
 	uscan --verbose --force --rename

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