diff options
author | Glebs Ivanovskis <git-no-reply@zabbix.com> | 2017-11-14 17:06:58 +0300 |
---|---|---|
committer | Glebs Ivanovskis <git-no-reply@zabbix.com> | 2017-11-14 17:06:58 +0300 |
commit | ae04735bdd9ee2f47be3ef644c2cab4f9d7d7543 (patch) | |
tree | af0e90151aa7d0ad949ff929a5ffa0f76c8e0f0a /Makefile.am | |
parent | 8bce93674365f18e6ad41b8e137503d320afcda2 (diff) | |
parent | cc69524afb659d8726a726a5a47bbef3d1dfd215 (diff) |
.......... [ZBXNEXT-761] updated to the latest trunk (without conflicts)
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index bb23e9bef38..173c141b547 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,4 +97,22 @@ TESTDIR = src test: cd $(TESTDIR) && $(MAKE) $(AM_MAKEFLAGS) test -.PHONY: test +## cmocka test support +if ZBXCMOCKA +WRAP_DB_FUNCS = \ + -Wl,--wrap=zbx_db_vselect \ + -Wl,--wrap=zbx_db_fetch \ + -Wl,--wrap=__zbx_DBexecute \ + -Wl,--wrap=DBbegin \ + -Wl,--wrap=DBcommit \ + -Wl,--wrap=DBexecute_multiple_query \ + -Wl,--wrap=DBfree_result + +tests: + $(MAKE) $(AM_MAKEFLAGS) && \ + cd tests && \ + $(MAKE) $(AM_MAKEFLAGS) LDFLAGS="$(LDFLAGS) $(WRAP_DB_FUNCS)" LIBS="$(LIBS) -lcmocka" && \ + ./tests_run.pl +endif + +.PHONY: test tests |