]>
Commit | Line | Data |
---|---|---|
1 | #! /bin/sh | |
2 | #---------------------------------------------------------------------------- | |
3 | # test suite for IRMP | |
4 | # | |
5 | # usage: | |
6 | # | |
7 | # ./test-suite.sh | |
8 | # | |
9 | # Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de | |
10 | # | |
11 | # $Id: test-suite.sh,v 1.10 2010/06/09 12:04:04 fm Exp $ | |
12 | #---------------------------------------------------------------------------- | |
13 | ||
14 | set -e # exit on error | |
15 | cd `dirname $0` | |
16 | mkdir -p tmpsrc | |
17 | cp ../irmp.[ch] ../irmpconfig.h ../irsnd.[ch] ../irsndconfig.h ../makefile.lnx tmpsrc | |
18 | cd tmpsrc | |
19 | sed 's/#define \(IRMP_SUPPORT_[A-Z_0-9]* *\)[01]/#define \1 1/g' <irmpconfig.h >irmpconfig.new | |
20 | mv irmpconfig.new irmpconfig.h | |
21 | make -f makefile.lnx clean | |
22 | make -f makefile.lnx all | |
23 | cd .. | |
24 | ||
25 | for j in \ | |
26 | Dbox.txt \ | |
27 | DK_Digital.txt \ | |
28 | Grundig_TP715.txt \ | |
29 | Grundig_TP715_SatTV.txt \ | |
30 | Grundig_TP715_Video.txt \ | |
31 | Kathrein-UFS-912-Remote.txt \ | |
32 | Matsushita.txt \ | |
33 | Nokia.txt \ | |
34 | Panasonic-Blue-Ray.txt \ | |
35 | RC5-Taste.txt \ | |
36 | Samsung_DVD_Rec_00062C.txt \ | |
37 | Samsung_TV.txt \ | |
38 | Sony-RM-S-310.txt \ | |
39 | sony-rm-s311.txt \ | |
40 | Sony-RM-U305C.txt \ | |
41 | Sony-RMT-D142P-DVD.txt \ | |
42 | Sony-RMT-V406.txt \ | |
43 | Sony_RM-S315_lange.txt \ | |
44 | Sony_Bravia_RM-ED0009_new.txt \ | |
45 | Yamaha-RAV388.txt \ | |
46 | apple.txt \ | |
47 | apple-unibody-remote.txt \ | |
48 | bo_beolink1000-10kHz.txt \ | |
49 | denon.txt \ | |
50 | elta_radio.txt \ | |
51 | fdc.txt \ | |
52 | jvc.txt \ | |
53 | nec-repetition.txt \ | |
54 | nec-skymaster-dt500.txt \ | |
55 | nec.txt \ | |
56 | nikon.txt \ | |
57 | nubert-subwoofer.txt \ | |
58 | orion_vcr_07660BM070.txt \ | |
59 | panasonic-scan.txt \ | |
60 | rc-car.txt \ | |
61 | rc5.txt \ | |
62 | rc5x-79.txt \ | |
63 | rc5x.txt \ | |
64 | rc6-hold.txt \ | |
65 | rc6.txt \ | |
66 | sharp-denon.txt \ | |
67 | sharp-denon2.txt \ | |
68 | xbox360-10kHz.txt | |
69 | do | |
70 | echo "testing $j ..." | |
71 | if tmpsrc/irmp -v < $j | grep -q error | |
72 | then | |
73 | tmpsrc/irmp -v < $j | grep error | |
74 | echo "test failed" | |
75 | exit 1 | |
76 | fi | |
77 | done | |
78 | ||
79 | for j in \ | |
80 | Siemens-Gigaset-M740AV-15kHz.txt \ | |
81 | bo_beolink1000-15kHz.txt \ | |
82 | denon-15kHz.txt \ | |
83 | t-home-mediareceiver-15kHz.txt \ | |
84 | xbox360-15kHz.txt | |
85 | do | |
86 | echo "testing $j ..." | |
87 | if tmpsrc/irmp-15kHz -v < $j | grep -q error | |
88 | then | |
89 | tmpsrc/irmp-15kHz -v < $j | grep error | |
90 | echo "test failed" | |
91 | exit 1 | |
92 | fi | |
93 | done | |
94 | ||
95 | for j in \ | |
96 | rc-car-20kHz.txt \ | |
97 | fdc-20kHz.txt \ | |
98 | fdc2-20kHz.txt | |
99 | do | |
100 | echo "testing $j ..." | |
101 | if tmpsrc/irmp-20kHz -v < $j | grep -q error | |
102 | then | |
103 | tmpsrc/irmp-20kHz -v < $j | grep error | |
104 | echo "test failed" | |
105 | exit 1 | |
106 | fi | |
107 | done | |
108 | ||
109 | rm -rf tmpsrc | |
110 | ||
111 | echo "all tests successful" | |
112 | exit 0 |