forked from punktDe/pt_extlist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·63 lines (55 loc) · 2.24 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<project name="test" basedir="." default="app">
<property name="builddir" value="${ws}/build" />
<property name="instance" value="${htdocs}" />
<property name="extPath" value="${htdocs}/typo3conf/ext/${ext}/Tests" />
<target name="clean">
<echo msg="Clean..." />
<delete dir="${builddir}" />
</target>
<target name="prepare">
<echo msg="Prepare..." />
<mkdir dir="${builddir}" />
<mkdir dir="${builddir}/logs" />
<mkdir dir="${builddir}/logs/coverage" />
<mkdir dir="${builddir}/docs" />
</target>
<!-- PHP API Documentation -->
<target name="phpdoc">
<echo msg="PHP Documentor..." />
<phpdoc title="API Documentation"
destdir="${builddir}/docs"
sourcecode="yes"
defaultpackagename="MHTest"
output="HTML:Smarty:PHP">
<fileset dir="./">
<include name="**/*.php" />
</fileset>
</phpdoc>
</target>
<!-- PHP copy/paste analysis -->
<target name="phpcpd">
<echo msg="PHP Copy/Paste..." />
<exec command="phpcpd --log-pmd=${builddir}/logs/pmd.xml ${ws}/" escape="false" />
</target>
<!-- PHP dependency checker -->
<target name="pdepend">
<echo msg="PHP Depend..." />
<exec command="pdepend --jdepend-xml=${builddir}/logs/jdepend.xml ${ws}/" escape="false" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<echo msg="PHP CodeSniffer..." />
<exec command="phpcs --standard=ZEND --report=checkstyle ${ws}/ > ${builddir}/logs/checkstyle.xml" escape="false" />
</target>
<!-- PHP CodeSniffer -->
<target name="pmd">
<echo msg="PHP Mess Detection..." />
<exec command="phpmd --reportfile=${builddir}/logs/pmd.xml --ignore=Tests,typo3/ ${ws} xml codesize,unusedcode,naming" escape="false" />
</target>
<!-- Unit Tests & coverage analysis -->
<target name="phpunit">
<echo msg="PHP Unit..." />
<exec command="php ${instance}/typo3/cli_dispatch.phpsh phpunit --log-junit ${builddir}/logs/phpunit.xml --coverage-clover ${builddir}/logs/coverage/clover.xml ${extPath}"/>
</target>
</project>