Commits
1
1
<?xml version="1.0" encoding="UTF-8"?>
2
2
<project name="Zabbix" default="build" basedir=".">
3
3
<target name="init-common">
4
+
<condition property="phpunit_filter" value=" --filter='${PHPUNIT_FILTER}'" else="">
5
+
<and>
6
+
<isset property="PHPUNIT_FILTER" />
7
+
<length string="${PHPUNIT_FILTER}" when="greater" length="0"/>
8
+
</and>
9
+
</condition>
10
+
4
11
<!-- Delete build directories from the previous run -->
5
12
<delete dir="build/logs" failonerror="off"/>
6
13
<!-- Create the different build directories -->
7
14
<mkdir dir="build/logs"/>
8
15
</target>
9
16
10
17
<target name="create-configs" depends="init-common">
11
18
<property name="url" value="${URL}"/>
12
19
<property name="dbtype" value="${DBTYPE}"/>
13
20
<property name="dbhost" value="${DBHOST}"/>
130
137
<arg line="--host=${dbhost}"/>
131
138
<arg line="--user=${dbuser}"/>
132
139
<arg line="--password=${dbpassword}"/>
133
140
<arg line="${dbname}"/>
134
141
</exec>
135
142
</target>
136
143
137
144
<target name="test-phpunit" depends="init-common">
138
145
<exec executable="phpunit" dir="frontends/php/tests/unit" failonerror="off">
139
146
<arg line="--log-junit=${basedir}/build/logs/phpunit.xml"/>
147
+
<arg line="${phpunit_filter}"/>
140
148
<arg line="include/"/>
141
149
</exec>
142
150
</target>
143
151
144
152
<target name="test-frontend">
145
153
<exec executable="phpunit" dir="frontends/php/tests" failonerror="off">
146
-
<arg line="--log-junit=${basedir}/build/logs/phpunit.xml --bootstrap=bootstrap.php frontend.php"/>
154
+
<arg line="--log-junit=${basedir}/build/logs/phpunit.xml"/>
155
+
<arg line="--bootstrap=bootstrap.php"/>
156
+
<arg line="${phpunit_filter}"/>
157
+
<arg line="frontend.php"/>
147
158
</exec>
148
159
</target>
149
160
150
161
<target name="build-phpunit" depends="test-phpunit"/>
151
162
<target name="build-mysql" depends="init-mysql,test-frontend"/>
152
163
<target name="build-postgresql" depends="init-postgresql,test-frontend"/>
153
164
154
165
<!-- Default target -->
155
166
<target name="build" depends="build-phpunit,build-mysql,build-postgresql"/>
156
167
</project>