summaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 08e0476..a13e63b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -229,6 +229,41 @@ uninstall-archtab:
@rmdir '$(DESTDIR)/$(archtabdir)'
@rmdir '$(DESTDIR)/$(pkgdatadir)'
+test:
+ @set -e; \
+ mkdir -p tests; \
+ cd tests; \
+ . ./testlib.sh; \
+ PATH="$${PATH}:$(DESTDIR)/$(bindir)"; \
+ t_all=0; t_failed=0; \
+ for t_test in $(tests); do \
+ t_fail='false'; \
+ . "$(srcdir)/$${t_test}" >out 2>&1; \
+ if "$${t_fail}"; then \
+ printf 'FAIL: %s\n' "$${t_test#tests/}"; \
+ cat out | sed 's/^/ /'; \
+ t_failed=$$(($$t_failed + 1)); \
+ else \
+ printf 'PASS: %s\n' "$${t_test#tests/}"; \
+ fi; \
+ t_all=$$(($$t_all + 1)); \
+ rm out; \
+ done; \
+ t_banner="$$(printf '%d out of %d tests failed' \
+ $${t_failed} $${t_all})"; \
+ t_l=$$(printf '%s\n' "$${t_banner}" | wc -c); \
+ t_i=1; while [ "$${t_i}" -lt "$${t_l}" ]; do \
+ printf '='; \
+ t_i=$$(($$t_i + 1)); \
+ done; \
+ printf '\n%s\n' "$${t_banner}"; \
+ t_i=1; while [ "$${t_i}" -lt "$${t_l}" ]; do \
+ printf '='; \
+ t_i=$$(($$t_i + 1)); \
+ done; \
+ printf '\n'; \
+ [ $${t_failed} -eq 0 ]
+
$(distdir):
@mkdir -p '$(distdir)'
@set -e; for f in $(distfiles); do \