aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
authorAlexander Kampmann <programmer@nurfuerspam.de>2012-03-08 17:43:12 +0100
committerAlexander Kampmann <programmer@nurfuerspam.de>2012-03-08 17:43:12 +0100
commit185fcd0701946babf61066b49582225286061563 (patch)
tree16ec2814f981182897ba5a705bb0269dfd573a8d /build.xml
parent4690d00141352db8ca96359cbbf65ce6eb4345c4 (diff)
downloadvolse-hubzilla-185fcd0701946babf61066b49582225286061563.tar.gz
volse-hubzilla-185fcd0701946babf61066b49582225286061563.tar.bz2
volse-hubzilla-185fcd0701946babf61066b49582225286061563.zip
better tests
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml52
1 files changed, 48 insertions, 4 deletions
diff --git a/build.xml b/build.xml
index 83c530026..0f5745072 100644
--- a/build.xml
+++ b/build.xml
@@ -1,14 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="friendica" default="test">
-
+ <!-- set up include directories, this is necessary for the tests to work -->
+ <php>
+ set_include_path(
+ get_include_path() . PATH_SEPARATOR
+ . 'include' . PATH_SEPARATOR
+ . 'library' . PATH_SEPARATOR
+ . 'library/phpsec' . PATH_SEPARATOR
+ . '.' );
+ </php>
+
+ <!-- ====================================================== -->
+ <!-- Target: clean-test -->
+ <!-- deletes directories with old test reports -->
+ <!-- ====================================================== -->
+ <target name="clean-test">
+ <delete dir="report" />
+ </target>
+
+ <!-- ====================================================== -->
+ <!-- Target: prepare-test -->
+ <!-- creates directories for test reports -->
+ <!-- ====================================================== -->
+ <target name="prepare-test" depends="clean-test">
+ <mkdir dir="report" />
+ </target>
+
<!-- =================================== -->
<!-- Target: test -->
<!-- this target runs all test files -->
<!-- =================================== -->
-
- <target name="test">
- <!-- there are no tests by now, so, nothing to do -->
+ <target name="test" depends="prepare-test">
+ <coverage-setup database="./report/coverage-database">
+ <fileset dir=".">
+ <include name="**/*.php" />
+ <exclude name="*test.php"/>
+ <exclude name="./index.php"/>
+ <exclude name="./library/**"/>
+ <exclude name="doc/**"/>
+ </fileset>
+ </coverage-setup>
+ <phpunit printsummary="true" >
+ <batchtest>
+ <fileset dir="tests">
+ <include name="*test.php" />
+ </fileset>
+ </batchtest>
+ <formatter type="xml" todir="report" outfile="testlog.xml" />
+ </phpunit>
+ <phpunitreport infile="report/testlog.xml" todir="report" />
+ <coverage-report outfile="report/coverage-database">
+ <report todir="report" styledir="/home/phing/etc" />
+ </coverage-report>
</target>
<!-- ===================================================== -->