Imported Upstream version 4.6.0
[debian/atlc] / tests / 2b-create_bmp_for_rect_in_rect.txt.test
1 #! /bin/sh
2 # Currenty (13th April 2003) this test only works when atlc is
3 # configured as a single threaded or built with pthrads, but not
4 # for the MPICH libraries, atlc gives a huge number of error messages. 
5
6 if [ "$mpirun_found" = "yes" ] ; then
7   mpirun -np 2 $top_builddir/src/non_gui/atlc  -S $top_builddir/tmp/test_rect_in_rect.bmp > $top_builddir/tmp/test_rect_in_rect.txt
8 else 
9   $top_builddir/src/non_gui/atlc  -S $top_builddir/tmp/test_rect_in_rect.bmp > $top_builddir/tmp/test_rect_in_rect.txt
10 fi
11 touch $top_builddir/tmp/test_rect_in_rect.txt
12
13 # The capacitance should be 121.0 pF/m and is in column 9
14
15 CAP=`cat $top_builddir/tmp/test_rect_in_rect.txt | awk '{print $9}'`
16 Zo=`cat $top_builddir/tmp/test_rect_in_rect.txt | awk '{print $6}'`
17
18 if [ -z "$CAP"  ] || [ -z "$Zo" ] ; then
19   echo "FAILED:" $0 >> tests.log
20   exit 1 
21 fi
22
23
24 if [ $CAP = 121.0 ] && [ $Zo = 44.61 ] ; then
25   rm -f $top_builddir/tmp/test_rect_in_rect.txt $top_builddir/tmp/test_rect_in_rect.bmp
26   echo "PASSED:" $0 >> tests.log
27   exit 0
28 else
29   echo "FAILED:" $0 $CAP $Zo >> tests.log
30   exit 1
31 fi