<target name="init-integration-postgresql" depends="create-configs,init-integration,make-binaries-postgresql,init-server-postgresql,init-proxy-postgresql">
<?xml version="1.0" encoding="UTF-8"?>
<project name="Zabbix" default="build" basedir=".">
<target name="init-common">
<condition property="phpunit_filter" value=" --filter='${PHPUNIT_FILTER}'" else="">
<isset property="PHPUNIT_FILTER" />
<length string="${PHPUNIT_FILTER}" when="greater" length="0"/>
<delete dir="build/logs" failonerror="off"/>
<mkdir dir="build/logs"/>
<target name="create-configs" depends="init-common">
<property name="url" value="${URL}"/>
<property name="dbtype" value="${DBTYPE}"/>
<property name="dbhost" value="${DBHOST}"/>
<property name="dbname" value="${DBNAME}"/>
<property name="dbuser" value="${DBUSER}"/>
<property name="dbpassword" value="${DBPASSWORD}"/>
<property name="phpunit_error_log" value="${PHPUNIT_ERROR_LOG}"/>
<property name="phpunit_port_prefix" value="${PHPUNIT_PORT_PREFIX}"/>
<property name="screenshot_references_dir" value="${SCREENSHOT_REFERENCES_DIR}"/>
<condition property="phpunit_driver_address" value="${PHPUNIT_DRIVER_ADDRESS}" else="localhost">
<isset property="PHPUNIT_DRIVER_ADDRESS" />
<length string="${PHPUNIT_DRIVER_ADDRESS}" when="greater" length="0"/>
<property environment="env"/>
<copy overwrite="true" file="frontends/php/tests/bootstrap.php.template" tofile="frontends/php/tests/bootstrap.php"/>
<replace file="frontends/php/tests/bootstrap.php" token="{URL}" value="${env.WORKSPACE_URL}${url}"/>
<replace file="frontends/php/tests/bootstrap.php" token="{BASEDIR}" value="${basedir}"/>
<replace file="frontends/php/tests/bootstrap.php" token="{SCREENSHOT_DIR}" value="${env.SCREENSHOT_DIR}"/>
<replace file="frontends/php/tests/bootstrap.php" token="{SCREENSHOT_URL}" value="${env.SCREENSHOT_URL}"/>
<replace file="frontends/php/tests/bootstrap.php" token="{BINARY_DIR}" value="${basedir}/sbin/"/>
<replace file="frontends/php/tests/bootstrap.php" token="{CONFIG_SOURCE_DIR}" value="${basedir}/conf/"/>
<replace file="frontends/php/tests/bootstrap.php" token="{CONFIG_DIR}" value="${basedir}/etc/"/>
<replace file="frontends/php/tests/bootstrap.php" token="{COMPONENT_DIR}" value="${basedir}/runtime/"/>
<replace file="frontends/php/tests/bootstrap.php" token="{PORT_PREFIX}" value="${phpunit_port_prefix}"/>
<replace file="frontends/php/tests/bootstrap.php" token="{SCREENSHOT_REFERENCES_DIR}" value="${screenshot_references_dir}"/>
<replace file="frontends/php/tests/bootstrap.php" token="{PHPUNIT_DRIVER_ADDRESS}" value="${phpunit_driver_address}"/>
<copy overwrite="true" file="frontends/php/tests/templates/zabbix.conf.php" tofile="frontends/php/conf/zabbix.conf.php"/>
<replace file="frontends/php/conf/zabbix.conf.php" token="{DBTYPE}" value="${dbtype}"/>
<replace file="frontends/php/conf/zabbix.conf.php" token="{DBHOST}" value="${dbhost}"/>
<replace file="frontends/php/conf/zabbix.conf.php" token="{DBNAME}" value="${dbname}"/>
<replace file="frontends/php/conf/zabbix.conf.php" token="{DBUSER}" value="${dbuser}"/>
<replace file="frontends/php/conf/zabbix.conf.php" token="{DBPASSWORD}" value="${dbpassword}"/>
<replace file="frontends/php/conf/zabbix.conf.php" token="{PHPUNIT_ERROR_LOG}" value="${phpunit_error_log}"/>
<target name="init-integration">
<copy overwrite="true" file="src/go/conf/zabbix_agent2.conf" tofile="conf/zabbix_agent2.conf"/>