Debian Codegraph @

debian/tests/make-check

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