Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 86 lines (68 sloc) 3.061 kB
678428a adding the actual projects
Jonthan Moss authored
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="Logos" basedir="." default="">
3
4 <fileset dir="tests" id="unit-tests">
5 <include name="**/Test*.php" />
6 </fileset>
7
8 <fileset dir="." id="system-classes">
9 <include name="system/classes/**/*.php" />
10 </fileset>
11
12 <target name="unit-test" description="Generates unit test report">
13 <phpunit haltonfailure="true" haltonerror="true" printsummary="true">
14 <formatter type="xml" outfile="test-report.xml" />
15 <batchtest>
16 <fileset refid="unit-tests" />
17 </batchtest>
18 </phpunit>
19
20 <delete dir="docs/test_report" quiet="true" includeemptydirs="true" verbose="false" failonerror="false" />
21 <mkdir dir="docs/test_report" />
22 <phpunitreport infile="test-report.xml" format="frames" todir="docs/test_report" />
23 <delete file="test-report.xml" />
24 </target>
25
26 <target name="coverage-report" description="Generates unit test coverage report">
27 <exec command="phpunit --coverage-html docs/coverage/ tests/" checkreturn="false" />
28 </target>
29
30 <target name="api-docs" description="Generates API documentation">
31 <phpdoc title="API Documentation" destdir="docs/api" sourcecode="false" output="HTML:Smarty:PHP" quiet="true">
32 <fileset refid="system-classes" />
33 </phpdoc>
34 </target>
35
36 <target name="static-analysis" description="Performs static analysis">
37 <mkdir dir="docs/analysis" />
38 <!--
39 <phpmd file="system/classes">
40 <formatter type="html" outfile="docs/analysis/pmd.html"/>
41 </phpmd>
42 -->
43 <phpcpd file="system/classes">
44 <formatter type="pmd" outfile="docs/analysis/phpcpd.xml"/>
45 </phpcpd>
46
47 </target>
48
49 <target name="enable-profiling">
50
51 <available file="./public/.htaccess.bak" property="profilingEnabled" value="Yes"/>
52
53 <if>
54 <equals arg1="${profilingEnabled}" arg2="1" />
55 <then>
56 <echo>Profiling is already enabled!</echo>
57 </then>
58 <else>
59 <exec command="ln -s ../system/lib/profile/xhprof public/profile"/>
60 <exec command="cp public/.htaccess public/.htaccess.bak"/>
61 <exec command="cat system/lib/profile/start.htaccess public/.htaccess system/lib/profile/stop.htaccess > public/.htaccess.new" />
62 <exec command="mv public/.htaccess.new public/.htaccess" />
63 </else>
64 </if>
65
66
67 </target>
68
69 <target name="disable-profiling">
70
71 <available file="./public/.htaccess.bak" property="profilingEnabled" value="Yes"/>
72
73 <if>
74 <equals arg1="${profilingEnabled}" arg2="1" />
75 <then>
76 <exec command="mv public/.htaccess.bak public/.htaccess" />
77 <exec command="unlink public/profile" />
78 </then>
79 <else>
80 <echo>Profiling is already disabled!</echo>
81 </else>
82 </if>
83 </target>
84
85 </project>
Something went wrong with that request. Please try again.