summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-26 14:47:32 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-26 14:47:32 +0000
commit6d16dca0348a36c830a6514b5b13d271f5e0c2eb (patch)
tree6691c178aa5decbbf891d3c26ed4217c88f91884 /Build/source/libs
parentdf0bc6e55838187cf085c4aac843f3f368d53aed (diff)
add test cases for 'make check'
git-svn-id: svn://tug.org/texlive/trunk@13968 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/teckit/ChangeLog6
-rw-r--r--Build/source/libs/teckit/Makefile.am15
-rw-r--r--Build/source/libs/teckit/Makefile.in114
3 files changed, 127 insertions, 8 deletions
diff --git a/Build/source/libs/teckit/ChangeLog b/Build/source/libs/teckit/ChangeLog
index f714ced14d7..e444d6f6f60 100644
--- a/Build/source/libs/teckit/ChangeLog
+++ b/Build/source/libs/teckit/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * teckit.test, tex-text.map, tex-text.tec (all new):
+ Shell script and data for test case.
+ * Makefile.am: add test case.
+
2009-06-25 Peter Breitenlohner <peb@mppmu.mpg.de>
* source/Compiler.h: change type of Compiler::Pass.passType
diff --git a/Build/source/libs/teckit/Makefile.am b/Build/source/libs/teckit/Makefile.am
index faf0661bcb2..505b75d0832 100644
--- a/Build/source/libs/teckit/Makefile.am
+++ b/Build/source/libs/teckit/Makefile.am
@@ -53,6 +53,21 @@ noinst_HEADERS = \
## Rebuild zlib
@ZLIB_RULE@
+## Tests
+##
+if build
+TESTS = teckit.test
+endif build
+
+EXTRA_DIST += \
+ teckit.test \
+ tex-text.map \
+ tex-text.tec
+
+## Files generated by TESTS
+##
+CLEANFILES = xtex-text.tec
+
## Not used
##
EXTRA_DIST += \
diff --git a/Build/source/libs/teckit/Makefile.in b/Build/source/libs/teckit/Makefile.in
index 0f5e8414deb..2fd00538ee8 100644
--- a/Build/source/libs/teckit/Makefile.in
+++ b/Build/source/libs/teckit/Makefile.in
@@ -94,6 +94,8 @@ DIST_SOURCES = $(libTECkit_a_SOURCES) $(libTECkit_Compiler_a_SOURCES) \
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -225,10 +227,10 @@ libTECkit_Compiler_a_DEPENDENCIES = $(ZLIB_DEPEND)
libTECkit_a_SOURCES = \
source/Engine.cpp
-EXTRA_DIST = source/NormalizationData.c SFconv autogen.sh ax_misc.m4 \
- ax_prog_rc.m4 bin docs/Calling_TECkit_from_VB.doc \
- docs/Makefile.am docs/Makefile.in \
- docs/TECkit_Binary_Format.doc \
+EXTRA_DIST = source/NormalizationData.c teckit.test tex-text.map \
+ tex-text.tec SFconv autogen.sh ax_misc.m4 ax_prog_rc.m4 bin \
+ docs/Calling_TECkit_from_VB.doc docs/Makefile.am \
+ docs/Makefile.in docs/TECkit_Binary_Format.doc \
docs/TECkit_Binary_Format.doc.pdf docs/TECkit_Language_2.1.doc \
docs/TECkit_Language_2.1.doc.pdf docs/TECkit_version_2.1.doc \
docs/TECkit_version_2.1.doc.pdf lib license/LICENSING.txt \
@@ -254,6 +256,8 @@ noinst_HEADERS = \
source/TECkit_Format.h \
source/ulong_chartraits.h
+@build_TRUE@TESTS = teckit.test
+CLEANFILES = xtex-text.tec
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -497,6 +501,98 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ echo "$$grn$$dashes"; \
+ else \
+ echo "$$red$$dashes"; \
+ fi; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes$$std"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@@ -647,6 +743,7 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) config.h
installdirs:
@@ -670,6 +767,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -751,11 +849,11 @@ ps-am:
uninstall-am: uninstall-binPROGRAMS
-.MAKE: all install-am install-strip
+.MAKE: all check-am install-am install-strip
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
- clean-binPROGRAMS clean-generic clean-noinstLIBRARIES ctags \
- dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzma \
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
+ clean clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
+ ctags dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzma \
dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \