diff options
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipng/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipng/Makefile.am | 3 | ||||
-rw-r--r-- | Build/source/texk/dvipng/Makefile.in | 111 | ||||
-rwxr-xr-x | Build/source/texk/dvipng/dvipng.test | 23 |
4 files changed, 122 insertions, 20 deletions
diff --git a/Build/source/texk/dvipng/ChangeLog b/Build/source/texk/dvipng/ChangeLog index 1bf466ebfaf..7be04222638 100644 --- a/Build/source/texk/dvipng/ChangeLog +++ b/Build/source/texk/dvipng/ChangeLog @@ -1,3 +1,8 @@ +2010-04-20 Peter Breitenlohner <peb@mppmu.mpg.de> + + * dvipng.test: Check results from running kpsewhich. + * Makefile.am: Reactivate the test. + 2010-04-19 Karl Berry <karl@tug.org> * Makefile.am: forget the tests. diff --git a/Build/source/texk/dvipng/Makefile.am b/Build/source/texk/dvipng/Makefile.am index e0849ed0c27..bcddc3e197d 100644 --- a/Build/source/texk/dvipng/Makefile.am +++ b/Build/source/texk/dvipng/Makefile.am @@ -112,8 +112,7 @@ uninstall-hook: rm -f $(DESTDIR)$(bindir)/dvigif$(EXEEXT) endif have_gif -#TESTS = dvipng.test -#TESTS_ENVIRONMENT = DVIPNG_TREE='$(DVIPNG_TREE)' +TESTS = dvipng.test EXTRA_DIST += dvipng.test dvipng-test.dvi diff --git a/Build/source/texk/dvipng/Makefile.in b/Build/source/texk/dvipng/Makefile.in index 526889df219..ca6cc6e52ad 100644 --- a/Build/source/texk/dvipng/Makefile.in +++ b/Build/source/texk/dvipng/Makefile.in @@ -132,6 +132,8 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -317,9 +319,6 @@ top_srcdir = @top_srcdir@ # #************************************************************************ ACLOCAL_AMFLAGS = -I ../../m4 -I m4 - -#TESTS = dvipng.test -#TESTS_ENVIRONMENT = DVIPNG_TREE='$(DVIPNG_TREE)' EXTRA_DIST = $(DVIPNG_TREE) $(DVIPNG_TREE)-PATCHES dvipng.test \ dvipng-test.dvi INCLUDES = -I$(top_srcdir)/$(DVIPNG_TREE) $(KPATHSEA_INCLUDES) \ @@ -346,6 +345,7 @@ dvipng_dependencies = $(KPATHSEA_DEPEND) $(ZLIB_DEPEND) \ DISTCLEANFILES = config.force LDADD = $(KPATHSEA_LIBS) $(GD_LIBS) $(FREETYPE2_LIBS) $(T1LIB_LIBS) \ $(LIBPNG_LIBS) $(ZLIB_LIBS) +TESTS = dvipng.test CLEANFILES = missfont.log test_dvipng.aux test_dvipng.dvi test_dvipng.log test_dvipng*.png all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -892,6 +892,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)" @@ -1071,6 +1163,7 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(PROGRAMS) config.h installdirs: installdirs-recursive @@ -1182,16 +1275,16 @@ ps-am: uninstall-am: uninstall-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \ ctags-recursive install-am install-exec-am install-strip \ tags-recursive uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags ctags-recursive 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 \ + all all-am am--refresh check check-TESTS check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool ctags \ + ctags-recursive 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-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ diff --git a/Build/source/texk/dvipng/dvipng.test b/Build/source/texk/dvipng/dvipng.test index 1c76180c9ea..75c1c4afebf 100755 --- a/Build/source/texk/dvipng/dvipng.test +++ b/Build/source/texk/dvipng/dvipng.test @@ -2,19 +2,24 @@ # $Id$ # Public domain. Originally written by Peter Breitenlohner, 2009. -TEXMFCNF=$(dirname $(kpsewhich texmf.cnf)) -TEXFONTMAPS=$(dirname $(dirname $(kpsewhich psfonts.map)))// -ENCFONTS=$(dirname $(dirname $(kpsewhich 8r.enc)))// -TEXMFMAIN=$(kpsewhich --expand-var='$TEXMFMAIN') -TEXMFDIST=$(kpsewhich --expand-var='$TEXMFDIST') +get_val () { + res=$(kpsewhich "$@") || { echo "\"kpsewhich $@\" failed"; exit 77; } +} + +get_val mktex.cnf +TEXMFCNF=$(dirname $res) +get_val psfonts.map +TEXFONTMAPS=$(dirname $(dirname $res))// +get_val 8r.enc +ENCFONTS=$(dirname $(dirname $res))// +get_val --expand-var='$TEXMFMAIN' +TEXMFMAIN=$res +get_val --expand-var='$TEXMFDIST' +TEXMFDIST=$res TEXMFLOCAL=$(kpsewhich --expand-var='$TEXMFLOCAL') export TEXMFCNF TEXFONTMAPS ENCFONTS TEXMFMAIN TEXMFDIST TEXMFLOCAL -# running latex in the build tree has many too many prerequisites. -# we just check in the dvi. -#latex $srcdir/$DVIPNG_TREE/test_dvipng.tex || exit 77 - ./dvipng -T tight -strict $srcdir/dvipng-test.dvi || exit 1 echo View the result e.g. with display dvipng-test\*.png |