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

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 53b1d74c0511acb1c3d3b4916e256e794f5671c5
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 | 34 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       |  3 ++
 4 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 64da9e0..de30bd9 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://code.google.com/p/sabredav/
 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..6efca57
--- /dev/null
+++ b/debian/patches/0001-Use-ClassLoader-from-Symfony-instead-of-autoload.patch
@@ -0,0 +1,34 @@
+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 c3be736..0c654fd 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/DAVServerTest.php';
+ 
+ date_default_timezone_set('GMT');
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 d224fbd..48b9a02 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 --repack

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