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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
#!/bin/bash
# autopkgtest check based on upstream check script runalltests
set -ue
tcc naucompare.c -o $AUTOPKGTEST_TMP/naucompare
cp -p nautest[acdefghijklmnopqrstuvwx].ans $AUTOPKGTEST_TMP
cp -p nautestb[123].ans $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP
tdx=0
runonetest() {
cmd="$1"
in="$2"
ok="$3"
printf "%s %s %s " "$cmd" "$in" "$ok"
if [ "X$in" = "X" ] ; then
in=/dev/null
elif [ ! -r "$in" ] ; then
echo "File $in not found or not readable."
exit 1
fi
if [ ! -r "$ok" ] ; then
echo "File $ok not found or not readable."
exit 1
fi
tdx=`expr $tdx + 1`
out1=`printf "runtest-%02d.data" $tdx`
out2=`printf "runtest-%02d.atad" $tdx`
eval $cmd <"$in" 2>$out2 >$out1
LC_COLLATE=C sort $out2 >>$out1
if ./naucompare "$out1" "$ok" ; then
rm $out1 $out2
else
echo "Output file is $out1"
rm $out2
fi
}
runonetest "nauty-geng -ud1D7t 11" "" nautesta.ans
runonetest "nauty-geng -cd1f 10 | nauty-labelg -q" "" nautestb1.ans
runonetest "nauty-geng -cd1f 10 | nauty-labelg -qS" "" nautestb2.ans
runonetest "nauty-geng -cd1f 10 | nauty-labelg -qt" "" nautestb3.ans
runonetest "nauty-genrang -S4321 -r3 114 100 | nauty-countg --nedDrP -q" "" nautestc.ans
runonetest "nauty-gentourng -q -z 8 | nauty-pickg -T3" "" nautestd.ans
runonetest "nauty-gentreeg -q -s 18 | nauty-countg -z6 --o" "" nauteste.ans
runonetest "nauty-geng -c -qp 8 9 | nauty-directg -q -o | nauty-converseg -q | nauty-labelg -q" "" nautestf.ans
runonetest "nauty-genbg -q 4 3 10 | nauty-vcolg -m5 -T" "" nautestg.ans
runonetest "nauty-genposetg 8 o q" "" nautesth.ans
runonetest "nauty-genspecialg -q -c12 -b11,4 -P5,2 -T3,4,5 -X30" "" nautesti.ans
runonetest "nauty-genspecialg -qz -c12 -b11,4 -G30,-30 -T3,4,5" "" nautestj.ans
runonetest "nauty-gentreeg -q 3:4 | nauty-assembleg -n4:12L -cq" "" nautestk.ans
runonetest "nauty-geng -q 10 12 | nauty-countg --WTKcc,ee,hk" "" nautestl.ans
runonetest "nauty-genquarticg -q 9 | nauty-copyg -i" "" nautestm.ans
runonetest "nauty-gengL -d2D2 33" "" nautestn.ans
runonetest "nauty-geng -bq 9 | nauty-biplabg -q | nauty-NRswitchg -q" "" nautesto.ans
runonetest "nauty-genspecialg -Q4 -q | nauty-addedgeg -tq | nauty-deledgeg -qv10" "" nautestp.ans
runonetest "nauty-genktreeg -k3 -q 11 | nauty-complg -q" "" nautestq.ans
runonetest "nauty-geng -qd5 10 | nauty-countg --dkk" "" nautestr.ans
runonetest "nauty-geng -q -D4 9 | nauty-ranlabg -q | nauty-shortg -q" "" nautests.ans
runonetest "nauty-geng -q -T 10 | nauty-countg --N" "" nautestt.ans
runonetest "nauty-geng -q -TD6 10 | nauty-countg --NN,A" "" nautestu.ans
runonetest "nauty-geng -q -TD6 10 | nauty-ransubg -qS765 -P9/10 | nauty-countg --NN,A,G,GG" "" nautestv.ans
runonetest "nauty-genrang -q -P3 -S1234 70 1000 | nauty-countg --G,GG" "" nautestw.ans
runonetest "nauty-genrang -q -P4 -z -S1234 70 500 | nauty-countg --G,GG" "" nautestx.ans
exit 0
|