Imported Upstream version 4.6.0
[debian/atlc] / tests / 10b-create-lots-of-examples-check-last-one.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 create_bmp_for_symmetrical_stripline, 
5 # create_bmp_for_create_bmp_for_rect_in_rect, create_bmp_for_rect_cen_in_rect, create_bmp_for_circ_in_circ, create_bmp_for_circ_in_rect, 
6 # create_bmp_for_stripline_coupler etc.
7
8 # The checksum of the bitmap generated is compared to what is known to be 
9 # the correct checksum using a program 'mymd5sum' which is a cut-down version of
10 # the GNU program 'sum'. Using my own version avoids the need for the user to 
11 # have the GNU textutils installed and avoids the possibility that they have
12 # 'textutils' installed but have another version of 'sum' (such as the one 
13 # supplied by Sun with Solaris, which generates a different checksum. 
14
15 # atlc is then run, generating a lot of files, including those with the 
16 # extension .bmp, .txt and .bin. The checksum of the .bmp's and part of
17 # the .txt file are checked. The .bin's are not, since they will be
18 # dependent on the whether the machine is Big Endian (like Suns) or
19 # Little Endian like PCs. It will also be too dependent on rounding
20 # difference caused by the different FPUs in the different machines. 
21
22 # Any failure to generate the correct checksums are noted. 
23
24 # Any failure in an Xa-$top_builddir. where X is an integer will cause
25 # Xb, Xc, Xd $top_builddir.etc to fail. Any pass of Xa, but faiure of Xb will cause
26 # all the Xc, Xd $top_builddir. to fail. If both Xa and Xb pass, then hopefully Xc,
27 # Xd etc will. However, Xd, Xe etc does not rely on the correct functioning of 
28 # Xc. The Xc, Xd, $top_builddir. only need Xa and Xb to pass, so Xc, Xd etc are
29 # independent of each other. 
30
31 # I would add that these checksums have been checked using the GNU
32 # textutils on about 15 different computers, from PCs, to Suns to Dec etc.
33 # So they are okay and I would suggest any failures is a problem. 
34 # The only reason I can think of a failure is that there is a difference
35 # in the outout of 'mymd5sum' to the GNU utilites one, but that is
36 # unlikely. So if any problems occur, check the checksum with the GNU
37 # 'sum' and see what that gives. If any failures do occur, please let me
38 # know. email drkirkby@ntlworld.com and/or davek@medphys.ucl.ac.uk 
39
40
41 Zodd=`$top_builddir/src/no*/create_bmp_for_stripline_coupler -v 1.0 1.0 1.0 1.0 $top_builddir/tmp/coupler1.bmp | tail -1 | awk '{print $2 }' `
42 Zeven=`$top_builddir/src/no*/create_bmp_for_stripline_coupler -v 1.0 1.0 1.0 1.0 $top_builddir/tmp/coupler1.bmp | tail -1 | awk '{print $4 }' `
43 Zo=`$top_builddir/src/no*/create_bmp_for_stripline_coupler -v 1.0 1.0 1.0 1.0 $top_builddir/tmp/coupler1.bmp | tail -1 | awk '{print $6 }' `
44 rm -f $top_builddir/tmp/coupler1.bmp
45 if [ $Zodd = 64.722695 ] && [ $Zeven = 65.969498 ] && [ $Zo = 65.343123 ] ; then
46   echo "PASSED:" $0 >> tests.log
47   exit 0
48 else
49   echo "FAILED:" $0 >> tests.log
50   exit 1
51 fi