#! /bin/sh # Check that the inductance per metre calculated from # tests.bmp is the correct value. # .bin files are unchecked, so let removed them. rm -f test.*.bin if [ -n "$mpirun_found" ] ; then mpirun -np 2 $top_builddir/src/atlc -s -S $top_builddir/tmp/test.bmp > $top_builddir/tmp/test.txt 2> /dev/null else $top_builddir/src/atlc -s -S $top_builddir/tmp/test.bmp > $top_builddir/tmp/test.txt fi # Check the inductance per metre, which should be in column 12 and # should be 340.8 nH/m Lo=`cat $top_builddir/tmp/test.txt | awk '{print $12}'` Zo=`cat $top_builddir/tmp/test.txt | awk '{print $6}'` if [ -z "$Lo" ] || [ -z "$Zo" ] ; then exit 1 fi if [ $Lo = 341.9 ] && [ $Zo = 102.506 ] ; then rm $top_builddir/tmp/test.txt rm $top_builddir/tmp/test.bmp echo "PASSED:" $0 >> tests.log exit 0 else echo "FAILED:" $0 >> tests.log exit 1 fi