summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-18 11:47:17 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-01-18 11:47:17 +0000
commitde3b07ea3448cc045b7580f8bc24d577aa2b893d (patch)
treeece2d14b8da9a20e1ded4c11c232c3cc683244f3 /Build/source
parent9d827978085ba371a330057c97facb96a22581fd (diff)
TeX: Stricter checking in triptest
git-svn-id: svn://tug.org/texlive/trunk@32711 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/ChangeLog5
-rwxr-xr-xBuild/source/texk/web2c/triptest40
-rwxr-xr-xBuild/source/texk/web2c/triptrap-sh15
3 files changed, 55 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 678ccebfba9..a18132c1036 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * triptest: Stricter checking.
+ * triptrap-sh: Adapted.
+
2014-01-17 Peter Breitenlohner <peb@mppmu.mpg.de>
* trap.test (removed): Renamed ...
diff --git a/Build/source/texk/web2c/triptest b/Build/source/texk/web2c/triptest
index 23c37904f39..bbb8b777085 100755
--- a/Build/source/texk/web2c/triptest
+++ b/Build/source/texk/web2c/triptest
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
testdir=$abs_srcdir/triptrap
@@ -10,6 +10,34 @@ TEXMFCNF=$testdir; export TEXMFCNF
rm -rf tripdir
mkdir tripdir
cd tripdir
+mkdir a b
+cat >filter <<-\_EOF
+ s,^\*\*(\./trip\.tex ##,** \&trip trip \
+ (trip.tex ##,
+ /^\\openout.*/,/^$/d
+ s/ (TeX Live 20[^)]*)//
+ s/(preloaded format=tex)/(INITEX)/
+ s/format=trip [^)][^)]*)/format=trip)/
+ s/) [0-9A-Z: ]*$/)/
+ s,^(\./,(,
+ s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/
+ s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of XYYY/
+ s/sequences out of [1-9].*/sequences out of XYYY/
+ s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of XYY/
+ s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/
+ s/9 ops out of [1-9][0-9]*/9 ops out of YYY/
+ s/ 16341\.999.*fil/ 16342.0fil/
+ s/ 16238\.999.*fil/ 16239.0fil/
+ s/ 16317\.999.*fil/ 16318.0fil/
+ s/ 16330\.999.*fil/ 16331.0fil/
+ s/ 16331\.999.*fil/ 16332.0fil/
+ s/ 16343\.999.*fil/ 16344.0fil/
+ s/ 9737\.587..fil/ 9737.58789fil/
+ s/TeX output 20..\...\...:..../TeX output 20YY.MM.DD:hhmm/
+ s/down4 639342.../down4 639342208/
+ s/y4 2039217../y4 203921760/
+ s/y0 2039217../y0 203921760/
+ _EOF
dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'"
@@ -44,7 +72,15 @@ $DIFF $DIFFFLAGS $testdir/trip.log trip.log
eval ../dvitype $dvitype_args trip.dvi >trip.typ || exit 1
$DIFF $DIFFFLAGS $testdir/trip.typ trip.typ
-$is_OK || {
+for f in tripin.log trip.fot trip.log trip.typ; do
+ sed $testdir/$f -f filter >a/$f
+ sed $f -f filter >b/$f
+ diff a/$f b/$f || is_OK=false
+done
+
+$is_OK && {
+ echo ">>> All differences are acceptable." >&2
+} || {
echo ">>> There were some errors." >&2
exit 1
}
diff --git a/Build/source/texk/web2c/triptrap-sh b/Build/source/texk/web2c/triptrap-sh
index c255f2ee114..37338cc2ffb 100755
--- a/Build/source/texk/web2c/triptrap-sh
+++ b/Build/source/texk/web2c/triptrap-sh
@@ -16,6 +16,7 @@ tmp=$me.$$
trap "rm -f $tmp" 1 2 13 15
echo "$me: Running TRIP and TRAP tests and creating diffs."
+rc=0
for file
do
case $file in
@@ -30,15 +31,23 @@ do
*) echo "$me: Bad argument \`$file'"; exit 1;;
esac
echo ">>> Running $msg."
+ is_OK=:
$MAKE TESTS=$tst check-am >$tmp 2>&1 \
&& grep "PASS: $tst" $tmp >/dev/null 2>&1 \
- || { echo "FAIL: $tst"; exit 1; }
+ || { echo "FAIL: $tst"; is_OK=false; }
sed -e "s%$abs_srcdir/%SRCDIR/%" \
-e "s%\.\./%./%" \
$tst.log >$file
- echo "PASS: $tst" >>$file
+ $is_OK && {
+ echo "PASS: $tst" >>$file
+ echo "PASS: $tst"
+ } || {
+ echo "FAIL: $tst" >>$file
+ rc=1
+ }
rm -f $tmp
- echo "PASS: $tst"
done
echo "$me: All done"
+exit $rc
+