1#!/bin/sh 2# Run all nauty checks 3 4# runonetest command input output 5runonetest() { 6cmd="$1" 7in="$2" 8ok="$3" 9printf "%s %s %s " "$cmd" "$in" "$ok" 10 11if [ "X$in" = "X" ] ; then 12 in=/dev/null 13elif [ ! -r "$in" ] ; then 14 echo "File $in not found or not readable." 15 exit 1 16fi 17 18if [ ! -r "$ok" ] ; then 19 echo "File $ok not found or not readable." 20 exit 1 21fi 22 23out1=`mktemp runtest.XXXXXX` 24out2=`mktemp runtest.XXXXXX` 25 26eval $cmd <"$in" 2>$out2 >$out1 27LC_LANG=C sort $out2 >>$out1 28if ./naucompare "$out1" "$ok" ; then 29 rm $out1 $out2 30else 31 echo "Output file is $out1" 32 rm $out2 33 fails=`expr $fails + 1` 34fi 35} 36 37fails=0 38 39if ! ./nautestS ; then 40 echo "Basic macros for WORDSIZE=16 failed" 41 exit 1 42fi 43 44if ! ./nautestW ; then 45 echo "Basic macros for WORDSIZE=32 failed" 46 exit 1 47fi 48 49if ! ./nautestL ; then 50 echo "Basic macros for WORDSIZE=64 failed" 51 exit 1 52fi 53 54runonetest ./dreadtest nautest1.dre nautest1a.ans 55runonetest ./dreadtest nautest1.dre nautest1a.ans 56runonetest ./dreadtest nautest1.dre nautest1a.ans 57runonetest "./dreadtest -o As" nautest1.dre nautest1b.ans 58runonetest "./dreadtest -o At" nautest1.dre nautest1c.ans 59runonetest ./dreadtestS nautest1.dre nautest1a.ans 60runonetest "./dreadtestS -o As" nautest1.dre nautest1b.ans 61runonetest ./dreadtestW nautest1.dre nautest1a.ans 62runonetest "./dreadtestW -o As" nautest1.dre nautest1b.ans 63runonetest ./dreadtestL nautest1.dre nautest1a.ans 64runonetest "./dreadtestL -o As" nautest1.dre nautest1b.ans 65runonetest ./dreadtestL1 nautest1.dre nautest1a.ans 66runonetest "./dreadtestL1 -o As" nautest1.dre nautest1b.ans 67runonetest ./dreadtest4K nautest1.dre nautest1a.ans 68runonetest "./dreadtest4K -o As" nautest1.dre nautest1b.ans 69runonetest "./dreadtest4K -o At" nautest1.dre nautest1c.ans 70 71runonetest ./dreadtest nautest2.dre nautest2a.ans 72runonetest "./dreadtest -o As" nautest2.dre nautest2b.ans 73runonetest "./dreadtest -o At" nautest2.dre nautest2c.ans 74runonetest ./dreadtestS nautest2.dre nautest2a.ans 75runonetest "./dreadtestS -o As" nautest2.dre nautest2b.ans 76runonetest ./dreadtestW nautest2.dre nautest2a.ans 77runonetest "./dreadtestW -o As" nautest2.dre nautest2b.ans 78runonetest "./dreadtestW -o At" nautest2.dre nautest2c.ans 79runonetest ./dreadtestL nautest2.dre nautest2a.ans 80runonetest "./dreadtestL -o As" nautest2.dre nautest2b.ans 81runonetest "./dreadtestL -o At" nautest2.dre nautest2c.ans 82runonetest ./dreadtest1 nautest2.dre nautest2a.ans 83runonetest "./dreadtest1 -o As" nautest2.dre nautest2b.ans 84runonetest ./dreadtestS1 nautest2.dre nautest2a.ans 85runonetest "./dreadtestS1 -o As" nautest2.dre nautest2b.ans 86runonetest ./dreadtestW1 nautest2.dre nautest2a.ans 87runonetest "./dreadtestW1 -o As" nautest2.dre nautest2b.ans 88runonetest ./dreadtestL1 nautest2.dre nautest2a.ans 89runonetest "./dreadtestL1 -o As" nautest2.dre nautest2b.ans 90runonetest ./dreadtest4K nautest2.dre nautest2a.ans 91runonetest "./dreadtest4K -o As" nautest2.dre nautest2b.ans 92 93runonetest "./geng -ud1D7t 11" "" nautesta.ans 94runonetest "./geng -cd1f 10 | ./labelg -q" "" nautestb.ans 95runonetest "./genrang -r3 114 100 | ./countg --nedDr -q" "" nautestc.ans 96runonetest "./gentourng -q -z 8 | ./pickg -T3" "" nautestd.ans 97runonetest "./gentreeg -q -s 18 | ./countg -z6 --o" "" nauteste.ans 98runonetest "./geng -c -q 8 8 | ./directg -q -o | ./converseg -q | ./labelg -q" "" nautestf.ans 99runonetest "./genbg -q 4 3 10 | ./vcolg -m6 -T" "" nautestg.ans 100 101echo " " 102 103if [ $fails -eq 0 ] ; then 104 echo "PASSED ALL TESTS" 105 exit 0 106else 107 echo "$fails TESTS FAILED" 108 exit 1 109fi 110