Imported Upstream version 4.6.0
[debian/atlc] / tests / 7g-create_bmp_for_stripline_coupler.U.odd.bmp.test
1 #! /bin/sh
2
3 # This is one of a set of test that generate checksums after files are
4 # created. Generally a bitmap if first produced by a program such as sym_strip, 
5 # rect_in_rect, rect_cen_in_rect, circ_in_circ, circ_in_rect, 
6 # generate_coupler_bitmap etc.
7
8 # In a few cases, the checksum is performed on a file that is 
9 # supplied with the package, rather than one that is 
10 # generated. 
11
12 # The checksum of the bitmaps generated is compared to what is known to be 
13 # the correct checksum using a program 'mymd5sum' which is a cut-down version of
14 # the normal md5 or md5sum command.  It does not print the filename 
15 # to stdout, as the normal version does. 
16
17 # I have tried to test these checksums on as many systems as possible and 
18 # know all tests pass on all systems I have checked this on. Typically the
19 # systems have been mainly Suns, but running various operating systems. 
20 # such as Solaris 9, NetBSD, Solaris 2.5, Linux but also a PC running
21 # rehat Linux and a Dec Alpha. Any failure probably indicates a 
22 # program bug, so PLEASE PLEASE let me know about it!!
23 # Dr. David Kirkby, drkirkby@ntlworld.com
24
25 # **************** NOTE ****************
26 # This test  (7g-create_bmp_for_stripline_coupler.U.odd.bmp.test)
27 # test seems sensitive to the machine it is run on
28 # with a Sun UltraSPARC II chip in a Sun Ultra 80 giving different 
29 # results from that in a Pentium II PC running Linux. Investigation
30 # shows that on one system a pixel is white (255,255,255) and another
31 # very nearly whilte (254,254,254). 
32
33 # Hence this must mean that the 
34 # result of energy is rounded either white or almost white, depending
35 # on the system. As such, either checksum is found to be acceptable 
36 # in this case, and only this case. 
37 # On a Cray, two pixels differ from those on the Sun, so a third
38 # checksum is acceptable. 
39 # 9eda42b1552b9bd2673e67d441a7d53a checksum on Sun.
40 # d7ec3c37b95d995ae4fff362c542f46f checksum on Linux PC
41 # 09f68e1466d68bf8a03e1f90eff411bb checksum on Cray Y-MP
42
43 touch $top_builddir/tmp/test_stripline_coupler.U.odd.bmp
44 MD5SUM=`$top_builddir/tools/src/mymd5sum $top_builddir/tmp/test_stripline_coupler.U.odd.bmp`
45 if [ $MD5SUM != 2f1fb3a1c993c7b4c9fbd3e03e353d02 ] ; then
46   echo "FAILED:" $0 >> tests.log
47   exit 1
48 else
49   rm $top_builddir/tmp/test_stripline_coupler.U.odd.bmp
50   echo "PASSED:" $0 >> tests.log
51   exit 0
52 fi