Debian Codegraph @

debian/tests/stresstest

raw symbols SCIP
1 #! /bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 if [scip-shell system . . `[`. $# == 0 ] || [scip-shell system . . `[`. $# == 1 ]
4 then
5 catscip-shell system . . cat. <<EOF
6 Usage: $0 ( BIBFILE | AUXFILE ) ... DESTDIR
7 This script runs bibtool with many different arguments and is
8 intended to help comparing the behaviour of old and new bibtool
9 binaries when updating the package. Use at your own risk.
10 It produces a many files named DESTDIR/testout:*, and all such
11 files are removed if they already exist.
12 DESTDIR will be created if it does not already exist.
13 EOF
14 exit 100
15 fi
16
17 : ${BIBTOOL='bibtool'}
18
19 AUXFILES=
20 BIBFILES=
21 IBIBFILES=
22 while [scip-shell system . . `[`. $# != 1 ]
23 do
24 case $1 in
25 *.aux)
26 AUXFILES="$AUXFILES $1"
27 ;;
28 *) [scip-shell system . . `[`. -r $1 ] || (echoscip-shell system . . echo. $1: not found ; falsescip-shell system . . false.) || exit 2
29 BIBFILES="$BIBFILES $1"
30 IBIBFILES="$IBIBFILES -i $1"
31 ;;
32 esac
33 shift
34 done
35
36 DESTDIR=$1 ;
37 [scip-shell system . . `[`. -d $DESTDIR ] || mkdirscip-shell system . . mkdir. $DESTDIR || exit 1
38
39 rmscip-shell system . . rm. -f $DESTDIR/testout:*
40 echoscip-shell system . . echo. $AUXFILES > $DESTDIR/testout:context
41 echoscip-shell system . . echo. $BIBFILES >> $DESTDIR/testout:context
42 export >> $DESTDIR/testout:context
43
44 [scip-shell system . . `[`. "$BIBFILES" ] || (echoscip-shell system . . echo. No bibfiles given ; falsescip-shell system . . false.) || exit 2
45
46 iomode=a
47 for acode in : -h -k:-v -k:-A0 -K:-Aa -k:-AA -s -S:-q \
48 -r:braces -r:check_y -r:improve -r:opt -r:sort_fld -r:tex_def \
49 nosuchfile
50 do
51 args=`echoscip-shell system . . echo. $acode | trscip-shell system . . tr. : ' '`
52 stdout=$DESTDIR/testout:$acode
53 stderr=${stdout}@2
54 case $iomode in
55 a)
56 cmd="$BIBTOOL $args -m ${stdout}@m"
57 echoscip-shell system . . echo. cat $BIBFILES "|" $cmd ">" $stdout
58 catscip-shell system . . cat. $BIBFILES | $cmd > $stdout 2> $stderr
59 ;;
60 aa)
61 echoscip-shell system . . echo. $BIBTOOL $IBIBFILES $args ">" $stdout
62 $BIBTOOL $IBIBFILES $args > $stdout 2> $stderr
63 ;;
64 *)
65 iomode=
66 cmd="$BIBTOOL $args -M - -o $stdout $BIBFILES"
67 echoscip-shell system . . echo. $cmd ">" ${stdout}@M
68 $cmd > ${stdout}@M 2> $stderr
69 ;;
70 esac
71 echoscip-shell system . . echo. [exit code $?] >> $stderr
72 iomode=a$iomode
73 done
74
75 for auxfile in $AUXFILES
76 do
77 stdout=$DESTDIR/testout:-x`echoscip-shell system . . echo. $auxfile | trscip-shell system . . tr. /scip-shell filesystem . . `/`. :`
78 stderr=${stdout}@2
79 echoscip-shell system . . echo. $BIBTOOL -x $auxfile ">" $stdout
80 $BIBTOOL -x $auxfile > $stdout 2> $stderr
81 echoscip-shell system . . echo. [exit code $?] >> $stderr
82 done
83
84 exit 0