comparison spandsp-0.0.3/spandsp-0.0.3/tests/regression_tests.sh @ 5:f762bf195c4b

import spandsp-0.0.3
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 16:00:21 +0200
parents
children
comparison
equal deleted inserted replaced
4:26cd8f1ef0b1 5:f762bf195c4b
1 #!/bin/sh
2 #
3 # spandsp regression tests
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License version 2, as
7 # published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 #
18 # $Id: regression_tests.sh,v 1.36 2006/11/20 14:27:27 steveu Exp $
19 #
20
21 ITUTESTS_TIF=../itutests/fax/itutests.tif
22 STDOUT_DEST=xyzzy
23 STDERR_DEST=xyzzy2
24
25 echo Performing basic regression tests
26 echo
27
28 ./adsi_tests >$STDOUT_DEST 2>$STDERR_DEST
29 RETVAL=$?
30 if [ $RETVAL != 0 ]
31 then
32 echo adsi_tests failed!
33 exit $RETVAL
34 fi
35 echo adsi_tests completed OK
36
37 ./async_tests >$STDOUT_DEST 2>$STDERR_DEST
38 RETVAL=$?
39 if [ $RETVAL != 0 ]
40 then
41 echo async_tests failed!
42 exit $RETVAL
43 fi
44 echo async_tests completed OK
45
46 ./at_interpreter_tests >$STDOUT_DEST 2>$STDERR_DEST
47 RETVAL=$?
48 if [ $RETVAL != 0 ]
49 then
50 echo at_interpreter_tests failed!
51 exit $RETVAL
52 fi
53 echo at_interpreter_tests completed OK
54
55 ./awgn_tests >$STDOUT_DEST 2>$STDERR_DEST
56 RETVAL=$?
57 if [ $RETVAL != 0 ]
58 then
59 echo awgn_tests failed!
60 exit $RETVAL
61 fi
62 echo awgn_tests completed OK
63
64 ./bell_mf_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
65 RETVAL=$?
66 if [ $RETVAL != 0 ]
67 then
68 echo bell_mf_rx_tests failed!
69 exit $RETVAL
70 fi
71 echo bell_mf_rx_tests completed OK
72
73 ./bell_mf_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
74 RETVAL=$?
75 if [ $RETVAL != 0 ]
76 then
77 echo bell_mf_tx_tests failed!
78 exit $RETVAL
79 fi
80 echo bell_mf_tx_tests completed OK
81
82 ./bert_tests >$STDOUT_DEST 2>$STDERR_DEST
83 RETVAL=$?
84 if [ $RETVAL != 0 ]
85 then
86 echo bert_tests failed!
87 exit $RETVAL
88 fi
89 echo bert_tests completed OK
90
91 ./bit_operations_tests >$STDOUT_DEST 2>$STDERR_DEST
92 RETVAL=$?
93 if [ $RETVAL != 0 ]
94 then
95 echo bit_operations_tests failed!
96 exit $RETVAL
97 fi
98 echo bit_operations_tests completed OK
99
100 ./dc_restore_tests >$STDOUT_DEST 2>$STDERR_DEST
101 RETVAL=$?
102 if [ $RETVAL != 0 ]
103 then
104 echo dc_restore_tests failed!
105 exit $RETVAL
106 fi
107 echo dc_restore_tests completed OK
108
109 ./dds_tests >$STDOUT_DEST 2>$STDERR_DEST
110 RETVAL=$?
111 if [ $RETVAL != 0 ]
112 then
113 echo dds_tests failed!
114 exit $RETVAL
115 fi
116 echo dds_tests completed OK
117
118 ./dtmf_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
119 RETVAL=$?
120 if [ $RETVAL != 0 ]
121 then
122 echo dtmf_rx_tests failed!
123 exit $RETVAL
124 fi
125 echo dtmf_rx_tests completed OK
126
127 ./dtmf_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
128 RETVAL=$?
129 if [ $RETVAL != 0 ]
130 then
131 echo dtmf_tx_tests failed!
132 exit $RETVAL
133 fi
134 echo dtmf_tx_tests completed OK
135
136 #./echo_tests >$STDOUT_DEST 2>$STDERR_DEST
137 #RETVAL=$?
138 #if [ $RETVAL != 0 ]
139 #then
140 # echo echo_tests failed!
141 # exit $RETVAL
142 #fi
143 #echo echo_tests completed OK
144 echo echo_tests not enabled
145
146 rm -f fax_tests_1.tif
147 ./fax_tests >$STDOUT_DEST 2>$STDERR_DEST
148 RETVAL=$?
149 if [ $RETVAL != 0 ]
150 then
151 echo fax_tests failed!
152 exit $RETVAL
153 fi
154 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
155 # option means the normal differences in tags will be ignored.
156 tiffcmp -t ${ITUTESTS_TIF} fax_tests_1.tif >/dev/null
157 RETVAL=$?
158 if [ $RETVAL != 0 ]
159 then
160 echo fax_tests failed!
161 exit $RETVAL
162 fi
163 rm -f fax_tests_1.tif
164 ./fax_tests -e >$STDOUT_DEST 2>$STDERR_DEST
165 RETVAL=$?
166 if [ $RETVAL != 0 ]
167 then
168 echo fax_tests -e failed!
169 exit $RETVAL
170 fi
171 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
172 # option means the normal differences in tags will be ignored.
173 tiffcmp -t ${ITUTESTS_TIF} fax_tests_1.tif >/dev/null
174 RETVAL=$?
175 if [ $RETVAL != 0 ]
176 then
177 echo fax_tests -e failed!
178 exit $RETVAL
179 fi
180 echo fax_tests completed OK
181
182 ./fsk_tests >$STDOUT_DEST 2>$STDERR_DEST
183 RETVAL=$?
184 if [ $RETVAL != 0 ]
185 then
186 echo fsk_tests failed!
187 exit $RETVAL
188 fi
189 echo fsk_tests completed OK
190
191 ./g711_tests >$STDOUT_DEST 2>$STDERR_DEST
192 RETVAL=$?
193 if [ $RETVAL != 0 ]
194 then
195 echo g711_tests failed!
196 exit $RETVAL
197 fi
198 echo g711_tests completed OK
199
200 ./g722_tests >$STDOUT_DEST 2>$STDERR_DEST
201 RETVAL=$?
202 if [ $RETVAL != 0 ]
203 then
204 echo g722_tests failed!
205 exit $RETVAL
206 fi
207 echo g722_tests completed OK
208
209 ./g726_tests >$STDOUT_DEST 2>$STDERR_DEST
210 RETVAL=$?
211 if [ $RETVAL != 0 ]
212 then
213 echo g726_tests failed!
214 exit $RETVAL
215 fi
216 echo g726_tests completed OK
217
218 ./gsm0610_tests >$STDOUT_DEST 2>$STDERR_DEST
219 RETVAL=$?
220 if [ $RETVAL != 0 ]
221 then
222 echo gsm0610_tests failed!
223 exit $RETVAL
224 fi
225 echo gsm0610_tests completed OK
226
227 ./hdlc_tests >$STDOUT_DEST 2>$STDERR_DEST
228 RETVAL=$?
229 if [ $RETVAL != 0 ]
230 then
231 echo hdlc_tests failed!
232 exit $RETVAL
233 fi
234 echo hdlc_tests completed OK
235
236 ./ima_adpcm_tests >$STDOUT_DEST 2>$STDERR_DEST
237 RETVAL=$?
238 if [ $RETVAL != 0 ]
239 then
240 echo ima_adpcm_tests failed!
241 exit $RETVAL
242 fi
243 echo ima_adpcm_tests completed OK
244
245 ./logging_tests >$STDOUT_DEST 2>$STDERR_DEST
246 RETVAL=$?
247 if [ $RETVAL != 0 ]
248 then
249 echo logging_tests failed!
250 exit $RETVAL
251 fi
252 echo logging_tests completed OK
253
254 ./lpc10_tests >$STDOUT_DEST 2>$STDERR_DEST
255 RETVAL=$?
256 if [ $RETVAL != 0 ]
257 then
258 echo lpc10_tests failed!
259 exit $RETVAL
260 fi
261 echo lpc10_tests completed OK
262
263 ./modem_echo_tests >$STDOUT_DEST 2>$STDERR_DEST
264 RETVAL=$?
265 if [ $RETVAL != 0 ]
266 then
267 echo modem_echo_tests failed!
268 exit $RETVAL
269 fi
270 echo modem_echo_tests completed OK
271
272 ./modem_connect_tones_tests >$STDOUT_DEST 2>$STDERR_DEST
273 RETVAL=$?
274 if [ $RETVAL != 0 ]
275 then
276 echo modem_connect_tones_tests failed!
277 exit $RETVAL
278 fi
279 echo modem_connect_tones_tests completed OK
280
281 ./noise_tests >$STDOUT_DEST 2>$STDERR_DEST
282 RETVAL=$?
283 if [ $RETVAL != 0 ]
284 then
285 echo noise_tests failed!
286 exit $RETVAL
287 fi
288 echo noise_tests completed OK
289
290 ./oki_adpcm_tests >$STDOUT_DEST 2>$STDERR_DEST
291 RETVAL=$?
292 if [ $RETVAL != 0 ]
293 then
294 echo oki_adpcm_tests failed!
295 exit $RETVAL
296 fi
297 echo oki_adpcm_tests completed OK
298
299 #./playout_tests >$STDOUT_DEST 2>$STDERR_DEST
300 #RETVAL=$?
301 #if [ $RETVAL != 0 ]
302 #then
303 # echo playout_tests failed!
304 # exit $RETVAL
305 #fi
306 #echo playout_tests completed OK
307 echo playout_tests not enabled
308
309 #./plc_tests >$STDOUT_DEST 2>$STDERR_DEST
310 #RETVAL=$?
311 #if [ $RETVAL != 0 ]
312 #then
313 # echo plc_tests failed!
314 # exit $RETVAL
315 #fi
316 #echo plc_tests completed OK
317 echo plc_tests not enabled
318
319 ./power_meter_tests >$STDOUT_DEST 2>$STDERR_DEST
320 RETVAL=$?
321 if [ $RETVAL != 0 ]
322 then
323 echo power_meter_tests failed!
324 exit $RETVAL
325 fi
326 echo power_meter_tests completed OK
327
328 ./r2_mf_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
329 RETVAL=$?
330 if [ $RETVAL != 0 ]
331 then
332 echo r2_mf_rx_tests failed!
333 exit $RETVAL
334 fi
335 echo r2_mf_rx_tests completed OK
336
337 ./r2_mf_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
338 RETVAL=$?
339 if [ $RETVAL != 0 ]
340 then
341 echo r2_mf_tx_tests failed!
342 exit $RETVAL
343 fi
344 echo r2_mf_tx_tests completed OK
345
346 ./schedule_tests >$STDOUT_DEST 2>$STDERR_DEST
347 RETVAL=$?
348 if [ $RETVAL != 0 ]
349 then
350 echo schedule_tests failed!
351 exit $RETVAL
352 fi
353 echo schedule_tests completed OK
354
355 #./sig_tone_tests >$STDOUT_DEST 2>$STDERR_DEST
356 #RETVAL=$?
357 #if [ $RETVAL != 0 ]
358 #then
359 # echo sig_tone_tests failed!
360 # exit $RETVAL
361 #fi
362 #echo sig_tone_tests completed OK
363 echo sig_tone_tests not enabled
364
365 #./super_tone_rx_tests >$STDOUT_DEST 2>$STDERR_DEST
366 #RETVAL=$?
367 #if [ $RETVAL != 0 ]
368 #then
369 # echo super_tone_rx_tests failed!
370 # exit $RETVAL
371 #fi
372 #echo super_tone_rx_tests completed OK
373 echo super_tone_rx_tests not enabled
374
375 #./super_tone_tx_tests >$STDOUT_DEST 2>$STDERR_DEST
376 #RETVAL=$?
377 #if [ $RETVAL != 0 ]
378 #then
379 # echo super_tone_tx_tests failed!
380 # exit $RETVAL
381 #fi
382 #echo super_tone_tx_tests completed OK
383 echo super_tone_tx_tests not enabled
384
385 ./t31_tests -r >$STDOUT_DEST 2>$STDERR_DEST
386 RETVAL=$?
387 if [ $RETVAL != 0 ]
388 then
389 echo t31_tests -r failed!
390 exit $RETVAL
391 fi
392 ./t31_tests -s >$STDOUT_DEST 2>$STDERR_DEST
393 RETVAL=$?
394 if [ $RETVAL != 0 ]
395 then
396 echo t31_tests -s failed!
397 exit $RETVAL
398 fi
399 echo t31_tests completed OK
400
401 rm -f t38.tif
402 ./t38_gateway_tests >$STDOUT_DEST 2>$STDERR_DEST
403 RETVAL=$?
404 if [ $RETVAL != 0 ]
405 then
406 echo t38_gateway_tests failed!
407 exit $RETVAL
408 fi
409 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
410 # option means the normal differences in tags will be ignored.
411 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
412 RETVAL=$?
413 if [ $RETVAL != 0 ]
414 then
415 echo t38_gateway_tests failed!
416 exit $RETVAL
417 fi
418 rm -f t38.tif
419 ./t38_gateway_tests -e >$STDOUT_DEST 2>$STDERR_DEST
420 RETVAL=$?
421 if [ $RETVAL != 0 ]
422 then
423 echo t38_gateway_tests -e failed!
424 exit $RETVAL
425 fi
426 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
427 # option means the normal differences in tags will be ignored.
428 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
429 RETVAL=$?
430 if [ $RETVAL != 0 ]
431 then
432 echo t38_gateway_tests -e failed!
433 exit $RETVAL
434 fi
435 echo t38_gateway_tests completed OK
436
437 rm -f t38.tif
438 ./t38_gateway_to_terminal_tests >$STDOUT_DEST 2>$STDERR_DEST
439 RETVAL=$?
440 if [ $RETVAL != 0 ]
441 then
442 echo t38_gateway_to_terminal_tests failed!
443 exit $RETVAL
444 fi
445 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
446 # option means the normal differences in tags will be ignored.
447 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
448 RETVAL=$?
449 if [ $RETVAL != 0 ]
450 then
451 echo t38_gateway_to_terminal_tests failed!
452 exit $RETVAL
453 fi
454 rm -f t38.tif
455 ./t38_gateway_to_terminal_tests -e >$STDOUT_DEST 2>$STDERR_DEST
456 RETVAL=$?
457 if [ $RETVAL != 0 ]
458 then
459 echo t38_gateway_to_terminal_tests -e failed!
460 exit $RETVAL
461 fi
462 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
463 # option means the normal differences in tags will be ignored.
464 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
465 RETVAL=$?
466 if [ $RETVAL != 0 ]
467 then
468 echo t38_gateway_to_terminal_tests -e failed!
469 exit $RETVAL
470 fi
471 echo t38_gateway_to_terminal_tests completed OK
472
473 rm -f t38.tif
474 ./t38_terminal_to_gateway_tests >$STDOUT_DEST 2>$STDERR_DEST
475 RETVAL=$?
476 if [ $RETVAL != 0 ]
477 then
478 echo t38_terminal_to_gateway_tests failed!
479 exit $RETVAL
480 fi
481 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
482 # option means the normal differences in tags will be ignored.
483 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
484 RETVAL=$?
485 if [ $RETVAL != 0 ]
486 then
487 echo t38_terminal_to_gateway_tests failed!
488 exit $RETVAL
489 fi
490 rm -f t38.tif
491 ./t38_terminal_to_gateway_tests -e >$STDOUT_DEST 2>$STDERR_DEST
492 RETVAL=$?
493 if [ $RETVAL != 0 ]
494 then
495 echo t38_terminal_to_gateway_tests -e failed!
496 exit $RETVAL
497 fi
498 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
499 # option means the normal differences in tags will be ignored.
500 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
501 RETVAL=$?
502 if [ $RETVAL != 0 ]
503 then
504 echo t38_terminal_to_gateway_tests -e failed!
505 exit $RETVAL
506 fi
507 echo t38_terminal_to_gateway_tests completed OK
508
509 rm -f t38.tif
510 ./t38_terminal_tests >$STDOUT_DEST 2>$STDERR_DEST
511 RETVAL=$?
512 if [ $RETVAL != 0 ]
513 then
514 echo t38_terminal_tests failed!
515 exit $RETVAL
516 fi
517 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
518 # option means the normal differences in tags will be ignored.
519 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
520 RETVAL=$?
521 if [ $RETVAL != 0 ]
522 then
523 echo t38_terminal_tests failed!
524 exit $RETVAL
525 fi
526 rm -f t38.tif
527 ./t38_terminal_tests -e >$STDOUT_DEST 2>$STDERR_DEST
528 RETVAL=$?
529 if [ $RETVAL != 0 ]
530 then
531 echo t38_terminal_tests -e failed!
532 exit $RETVAL
533 fi
534 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
535 # option means the normal differences in tags will be ignored.
536 tiffcmp -t ${ITUTESTS_TIF} t38.tif >/dev/null
537 RETVAL=$?
538 if [ $RETVAL != 0 ]
539 then
540 echo t38_terminal_tests -e failed!
541 exit $RETVAL
542 fi
543 echo t38_terminal_tests completed OK
544
545 rm -f t4_tests_receive.tif
546 ./t4_tests >$STDOUT_DEST 2>$STDERR_DEST
547 RETVAL=$?
548 if [ $RETVAL != 0 ]
549 then
550 echo t4_tests failed!
551 exit $RETVAL
552 fi
553 # Now use tiffcmp to check the results. It will return non-zero if any page images differ. The -t
554 # option means the normal differences in tags will be ignored.
555 tiffcmp -t ${ITUTESTS_TIF} t4_tests_receive.tif >/dev/null
556 RETVAL=$?
557 if [ $RETVAL != 0 ]
558 then
559 echo t4_tests failed!
560 exit $RETVAL
561 fi
562 echo t4_tests completed OK
563
564 #./time_scale_tests >$STDOUT_DEST 2>$STDERR_DEST
565 #RETVAL=$?
566 #if [ $RETVAL != 0 ]
567 #then
568 # echo time_scale_tests failed!
569 # exit $RETVAL
570 #fi
571 #echo time_scale_tests completed OK
572 echo time_scale_tests not enabled
573
574 #./tone_generate_tests >$STDOUT_DEST 2>$STDERR_DEST
575 #RETVAL=$?
576 #if [ $RETVAL != 0 ]
577 #then
578 # echo tone_generate_tests failed!
579 # exit $RETVAL
580 #fi
581 #echo tone_generate_tests completed OK
582 echo tone_generate_tests not enabled
583
584 #./v17_tests >$STDOUT_DEST 2>$STDERR_DEST
585 #RETVAL=$?
586 #if [ $RETVAL != 0 ]
587 #then
588 # echo v17_tests failed!
589 # exit $RETVAL
590 #fi
591 #echo v17_tests completed OK
592 echo v17_tests not enabled
593
594 #./v22bis_tests >$STDOUT_DEST 2>$STDERR_DEST
595 #RETVAL=$?
596 #if [ $RETVAL != 0 ]
597 #then
598 # echo v22bis_tests failed!
599 # exit $RETVAL
600 #fi
601 #echo v22bis_tests completed OK
602 echo v22bis_tests not enabled
603
604 ./v27ter_tests -s -42 2400 >$STDOUT_DEST 2>$STDERR_DEST
605 RETVAL=$?
606 if [ $RETVAL != 0 ]
607 then
608 echo v27ter_tests failed!
609 exit $RETVAL
610 fi
611 ./v27ter_tests -s -42 4800 >$STDOUT_DEST 2>$STDERR_DEST
612 RETVAL=$?
613 if [ $RETVAL != 0 ]
614 then
615 echo v27ter_tests failed!
616 exit $RETVAL
617 fi
618 echo v27ter_tests completed OK
619
620 ./v29_tests -s -42 4800 >$STDOUT_DEST 2>$STDERR_DEST
621 RETVAL=$?
622 if [ $RETVAL != 0 ]
623 then
624 echo v29_tests failed!
625 exit $RETVAL
626 fi
627 ./v29_tests -s -42 7200 >$STDOUT_DEST 2>$STDERR_DEST
628 RETVAL=$?
629 if [ $RETVAL != 0 ]
630 then
631 echo v29_tests failed!
632 exit $RETVAL
633 fi
634 ./v29_tests -s -42 9600 >$STDOUT_DEST 2>$STDERR_DEST
635 RETVAL=$?
636 if [ $RETVAL != 0 ]
637 then
638 echo v29_tests failed!
639 exit $RETVAL
640 fi
641 echo v29_tests completed OK
642
643 #./v42_tests >$STDOUT_DEST 2>$STDERR_DEST
644 #RETVAL=$?
645 #if [ $RETVAL != 0 ]
646 #then
647 # echo v42_tests failed!
648 # exit $RETVAL
649 #fi
650 #echo v42_tests completed OK
651 echo v42_tests not enabled
652
653 ./v42bis_tests.sh >/dev/null
654 RETVAL=$?
655 if [ $RETVAL != 0 ]
656 then
657 echo v42bis_tests failed!
658 exit $RETVAL
659 fi
660 echo v42bis_tests completed OK
661
662 ./v8_tests >$STDOUT_DEST 2>$STDERR_DEST
663 RETVAL=$?
664 if [ $RETVAL != 0 ]
665 then
666 echo v8_tests failed!
667 exit $RETVAL
668 fi
669 echo v8_tests completed OK
670
671 ./vector_float_tests >$STDOUT_DEST 2>$STDERR_DEST
672 RETVAL=$?
673 if [ $RETVAL != 0 ]
674 then
675 echo vector_float_tests failed!
676 exit $RETVAL
677 fi
678 echo vector_float_tests completed OK
679
680 ./vector_int_tests >$STDOUT_DEST 2>$STDERR_DEST
681 RETVAL=$?
682 if [ $RETVAL != 0 ]
683 then
684 echo vector_int_tests failed!
685 exit $RETVAL
686 fi
687 echo vector_int_tests completed OK
688
689 echo
690 echo All regression tests successfully completed

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.