missed one!
[debian/atlc] / tests / 6a-create_and_check_25ohm_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 estimate calculated, which will differ 
6 # slightly from the theoretical data 
7
8 # Create a bitmap and compute its theeoretical impedance. 
9 ZoTheory=`$top_builddir/src/create_bmp_for_symmetrical_stripline -v 1512 201 668 $top_builddir/tmp/25ohm-201h.bmp | awk '{print $4}' | tail -1`
10
11 # Generate a checksum for the file created
12 MD5SUM=`$top_builddir/tools/src/mymd5sum $top_builddir/tmp/25ohm-201h.bmp`
13
14 # Now run atlc on this bitmap and check it is close to that computed. 
15 if [ "x$mpirun" = "xyes" ] ; then
16   Zoatlc=`mpirun -np 2 $top_builddir/src/atlc -S $top_builddir/tmp/25ohm-201h.bmp | awk '{print $6}' | tail -1`
17 else
18   Zoatlc=`$top_builddir/src/atlc -S $top_builddir/tmp/25ohm-201h.bmp | awk '{print $6}' | tail -1 `
19 fi  
20
21 # Generate a checksum for a file created by atlc. 
22 EXMD5SUM=`$top_builddir/tools/src/mymd5sum $top_builddir/tmp/25ohm-201h.Ex.bmp`
23
24 if [ -z "$Zoatlc" ]  || [ -z "$ZoTheory" ] || [ -z "$MD5SUM" ] || [ -z "$EXMD5SUM" ] ; then  
25   exit 1
26 fi
27
28 # "Zo theory = " $ZoTheory "Zo altc= " $Zoatlc " cksum of bitmap" $MD5SUM "cksum of .Ex.bmp= " $EXMD5SUM
29
30 # Remvove the unwanted files. 
31 rm $top_builddir/tmp/25ohm-201h.Ex.bmp
32 rm $top_builddir/tmp/25ohm-201h.bmp
33 rm $top_builddir/tmp/25ohm-201h.Ey.bmp
34 rm $top_builddir/tmp/25ohm-201h.E.bmp
35 rm $top_builddir/tmp/25ohm-201h.V.bmp
36 rm $top_builddir/tmp/25ohm-201h.U.bmp
37 rm $top_builddir/tmp/25ohm-201h.Er.bmp
38
39 if [ $ZoTheory = 25.017590  ] && [ $Zoatlc = 24.932 ] && [ $MD5SUM = 44e86f6bcec1a61db9564040ec93557c ] && [ $EXMD5SUM = 499efd42aa2610c23f6995071e060e69 ] ; then
40   echo "PASSED:" $0 >> tests.log
41   exit 0
42 else
43   echo "FAILED:" $0 >> tests.log
44   exit 1
45 fi
46
47