gunnar: server/php-kolab DEVELOPMENT,1.6,1.7 Makefile,1.17,1.18

cvs at kolab.org cvs at kolab.org
Tue Feb 12 16:08:12 CET 2008


Author: gunnar

Update of /kolabrepository/server/php-kolab
In directory doto:/tmp/cvs-serv7756/php-kolab

Modified Files:
	DEVELOPMENT Makefile 
Log Message:
Fixed some copyright notices and added a draft on how to use unit testing with this library.

Index: DEVELOPMENT
===================================================================
RCS file: /kolabrepository/server/php-kolab/DEVELOPMENT,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- DEVELOPMENT	17 Oct 2007 09:59:57 -0000	1.6
+++ DEVELOPMENT	12 Feb 2008 15:08:09 -0000	1.7
@@ -4,12 +4,114 @@
 The php-kolab package provides PEAR-style PHP packages as suporting
 libraries for kolab-freebusy, kolab-filter and kolab-webadmin.
 
+
+Change log
+==========
+
+The change log for each package is provided in
+"Kolab_*/ChangeLog". Please keep this file up-to-date if you
+change the source code of this package.
+
+
+Contributors
+============
+
+The developers of the packages are listed in "Kolab_*/AUTHORS". A
+short list is also available in "Kolab_*/package.xml.in". Please keep
+both up-to-date if you change the source code of this package.
+
+
+Unit testing
+============
+
+With changing the code structure over to standard PEAR-style packaging
+we will also continue to add unit tests for some parts of the library.
+
+This provides short instructions on how to use these tests:
+
+1) You need to create a new PEAR environment. Feel free to choose a
+   directory that you like for that. For demonstration purposes we
+   will assume the path is ~/php.
+
+   # pear config-create ~/php ~/.pearrc
+
+   You need to already have a PEAR installation on your base system
+   for that!
+
+   If the operation is successfull, you should see corresponding
+   message at the end of the output:
+
+   ...
+   Successfully created default configuration file "/home/USER/.pearrc"
+
+   Now install the basic PEAR in ~/php:
+
+   # pear install -o PEAR
+
+2) Set some sensible php.ini settings in ~/php/php.ini:
+
+   error_reporting  =  E_ALL
+   display_errors = On
+   error_log = /home/USER/php/php-errors.log
+   include_path = ".:/home/USER/php/pear/php:/usr/share/php5:/usr/share/php"   
+
+   The point here is to make PHP as verbose as possible
+   (error_reporting, display_errors) and to log to file
+   (error_log). The include path needs to contain the path to the new
+   PEAR environment we just installed.
+
+3) Make PHP aware of our new environment by adding these lines to your ~/.bashrc:
+
+   export PATH="~/php/pear:$PATH"
+   alias php="php -c ~/php/php.ini"
+
+   This way PHP will find the new PEAR binaries in ~/php/pear and
+   apply the settings you stored in ~/php/php.ini
+
+   Now run the following to make sure PEAR also picks up your new php.ini file:
+
+   # pear config-set php_bin "`pear config-get php_bin` -c ~/php/php.ini"
+
+4) Install Horde:
+
+   # pear install channel://pear.php.net/Tree-0.3.2
+   # pear install XML_Parser
+   # export CVSROOT=:pserver:cvsread at anoncvs.horde.org:/repository
+   # cvs login
+   (pass: horde)
+   # cvs co framework
+   # cd framework
+   # php -q -d include_path=~/php/pear/php devtools/horde-fw-symlinks.php --copy --src ./ --dest ~/php/pear/php/
+   # cd ..
+
+   We need a Horde installation since the php-kolab PEAR packages rely
+   on some of the Horde functionality. In principle it should also be
+   possible to use a Horde library within your base system but there
+   might be version incompatibilities. It is safer to use a CVS
+   checkout.
+
+5) Checkout php-kolab from CVS or move into your Kolab checkout,
+   install the PEAR module to be tested and run the tests:
+
+   # cvs -d :pserver:anonymous at intevation.de:/home/kroupware/jail/kolabrepository co server/php-kolab
+   # cd server/php-kolab
+   # make test
+
+   There might be failures if you try this the first time. Go into the
+   corresponding "tests" directory and look at the *.out files for any
+   errors that occured while testing.
+
+
+Packaging
+=========
+
 The Kolab Server packages were usually not released as source
 packages. This should be changed with this new package layout. The
 "dist" target will produce a *.tar.gz packages that can be distributed
 as source packages. The same run will produce a php-kolab-*.src.rpm
 package that is suited for installation on an OpenPKG system.
 
+
 Version numbering
 =================
 
@@ -75,16 +177,3 @@
 prereleases. This leads to some weird release numbers on the source
 packages in the prerelease phase.
 
-Change log
-==========
-
-The change log for each package is provided in
-"Kolab_*/ChangeLog". Please keep this file up-to-date if you
-change the source code of this package.
-
-Contributors
-============
-
-The developers of the packages are listed in "Kolab_*/AUTHORS". A
-short list is also available in "Kolab_*/package.xml.in". Please keep
-both up-to-date if you change the source code of this package.

Index: Makefile
===================================================================
RCS file: /kolabrepository/server/php-kolab/Makefile,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Makefile	6 Feb 2008 14:09:32 -0000	1.17
+++ Makefile	12 Feb 2008 15:08:09 -0000	1.18
@@ -108,3 +108,11 @@
 	  > $(@:%-$(SOURCE_TAG).tgz=%)/package.xml
 
 	$(PEAR) package $(@:%-$(SOURCE_TAG).tgz=%)/package.xml
+
+.PHONY: test
+test: test-Kolab_Filter
+
+.PHONY: test-Kolab_Filter
+test-Kolab_Filter: Kolab_Filter-$(SOURCE_TAG).tgz
+	-pear install --force $(@:test-%=%-$(SOURCE_TAG).tgz)
+	cd $(@:test-%=%)/tests && pear run-tests *.phpt





More information about the commits mailing list