]> Pileus Git - ~andy/rsl/blob - examples/run_tests
Initial import
[~andy/rsl] / examples / run_tests
1 #!/usr/bin/perl
2 #-*-Perl-*-
3 # Pretty unsophisicated.
4
5
6 sub runit {
7         print "COMMAND @_\n";
8         system("@_");
9 }
10
11 sub diffimage {
12 # Convert to ppm. GIF stores date in header!
13         local ($gif) = @_;
14         $ipath = '../../rsl_test_images';
15         system("giftoppm $gif > img_junk1.ppm");
16         system("giftoppm $ipath/$gif > img_junk2.ppm");
17     $s = `diff -q img_junk1.ppm img_junk2.ppm`;
18         unlink(<img_junk?.ppm>);
19         if ($s eq "") {
20                 print "MATCH: $gif and  $ipath/$gif are identical ... good.\n";
21         } else {
22                 print "----<ERROR>---- Files $gif and $ipath/$gif are different.\n";
23         }
24 }
25
26 &runit('any_to_gif -r200 /d8/merritt/l00038.ppi');
27 &diffimage('radtec_DZ_051298_1429.gif');
28 print "---------------------------------------------\n";
29
30
31 &runit('any_to_gif -r 200 /d8/merritt/1C51.921002.13.MELB.1.HDF');
32 #runit('xv MELB_DZ_100292_1205.gif');
33 #runit('xv MELB_CZ_100292_1205.gif');
34 &diffimage('MELB_DZ_100292_1205.gif');
35 &diffimage('MELB_CZ_100292_1205.gif');
36 print "---------------------------------------------\n";
37
38 &runit('any_to_gif -r 200 /d8/merritt/19980127050001.vol');
39 #runit('xv Berrima_ZT_012798_0500.gif');
40 #runit('xv Berrima_VR_012798_0500.gif');
41 #runit('xv Berrima_SW_012798_0500.gif');
42 &diffimage('Berrima_ZT_012798_0500.gif');
43 &diffimage('Berrima_VR_012798_0500.gif');
44 &diffimage('Berrima_SW_012798_0500.gif');
45 print "---------------------------------------------\n";
46
47 &runit('qlook -v -g -D -V /d8/merritt/Lassen_mp.vol');
48 #runit('xv dz_951117_0730_00.gif');
49 #runit('xv dr_951117_0730_00.gif');
50 #runit('xv vr_951117_0730_00.gif');
51 &diffimage('dz_951117_0730_00.gif');
52 &diffimage('dr_951117_0730_00.gif');
53 &diffimage('vr_951117_0730_00.gif');
54 print "---------------------------------------------\n";
55
56 &runit('qlook -v -g  -W -V  /d8/merritt/nex.file.2');
57 #runit('xv dz_930701_1957_00.gif');
58 #runit('xv vr_930701_1957_00.gif');
59 #runit('xv sw_930701_1957_00.gif');
60 &diffimage('dz_930701_1957_00.gif');
61 &diffimage('vr_930701_1957_00.gif');
62 &diffimage('sw_930701_1957_00.gif');
63 print "---------------------------------------------\n";
64
65 &runit('qlook -v -g -W -V /d8/merritt/nex.file.2.gz');
66 #runit('xv vr_930701_1957_00.gif');
67 &diffimage('dz_930701_1957_00.gif');
68 &diffimage('sw_930701_1957_00.gif');
69 &diffimage('vr_930701_1957_00.gif');
70 print "---------------------------------------------\n";
71
72 &runit('cappi_image /d8/merritt/nex.file.2.gz KMLB');
73 #runit('xv cappi_03.gif');
74 &diffimage('cappi_01.gif');
75 &diffimage('cappi_02.gif');
76 &diffimage('cappi_03.gif');
77 &diffimage('cappi_04.gif');
78 &diffimage('cappi_05.gif');
79 print "---------------------------------------------\n";
80
81 &runit('any_to_gif /d8/merritt/nex.file.2.gz /d8/merritt/nex.file.1');
82 #runit('xv KMLB_DZ_070193_1957.gif');
83 #runit('xv KMLB_VR_070193_1957.gif');
84 #runit('xv KMLB_SW_070193_1957.gif');
85 &diffimage('KMLB_DZ_070193_1957.gif');
86 &diffimage('KMLB_VR_070193_1957.gif');
87 &diffimage('KMLB_SW_070193_1957.gif');
88 print "---------------------------------------------\n";
89
90 #&runit('any_to_gif -r 150 /d8/merritt/34598DE1.vol.gz');
91 #runit('xv Gunn_Pt_DZ_103197_0739.gif');
92 #&diffimage('Gunn_Pt_DZ_103197_0739.gif');
93 #&diffimage('Gunn_Pt_VR_103197_0739.gif');
94 #&diffimage('Gunn_Pt_SW_103197_0739.gif');
95 #&diffimage('Gunn_Pt_ZT_103197_0739.gif');
96 #&diffimage('Gunn_Pt_ZD_103197_0739.gif');
97 #&diffimage('Gunn_Pt_RH_103197_0739.gif');
98 #&diffimage('Gunn_Pt_PH_103197_0739.gif');
99 #print "---------------------------------------------\n";
100
101 &runit('any_to_gif -r 150 /d8/merritt/2D17FBB4.vol');
102 #runit('xv Berrima_DZ_122293_0747.gif');
103 &diffimage('Berrima_DZ_122293_0747.gif');
104 &diffimage('Berrima_VR_122293_0747.gif');
105 &diffimage('Berrima_SW_122293_0747.gif');
106 &diffimage('Berrima_ZT_122293_0747.gif');
107 &diffimage('Berrima_LR_122293_0747.gif');
108 &diffimage('Berrima_RH_122293_0747.gif');
109 &diffimage('Berrima_PH_122293_0747.gif');
110 &diffimage('Berrima_KD_122293_0747.gif');
111 &diffimage('Berrima_TI_122293_0747.gif');
112 print "---------------------------------------------\n";
113
114 &runit('any_to_gif -r 150 /d8/merritt/30BE3D11.vol.gz');
115 #runit('xv Nguiu_DZ_113095_2319.gif');
116 &diffimage('Nguiu_DZ_113095_2319.gif');
117 &diffimage('Nguiu_VR_113095_2319.gif');
118 &diffimage('Nguiu_SW_113095_2319.gif');
119 &diffimage('Nguiu_ZT_113095_2319.gif');
120 print "---------------------------------------------\n";
121
122 &runit('any_to_gif -r 150 /d8/merritt/tog_930129_1731.raw');
123 #runit('xv TOGA_DZ_012993_1731.gif');
124 &diffimage('TOGA_DZ_012993_1731.gif');
125 &diffimage('TOGA_VR_012993_1731.gif');
126 &diffimage('TOGA_SW_012993_1731.gif');
127 print "---------------------------------------------\n";
128
129 &runit('any_to_gif -r 133 /d8/merritt/kwaj.new');
130 #runit('xv KWAJ_DZ_021496_2351.gif');
131 &diffimage('KWAJ_DZ_021496_2351.gif');
132 &diffimage('KWAJ_VR_021496_2351.gif');
133 &diffimage('KWAJ_SW_021496_2351.gif');
134 &diffimage('KWAJ_ZT_021496_2351.gif');
135 print "---------------------------------------------\n";
136
137 &runit('any_to_gif -r 150 /d8/merritt/KWA980324084320.ARCPYLY');
138 #runit('xanim KWAJ_??_032498_0843.gif');
139 &diffimage('KWAJ_DZ_032498_0843.gif');
140 &diffimage('KWAJ_VR_032498_0843.gif');
141 &diffimage('KWAJ_SW_032498_0843.gif');
142 &diffimage('KWAJ_ZT_032498_0843.gif');
143 &diffimage('KWAJ_DR_032498_0843.gif');
144 &diffimage('KWAJ_KD_032498_0843.gif');
145 print "---------------------------------------------\n";
146
147 &runit('any_to_gif -r 150 /d8/merritt/VIC.930129.213153.sig');
148 #runit('xv MIT-CSU_DZ_012993_2131.gif');
149 &diffimage('MIT-CSU_DZ_012993_2131.gif');
150 &diffimage('MIT-CSU_VR_012993_2131.gif');
151 &diffimage('MIT-CSU_SW_012993_2131.gif');
152 &diffimage('MIT-CSU_ZT_012993_2131.gif');
153 print "---------------------------------------------\n";
154
155 &runit('any_to_gif -r 150 /d8/merritt/VIC.930130.213215.sig.gz');
156 #runit('xv MIT-CSU_DZ_013093_2132.gif');
157 &diffimage('MIT-CSU_DZ_013093_2132.gif');
158 &diffimage('MIT-CSU_VR_013093_2132.gif');
159 &diffimage('MIT-CSU_SW_013093_2132.gif');
160 &diffimage('MIT-CSU_ZT_013093_2132.gif');
161 print "---------------------------------------------\n";
162
163 print "You will be placed in 'less'.  Search for the string 'OUT' and\n";
164 print "examine the angles.  You should only see the 'OUT OF ORDER' message\n";
165 print "when the angle changes from the maximum to the minimum.\n";
166 &runit('killer_sweep /d8/merritt/nex.file.2.gz /d8/merritt/nex.file.1 | less');
167 print "---------------------------------------------\n";
168
169 &runit('wsr88d_to_gif /d8/merritt/nex.file.2.gz /d8/merritt/nex.file.1');
170 #runit('xanim dz_sweep.??.gif');
171 #runit('xanim vr_sweep.??.gif');
172 #runit('xanim sw_sweep.??.gif');
173 &diffimage('dz_sweep.00.gif');
174 &diffimage('dz_sweep.01.gif');
175 &diffimage('dz_sweep.02.gif');
176 &diffimage('dz_sweep.03.gif');
177 &diffimage('dz_sweep.04.gif');
178 &diffimage('dz_sweep.05.gif');
179 &diffimage('dz_sweep.06.gif');
180 &diffimage('dz_sweep.07.gif');
181 &diffimage('dz_sweep.08.gif');
182 &diffimage('dz_sweep.09.gif');
183 &diffimage('dz_sweep.10.gif');
184 &diffimage('vr_sweep.00.gif');
185 &diffimage('vr_sweep.01.gif');
186 &diffimage('vr_sweep.02.gif');
187 &diffimage('vr_sweep.03.gif');
188 &diffimage('vr_sweep.04.gif');
189 &diffimage('vr_sweep.05.gif');
190 &diffimage('vr_sweep.06.gif');
191 &diffimage('vr_sweep.07.gif');
192 &diffimage('vr_sweep.08.gif');
193 &diffimage('vr_sweep.09.gif');
194 &diffimage('vr_sweep.10.gif');
195 &diffimage('sw_sweep.00.gif');
196 &diffimage('sw_sweep.01.gif');
197 &diffimage('sw_sweep.02.gif');
198 &diffimage('sw_sweep.03.gif');
199 &diffimage('sw_sweep.04.gif');
200 &diffimage('sw_sweep.05.gif');
201 &diffimage('sw_sweep.06.gif');
202 &diffimage('sw_sweep.07.gif');
203 &diffimage('sw_sweep.08.gif');
204 &diffimage('sw_sweep.09.gif');
205 &diffimage('sw_sweep.10.gif');
206 print "---------------------------------------------\n";
207
208 &runit('wsr_hist_uf_test /d8/merritt/nex.file.2.gz');
209 $s = `diff *.dat`;
210    if ($s != "") {
211            print "==> Unexpected differences.    FAILED test.\n";
212    } else {
213            print "==> No differences, good.      PASSED test.\n";
214    }
215
216 ##print "---------------------------------------------\n";
217 ##&runit('bscan /d8/merritt/pafb_swap');
218 ##system('mv bscan.00.ppm bscan.00.swap.ppm');
219 ##&runit('bscan /d8/merritt/pafb_unswap');
220 ##$s = `diff bscan.00.ppm bscan.00.swap.ppm`;
221 ##   if ($s != "") {
222 ##         print "==> Unexpected differences.    FAILED test.\n";
223 ##   } else {
224 ##         print "==> No differences, good.      PASSED test.\n";
225 ##   }