use the _new macro instead of _old also in trunk (HH)
[luatex.git] / source / texk / web2c / triptrap-sh
blob6c2fb779759bb612077f4b2fdc9dc900d799d507
1 #! /bin/sh
2 # shell script to run TRIP and TRAP tests and create diffs.
4 # Copyright (C) 2010-2015 Peter Breitenlohner <tex-live@tug.org>
6 # This file is free software; the copyright holder
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # Due to filename conflicts, these tests must be run sequentially.
12 me=`basename $0`
14 tmp=$me.$$
16 trap "rm -f $tmp" 1 2 13 15
18 echo "$me: Running TRIP and TRAP tests and creating diffs."
19 rc=0
20 for file
22 case $file in
23 trip.diffs) tst=triptest; msg='TRIP test for TeX';;
24 mftrap.diffs) tst=mftraptest; msg='TRAP test for Metafont';;
25 mfluatrap.diffs) tst=mfluadir/mfluatraptest; msg='TRAP test for MFLua';;
26 mfluajittrap.diffs) tst=mfluajitdir/mfluajittraptest; msg='TRAP test for MFLuaJIT';;
27 mptrap.diffs) tst=mplibdir/mptraptest; msg='MPTRAP test for MetaPost';;
28 etrip.diffs) tst=etexdir/etriptest; msg='e-TRIP test for e-TeX';;
29 ptrip.diffs) tst=ptexdir/ptriptest; msg='TRIP test for pTeX';;
30 eptrip.diffs) tst=eptexdir/eptriptest; msg='e-TRIP test for e-pTeX';;
31 uptrip.diffs) tst=uptexdir/uptriptest; msg='TRIP test for upTeX';;
32 euptrip.diffs) tst=euptexdir/euptriptest; msg='e-TRIP test for e-upTeX';;
33 *) echo "$me: Bad argument \`$file'"; exit 1;;
34 esac
35 echo ">>> Running $msg."
36 is_OK=:
37 $MAKE TESTS=$tst.test check-am >$tmp 2>&1 \
38 && grep "PASS: $tst.test" $tmp >/dev/null 2>&1 \
39 || { echo "FAIL: $tst.test"; is_OK=false; }
40 sed -e "s%$abs_srcdir/%SRCDIR/%" \
41 -e "s%\.\./%./%" \
42 $tst.log >$file
43 $is_OK && {
44 echo "PASS: $tst.test" >>$file
45 echo "PASS: $tst.test"
46 } || {
47 echo "FAIL: $tst.test" >>$file
48 rc=1
50 rm -f $tmp
51 done
52 echo "$me: All done"
53 exit $rc