Skip to content

Commit

Permalink
....I..... [ZBX-15211] added key 'tests' for bootstrap.sh when workin…
Browse files Browse the repository at this point in the history
…g with cmocka tests

* commit 'fce1c3c08eb6d30f2057825196d73741f5e460fd':
  ....I..... [ZBX-15211] added key 'tests' for bootstrap.sh when working with cmocka tests

(cherry picked from commit 9e0f06d)
(cherry picked from commit 1fb1a96)
  • Loading branch information
Michael Veksler authored and Michael Veksler committed Oct 17, 2019
1 parent 75d363e commit 97f5cd5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ dist-hook:
$(top_distdir)/src/zabbix_java/src/com/zabbix/gateway/GeneralInformation.java; \
cat $(top_distdir)/go/src/zabbix/pkg/version/version.go|sed "s/{ZABBIX_RC_NUM}/$$branch$$type_num$$type_count/g"| \
sed "s/{ZABBIX_REVISION}/$$zabbix_revision/g" > $(top_distdir)/go/src/zabbix/pkg/version/version.go.new; \
mv $(top_distdir)/go/src/zabbix/pkg/version/version.go.new $(top_distdir)/go/src/zabbix/pkg/version/version.go; \
rm -f $(top_distdir)/conf_tests.m4
mv $(top_distdir)/go/src/zabbix/pkg/version/version.go.new $(top_distdir)/go/src/zabbix/pkg/version/version.go

rm -rf `find $(top_distdir) -name ".gitignore" -o -name ".gitattributes"`
rm -f $(top_distdir)/include/config.h
Expand Down
22 changes: 22 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

# Run this script to generate 'configure'

usage()
{
echo "usage: $0 [tests]"
exit 1
}

case $# in
0)
# disable tests
rm -f m4/conf_tests.m4
;;
1)
[ $1 = "tests" ] || usage

# enable tests
cp -f tests/conf_tests.m4 m4/ || exit $?
;;
*)
usage
;;
esac

aclocal -I m4
autoconf
autoheader
Expand Down
8 changes: 6 additions & 2 deletions build-backend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@
<!-- Build Zabbix with cmocka tests -->
<delete dir="tests_results"/>
<mkdir dir="tests_results"/>
<exec executable="./bootstrap.sh" failonerror="on"/>
<exec executable="./bootstrap.sh" failonerror="on">
<arg line="tests"/>
</exec>
<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=",">
Expand Down Expand Up @@ -283,7 +285,9 @@
<arg line="src"/>
<arg line="-zerocounters"/>
</exec>
<exec executable="./bootstrap.sh" failonerror="on"/>
<exec executable="./bootstrap.sh" failonerror="on">
<arg line="tests"/>
</exec>
<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"/>
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,6 @@ dnl * Output configuration results *
dnl * *
dnl *****************************************************************

sinclude([conf_tests.m4])
m4_ifdef([CONF_TESTS],[CONF_TESTS(ZBXCMOCKA)])

AC_OUTPUT([
Expand Down
File renamed without changes.

0 comments on commit 97f5cd5

Please sign in to comment.