diff options
author | Viktors Tjarve <viktors.tjarve@zabbix.com> | 2018-05-22 08:52:26 +0300 |
---|---|---|
committer | Viktors Tjarve <viktors.tjarve@zabbix.com> | 2018-05-22 08:52:26 +0300 |
commit | 4d1954600a2b1c5f06dfc8b73eddc8b1a2524220 (patch) | |
tree | f2073d2ba95a747b1fd7c43023efcf46f65f24aa /build-backend.xml | |
parent | faf70c01bf99d324707e73e65cd6d7ad39d82c07 (diff) | |
parent | 9ecda5d705be5f420f36e2b1b2f129fdfed4d772 (diff) |
.......... [DEV-840] updated to the latest trunk (resolved conflicts)
Diffstat (limited to 'build-backend.xml')
-rw-r--r-- | build-backend.xml | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/build-backend.xml b/build-backend.xml index 8cae222bb86..53100ecbe86 100644 --- a/build-backend.xml +++ b/build-backend.xml @@ -36,7 +36,7 @@ <!-- Cppcheck static analyzer target --> <target name="cppcheck-static-analyzer"> - <exec executable="./bootstrap.sh" failonerror="on"></exec> + <exec executable="./bootstrap.sh" failonerror="on"/> <exec executable="scan-build" failonerror="on"> <arg line="./configure"/> <arg line="--enable-server --enable-agent --enable-proxy --with-mysql --with-jabber --with-libxml2 --with-unixodbc --with-net-snmp --with-ssh2 --with-libevent --with-ldap --with-libcurl"/> @@ -60,7 +60,7 @@ <!-- Clang Static Analyzer target with various configuration parameters --> <target name="clang-static-analyzer" depends="init-conf-options"> <delete dir="clang-scan-build-reports"/> - <exec executable="./bootstrap.sh" failonerror="on"></exec> + <exec executable="./bootstrap.sh" failonerror="on"/> <propertyselector property="conf.list" delimiter="," match="conf(\d+)"/> <sortlist property="conf.list" delimiter="," value="${conf.list}" override="true"/> <for list="${conf.list}" param="name" delimiter=","> @@ -94,8 +94,8 @@ <target name="init"> <!-- Create database schema --> - <exec executable="./bootstrap.sh" failonerror="on"></exec> - <exec executable="./configure" failonerror="on"></exec> + <exec executable="./bootstrap.sh" failonerror="on"/> + <exec executable="./configure" failonerror="on"/> <exec executable="make" failonerror="on"> <arg line="-s"/> <arg line="-j5"/> @@ -250,7 +250,7 @@ <!-- Build Zabbix with all supported databases --> <target name="make-db" depends="make-db-mysql,make-db-postgresql,make-db-oracle,make-db-db2"/> - + <macrodef name="make-tests"> <!-- Build Zabbix cmocka tests with the specified command line arguments --> <attribute name="conf"/> @@ -289,7 +289,7 @@ </trycatch> </sequential> </macrodef> - + <target name="init-cmocka-test-conf-options"> <!-- Zabbix various configuration parameters for cmocka tests --> <!-- Configuration option name must consist of prefix 'cmocka-', configuration order number @@ -304,7 +304,7 @@ <!-- Build Zabbix with cmocka tests --> <delete dir="tests_results"/> <mkdir dir="tests_results"/> - <exec executable="./bootstrap.sh" failonerror="on"></exec> + <exec executable="./bootstrap.sh" failonerror="on"/> <propertyselector property="conf.list" delimiter="," match="cmocka-(.*)" select="\1"/> <sortlist property="conf.list" delimiter="," value="${conf.list}" override="true"/> <for list="${conf.list}" param="name" delimiter=","> @@ -314,6 +314,34 @@ </for> </target> + <target name="gen-test-coverage-report"> + <!-- Generate Zabbix cmocka tests coverage report--> + <delete dir="tests_results"/> + <mkdir dir="tests_results"/> + <mkdir dir="tests_results/html"/> + <exec executable="lcov" failonerror="on"> + <arg line="--directory"/> + <arg line="src"/> + <arg line="-zerocounters"/> + </exec> + <exec executable="./bootstrap.sh" failonerror="on"/> + <make-tests conf="CFLAGS='--coverage' -q --enable-server --enable-agent --enable-proxy --enable-ipv6 --with-mysql" conf-name="gen-test-coverage-report"/> + <exec executable="lcov" failonerror="on"> + <arg line="--directory"/> + <arg line="src"/> + <arg line="--capture"/> + <arg line="--output-file"/> + <arg line="tests_results/html/app.info"/> + </exec> + <exec executable="genhtml" failonerror="on"> + <arg line="-p"/> + <arg line="${user.dir}"/> + <arg line="-o"/> + <arg line="tests_results/html"/> + <arg line="tests_results/html/app.info"/> + </exec> + </target> + <target name="run-unit-test"> <!-- Run C unit tests --> <sequential> |