Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vladishev <aleksander.vladishev@zabbix.com>2017-02-18 19:15:24 +0300
committerAlexander Vladishev <aleksander.vladishev@zabbix.com>2017-02-18 19:15:24 +0300
commitd329607eb14a9f2c7a975998a5e80c59c77f3afe (patch)
tree8154310d0f63f5566d3df016d274753cba1de8eb /build.xml
parent75455cb63bcf8688a4b69db40c66de2bd859735f (diff)
.......... [ZBXNEXT-686] merged API tests from ZBXNEXT-686-api branch
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml18
1 files changed, 16 insertions, 2 deletions
diff --git a/build.xml b/build.xml
index 0cfe8706fc6..f8bbbd305ad 100644
--- a/build.xml
+++ b/build.xml
@@ -81,6 +81,9 @@
<arg line="--set ON_ERROR_STOP=1"/>
<arg line="${dbname}"/>
</exec>
+ </target>
+
+ <target name="init-frontend-postgresql" depends="init-postgresql">
<exec executable="psql" input="tests/data/data_test.sql" failonerror="on">
<env key="PGPASSWORD" value="${dbpassword}"/>
<arg line="-h '${dbhost}'"/>
@@ -123,6 +126,9 @@
<arg line="--password=${dbpassword}"/>
<arg line="${dbname}"/>
</exec>
+ </target>
+
+ <target name="init-frontend-mysql" depends="init-mysql">
<exec executable="mysql" input="tests/data/data_test.sql" failonerror="on">
<arg line="--host=${dbhost}"/>
<arg line="--user=${dbuser}"/>
@@ -144,9 +150,17 @@
</exec>
</target>
+ <target name="test-api">
+ <exec executable="phpunit" dir="frontends/php/tests" failonerror="off">
+ <arg line="--log-junit=${basedir}/build/logs/phpunit.xml --bootstrap=bootstrap.php api_json/ApiJsonTests.php"/>
+ </exec>
+ </target>
+
<target name="build-phpunit" depends="test-phpunit"/>
- <target name="build-mysql" depends="init-mysql,test-frontend"/>
- <target name="build-postgresql" depends="init-postgresql,test-frontend"/>
+ <target name="build-mysql" depends="init-frontend-mysql,test-frontend"/>
+ <target name="build-postgresql" depends="init-frontend-postgresql,test-frontend"/>
+ <target name="build-api-mysql" depends="init-mysql,test-api"/>
+ <target name="build-api-postgresql" depends="init-postgresql,test-api"/>
<!-- Default target -->
<target name="build" depends="build-phpunit,build-mysql,build-postgresql"/>