From 95594b590e0230b4d826a7ca563b8d1a4e98a9c1 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 23 Dec 2018 16:57:01 -0500 Subject: Makefile.am, tests/local.mk: Use TAP --- (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 8e9fbf4..2378355 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,16 @@ else PACKAGE_VERSION_GIT = $(PACKAGE_VERSION) endif +# PACKAGE_STRING is used in the test suite output and log. +# PACKAGE_VERSION can't be overridden. Automake ignores it in the IN_GIT +# conditional (and throws a warning), and setting it to $(PACKAGE_VERSION_GIT) +# outside the conditional causes PACKAGE_VERSION_GIT to reference itself. +# VERSION is not set here because it is used by: +# * Automake's distdir macro +# * Automake's distdir target (which checks for $(VERSION) in NEWS) +# * Our release target +PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION_GIT) + MANUAL = Distribution Build System SUFFIXES = .sh .sho .1in .1 .3in .3 .ms @@ -81,14 +91,16 @@ EXTRA_DIST = \ $(man1_sources) \ $(man3_sources) \ $(locale_sources) \ - $(tests) \ - $(tests_data) \ + $(TESTS) \ tools/shpp.sh \ tools/shld.sh \ - tests/common.sh \ build-aux/tap-driver.sh \ tests/aux/tap-functions.sh +TEST_EXTENSIONS = .sh +SH_LOG_DRIVER = \ + AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build-aux/tap-driver.sh + all-local: $(locale_MESSAGES) install-data-local: $(locale_MESSAGES) @@ -125,34 +137,6 @@ dist-hook: mv '$(distdir)/ChangeLog~' '$(distdir)/ChangeLog'; \ fi -test: - @cd '$(abs_top_srcdir)/tests'; \ - all=0; failed=0; \ - for test in $(tests); do \ - out="$$($(SH) "$(abs_top_srcdir)/$${test}" 2>&1)"; \ - if [ $${?} -eq 0 ]; then \ - printf 'PASS: %s\n' "$${test}"; \ - else \ - printf 'FAIL: %s\n' "$${test}"; \ - echo "$${out}" | sed 's/^/ /'; \ - failed=$$(($$failed + 1)); \ - fi; \ - all=$$(($$all + 1)); \ - done; \ - banner="$$(printf '%d out of %d tests failed' $${failed} $${all})"; \ - l=$$(echo "$${banner}" | wc -c); \ - i=1; while [ "$${i}" -lt "$${l}" ]; do \ - printf '='; \ - i=$$(($$i + 1)); \ - done; \ - printf '\n%s\n' "$${banner}"; \ - i=1; while [ $${i} -lt $${l} ]; do \ - printf '='; \ - i=$$(($$i + 1)); \ - done; \ - printf '\n'; \ - exit $${failed} - lib/libopkbuild$(SHSOEXT)$(libopkbuild_shsoversion): $(libopkbuild_dependencies) @rm -f lib/libopkbuild$(SHSOEXT)$(libopkbuild_shsoversion) $(AM_V_CCLD)$(LIBLINK) $(libopkbuild_ldadd) -- cgit v0.9.1