Makefile.am 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. TESTS_ENVIRONMENT=
  2. TESTS=
  3. UNIT_TESTS=
  4. check_PROGRAMS=
  5. UNIT_TESTS += check_stack check_list check_indexedList check_builtin check_namespace check_memory check_services_view
  6. TESTS += $(UNIT_TESTS)
  7. check_PROGRAMS += $(UNIT_TESTS)
  8. TESTS_ENVIRONMENT_MEM="libtool --mode=execute valgrind --leak-check=full --quiet --suppressions=suppressions --gen-suppressions=no --error-exitcode=666"
  9. cov-report:
  10. mkdir -p coverage
  11. lcov --compat-libtool --directory . --directory ../src --capture --output-file coverage/app.info
  12. genhtml -o coverage/ coverage/app.info
  13. .PHONY: check-mem
  14. check-mem:
  15. $(MAKE) $(AM_MAKEFLAGS) check TESTS="$(UNIT_TESTS)" TESTS_ENVIRONMENT=$(TESTS_ENVIRONMENT_MEM)
  16. if COVERAGE
  17. $(MAKE) cov-report
  18. endif
  19. check_memory-mem: check_memory
  20. $(MAKE) $(AM_MAKEFLAGS) check TESTS="check_memory" TESTS_ENVIRONMENT=$(TESTS_ENVIRONMENT_MEM)
  21. clean-local:
  22. rm -rf coverage || true;
  23. rm -rf *.gcda *.gcdo *.gcno
  24. lcov --directory . --zerocounters
  25. # --- no changes beyond this line needed ---
  26. INCLUDE = @CHECK_CFLAGS@ -I$(top_builddir)/src -I$(top_builddir)/include
  27. LDADD = $(top_builddir)/lib/libopen62541.a @CHECK_LIBS@
  28. AM_LDFLAGS = $(LDADD)
  29. if COVERAGE
  30. AM_LDFLAGS += --coverage
  31. endif
  32. AM_CFLAGS = $(GLOBAL_AM_CFLAGS) $(INCLUDE)