summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/triptrap-sh
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/web2c/triptrap-sh
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/triptrap-sh')
-rwxr-xr-xBuild/source/texk/web2c/triptrap-sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/triptrap-sh b/Build/source/texk/web2c/triptrap-sh
new file mode 100755
index 00000000000..9a36ccc4b96
--- /dev/null
+++ b/Build/source/texk/web2c/triptrap-sh
@@ -0,0 +1,61 @@
+#! /bin/sh
+# $Id$
+# shell script to run TRIP and TRAP tests and create diffs.
+#
+# Copyright 2015-2021 Karl Berry <tex-live@tug.org>
+# Copyright 2010-2015 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holder
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# Due to filename conflicts, these tests must be run sequentially.
+
+me=`basename $0`
+
+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
+ trip.diffs) tst=triptest; msg='TRIP test for TeX';;
+ mftrap.diffs) tst=mftraptest; msg='TRAP test for Metafont';;
+ mfluatrap.diffs) tst=mfluadir/mfluatraptest; msg='TRAP test for MFLua';;
+ mfluajittrap.diffs) tst=mfluajitdir/mfluajittraptest; msg='TRAP test for MFLuaJIT';;
+ mptrap.diffs) tst=mplibdir/mptraptest; msg='MPTRAP test for MetaPost';;
+ etrip.diffs) tst=etexdir/etriptest; msg='e-TRIP test for e-TeX';;
+ ptrip.diffs) tst=ptexdir/ptriptest; msg='TRIP test for pTeX';;
+ eptrip.diffs) tst=eptexdir/eptriptest; msg='e-TRIP test for e-pTeX';;
+ uptrip.diffs) tst=uptexdir/uptriptest; msg='TRIP test for upTeX';;
+ euptrip.diffs) tst=euptexdir/euptriptest; msg='e-TRIP test for e-upTeX';;
+ *) echo "$me: Bad argument \`$file'"; exit 1;;
+ esac
+ echo ">>> Running $msg."
+ is_OK=:
+ $MAKE TESTS=$tst.test check-am >$tmp 2>&1 \
+ && grep "PASS: $tst.test" $tmp >/dev/null 2>&1 \
+ || { echo "FAIL: $tst.test"; is_OK=false; }
+
+ sed -e "s%$abs_srcdir/%SRCDIR/%" \
+ -e "s%\.\./%./%" \
+ $tst.log >$file
+
+ rm -f $tst.out # previous output file, if any.
+
+ $is_OK && {
+ echo "PASS: $tst.test" >>$file
+ echo "PASS: $tst.test"
+ rm -f $tmp
+ } || {
+ echo "FAIL: $tst.test" >>$file
+ # preserve our output file in case of failure
+ mv $tmp $tst.out
+ rc=1
+ }
+done
+echo "$me: All done"
+exit $rc