blob: 61c5f35539d390d9fd5889efff7e910f9decb12f (
plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
<project name="piwik" default="all" basedir=".">
<property file="build.properties" />
<property file="defaults.properties" />
<target name="clean">
<delete dir="${basedir}/results" />
</target>
<target name="prepare-build-filesystem" depends="clean">
<mkdir dir="${basedir}/../tmp/templates_c" />
<mkdir dir="${basedir}/../tmp/cache" />
<mkdir dir="${basedir}/../tmp/latest" />
<mkdir dir="${basedir}/../tmp/sessions" />
<chmod perm="a+rw">
<dirset dir="${basedir}/..">
<include name="config" />
<include name="tmp" />
<include name="tmp/templates_c" />
<include name="tmp/cache" />
<include name="tmp/latest" />
<include name="tmp/sessions" />
</dirset>
</chmod>
</target>
<target name="process-build-resources-pdo-mysql" depends="prepare-build-filesystem">
<copy file="${basedir}/config/pdo_mysql.template.php" tofile="${basedir}/../config/config.ini.php" overwrite="true">
<filterset>
<filtersfile file="${basedir}/build.properties"/>
</filterset>
</copy>
</target>
<target name="test-pdo-mysql" depends="process-build-resources-pdo-mysql">
<echo>PDO_MYSQL unit tests started</echo>
<mkdir dir="${basedir}/integration/processed"/>
<exec executable="${php.executable}" dir="${basedir}" failonerror="false" resultproperty="result-pdo-mysql" failifexecutionfails="true">
<arg value="all_tests.php" />
</exec>
<move file="${basedir}/integration/processed" tofile="${basedir}/integration/processed-pdo-mysql" />
<echo>PDO_MYSQL unit tests finished</echo>
</target>
<target name="process-build-resources-mysqli" depends="prepare-build-filesystem">
<copy file="${basedir}/config/mysqli.template.php" tofile="${basedir}/../config/config.ini.php" overwrite="true">
<filterset>
<filtersfile file="${basedir}/build.properties"/>
</filterset>
</copy>
</target>
<target name="test-mysqli" depends="process-build-resources-mysqli">
<echo>MYSQLI unit tests started</echo>
<mkdir dir="${basedir}/integration/processed"/>
<exec executable="${php.executable}" dir="${basedir}" failonerror="false" resultproperty="result-mysqli" failifexecutionfails="true">
<arg value="all_tests.php" />
</exec>
<move file="${basedir}/integration/processed" tofile="${basedir}/integration/processed-mysqli" />
<echo>MYSQLI unit tests finished</echo>
</target>
<target name="webtest">
<mkdir dir="${basedir}/integration/processed"/>
<delete file="${basedir}/../config/config.ini.php"/>
<ant antfile="${basedir}/build-canoo.xml"/>
</target>
<target name="schemaspy">
<echo>SchemaSpy started</echo>
<delete dir="${basedir}/../schemaspy-report"/>
<mkdir dir="${basedir}/../schemaspy-report"/>
<java jar="${basedir}/lib/java/schemaSpy_3.1.1.jar" fork="true" failonerror="false" resultproperty="result-schemaspy" maxmemory="256m" dir="${basedir}">
<arg value="-t"/>
<arg value="mysql"/>
<arg value="-host"/>
<arg value="${database.main.host}:${database.main.port}"/>
<arg value="-db"/>
<arg value="${database.main.name}"/>
<arg value="-cp"/>
<arg path="${basedir}/lib/java/mysql-connector-java-5.1.7.jar"/>
<arg value="-u"/>
<arg value="${database.main.username}"/>
<arg value="-o"/>
<arg path="${basedir}/../schemaspy-report"/>
<arg value="-p"/>
<arg value="${database.main.password}"/>
</java>
<echo>SchemaSpy finished</echo>
</target>
<target name="all" depends="test-pdo-mysql,test-mysqli,webtest,schemaspy">
<fail>
<condition>
<or>
<isfailure code="${result-mysqli}"/>
<isfailure code="${result-pdo-mysql}"/>
<isfailure code="${result-schemaspy}"/>
</or>
</condition>
</fail>
</target>
</project>
|