Imported Upstream version 4.6.0
[debian/atlc] / tests / 6d-create_and_check_50ohm_201Pixel_high_symmetrical_stripline.test
1 #! /bin/sh
2 # A bitmap is created of a symmetrical_stripline. By adding the -v option
3 # to create_bmp_for_symmetrical_stripline the theoretical impedance
4 # is computed. 
5 # atlc is then called, and its eastimate calaculated, which will differ 
6 # slightly from the theoretical data 
7
8 #: ${ZoTheory='ksdkj'}
9 #: ${Zoatlc='iofdklkljf'}
10
11 if [ "x$mpirun_found" = "xyes" ]  ; then
12   ZoTheory=`$top_builddir/src/non_gui/create_bmp_for_symmetrical_stripline -v 1134 201 290 $top_builddir/tmp/50ohm-201h.bmp | awk '{print $4}'`
13   Zoatlc=`mpirun -np 2 $top_builddir/src/non_gui/atlc -S $top_builddir/tmp/50ohm-201h.bmp | awk '{print $6}'`
14 else
15   ZoTheory=`$top_builddir/src/non_gui/create_bmp_for_symmetrical_stripline -v 1134 201 290 $top_builddir/tmp/50ohm-201h.bmp | awk '{print $4}'`
16   Zoatlc=`$top_builddir/src/non_gui/atlc -S $top_builddir/tmp/50ohm-201h.bmp | awk '{print $6}'`
17 fi
18
19 touch $top_builddir/tmp/50ohm-201h.bmp $top_builddir/tmp/50ohm-201h.Ex.bmp
20 MD5SUM=`$top_builddir/tools/src/mymd5sum $top_builddir/tmp/50ohm-201h.bmp`
21 EXMD5SUM=`$top_builddir/tools/src/mymd5sum $top_builddir/tmp/50ohm-201h.Ex.bmp`
22
23 #echo "Zoth=$ZoTheory Zoatlc=$Zoatlc md5=$MD5SUM exmd5=$EXMD5SUM"
24
25 if test -z "$ZoTheory"  ;  then
26   exit 1
27 fi
28
29 if test -z "$Zoatlc"  ; then
30   exit 1
31 fi
32
33 if test -z "$MD5SUM"  ; then
34   exit 1
35 fi
36
37 if test -z "$EXMD5SUM"  ; then
38   exit 1
39 fi
40
41 if [ $ZoTheory = 49.989477  ] && [ $Zoatlc = 49.899 ] && [ $MD5SUM = dae5292fe04dfd64abe1ae4e926d7365 ] && [ $EXMD5SUM = 03bdcc0c9f6361f2630f77817b8684d9 ]; then
42   rm -f $top_builddir/tmp/50ohm-201h.bmp $top_builddir/tmp/50ohm-201h.Ex.bmp
43   rm -f $top_builddir/tmp/50ohm-201h.Ey.bmp $top_builddir/tmp/50ohm-201h.E.bmp
44   rm -f $top_builddir/tmp/50ohm-201h.U.bmp $top_builddir/tmp/50ohm-201h.V.bmp
45   rm -f $top_builddir/tmp/50ohm-201h.Er.bmp
46
47   echo "PASSED:" $0 >> tests.log
48   exit 0
49 else
50   echo "FAILED:" $0 >> tests.log
51   exit 1
52 fi
53
54