Initial commit of libDAI-0.2.1
[libdai.git] / tests / testregression
1 #!/bin/bash
2 TMPFILE1=`mktemp /var/tmp/testfast.XXXXXX`
3 trap 'rm -f $TMP_FILE' 0 1 15
4 TMPFILE2=`mktemp /var/tmp/testfast.XXXXXX`
5 trap 'rm -f $TMP_FILE2' 0 1 15
6 TMPFILE3=`mktemp /var/tmp/testfast.XXXXXX`
7 trap 'rm -f $TMP_FILE3' 0 1 15
8
9 ./testall testfast.fg > $TMPFILE1
10 awk '/^#/ {} NF == 2 && !/^#/ {} NF == 6 && !/^#/ { print $1, $3, $4, $5, $6; }' $TMPFILE1 > $TMPFILE2
11 awk '/^#/ {} NF == 2 && !/^#/ {} NF == 6 && !/^#/ { print $1, $3, $4, $5, $6; }' testfast.out > $TMPFILE3
12 diff -s $TMPFILE2 $TMPFILE3
13
14 rm -f $TMPFILE1
15 rm -f $TMPFILE2
16 rm -f $TMPFILE3