blob: 59fd8330c4b3b2dce9493e66471cad77abea91c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
cleanup() {
rm -rf $TMPDIR
}
trap cleanup 0
run_testprog() {
local prog=$1
local input=$2
case "$prog" in
load_dump)
./$prog $input $TMPDIR/output 2>$TMPDIR/error
;;
*)
./$prog <$input >$TMPDIR/output 2>$TMPDIR/error
;;
esac
}
for testfile in $TESTFILES; do
mkdir -p $TMPDIR
${srcdir}/split-testfile.py $testfile $TMPDIR | while read input output; do
run_test load_dump $input $output
run_test loadf_dumpf $input $output
run_test loads_dumps $input $output
done || exit 1
rm -rf $TMPDIR
done
|