]>
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 ../irmpsystem.h ../irmpprotocols.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 | 3xNEC3xAPPLE.log.txt \ | |
27 | Dbox.txt \ | |
28 | DK_Digital.txt \ | |
29 | Grundig_TP715.txt \ | |
30 | Grundig_TP715_SatTV.txt \ | |
31 | Grundig_TP715_Video.txt \ | |
32 | Kathrein-UFS-912-Remote.txt \ | |
33 | Matsushita.txt \ | |
34 | Nokia.txt \ | |
35 | Panasonic-Blue-Ray.txt \ | |
36 | RC5-Taste.txt \ | |
37 | Samsung_DVD_Rec_00062C.txt \ | |
38 | Samsung_TV.txt \ | |
39 | Sony-RM-S-310.txt \ | |
40 | sony-rm-s311.txt \ | |
41 | Sony-RM-U305C.txt \ | |
42 | Sony-RMT-D142P-DVD.txt \ | |
43 | Sony-RMT-V406.txt \ | |
44 | Sony_RM-S315_lange.txt \ | |
45 | Sony_Bravia_RM-ED0009_new.txt \ | |
46 | Yamaha-RAV388.txt \ | |
47 | apple.txt \ | |
48 | apple-unibody-remote.txt \ | |
49 | bo_beolink1000-10kHz.txt \ | |
50 | denon.txt \ | |
51 | elta_radio.txt \ | |
52 | fdc.txt \ | |
53 | jvc.txt \ | |
54 | nec-repetition.txt \ | |
55 | nec-skymaster-dt500.txt \ | |
56 | nec.txt \ | |
57 | nikon.txt \ | |
58 | nubert-subwoofer.txt \ | |
59 | orion_vcr_07660BM070.txt \ | |
60 | panasonic-scan.txt \ | |
61 | rc-car.txt \ | |
62 | rc5.txt \ | |
63 | rc5x-79.txt \ | |
64 | rc5x.txt \ | |
65 | rc6-hold.txt \ | |
66 | rc6.txt \ | |
67 | sharp_kurz_10khz.txt \ | |
68 | sharp_lang_10khz.txt \ | |
69 | xbox360-10kHz.txt | |
70 | do | |
71 | echo -n "testing $j ... " | |
72 | if tmpsrc/irmp-10kHz -v < $j | grep -q error | |
73 | then | |
74 | tmpsrc/irmp-10kHz -v < $j | grep error | |
75 | echo "test failed" | |
76 | exit 1 | |
77 | else | |
78 | if tmpsrc/irmp-10kHz -v < $j | grep -q checked | |
79 | then | |
80 | echo "checked!" | |
81 | else | |
82 | echo "successful" | |
83 | fi | |
84 | fi | |
85 | done | |
86 | ||
87 | # t-home-mediareceiver-15kHz.txt (RUWIDO) conflicts with Denon | |
88 | ||
89 | for j in \ | |
90 | a1tvbox-15kHz.txt \ | |
91 | bo_beolink1000-15kHz.txt \ | |
92 | bose_wave_system_15khz.txt \ | |
93 | denon-15kHz.txt \ | |
94 | denon-rc-176-15kHz.txt \ | |
95 | denon-rc-176-repeat-15kHz.txt \ | |
96 | irc-15kHz.txt \ | |
97 | kathrein-15kHz.txt \ | |
98 | recs80-15kHz.txt \ | |
99 | saa3004-15kHz.txt \ | |
100 | samsung32-15kHz.txt \ | |
101 | sharp_15khz.txt \ | |
102 | Siemens-Gigaset-M740AV-15kHz.txt \ | |
103 | thomson-mb100-15kHz.txt \ | |
104 | tp400vt-15kHz.txt \ | |
105 | universal-15kHz.txt \ | |
106 | xbox360-15kHz.txt | |
107 | do | |
108 | echo -n "testing $j ... " | |
109 | if tmpsrc/irmp-15kHz -v < $j | grep -q error | |
110 | then | |
111 | tmpsrc/irmp-15kHz -v < $j | grep error | |
112 | echo "test failed" | |
113 | exit 1 | |
114 | else | |
115 | if tmpsrc/irmp-15kHz -v < $j | grep -q checked | |
116 | then | |
117 | echo "checked!" | |
118 | else | |
119 | echo "successful" | |
120 | fi | |
121 | fi | |
122 | done | |
123 | ||
124 | for j in \ | |
125 | a1tvbox-20kHz.txt \ | |
126 | rc-car-20kHz.txt \ | |
127 | fdc-20kHz.txt \ | |
128 | fdc2-20kHz.txt \ | |
129 | saa3004-20kHz.txt \ | |
130 | telefunken-1560-20kHz.txt | |
131 | do | |
132 | echo -n "testing $j ... " | |
133 | if tmpsrc/irmp-20kHz -v < $j | grep -q error | |
134 | then | |
135 | tmpsrc/irmp-20kHz -v < $j | grep error | |
136 | echo "test failed" | |
137 | exit 1 | |
138 | else | |
139 | if tmpsrc/irmp-20kHz -v < $j | grep -q checked | |
140 | then | |
141 | echo "checked!" | |
142 | else | |
143 | echo "successful" | |
144 | fi | |
145 | fi | |
146 | done | |
147 | ||
148 | # rm -rf tmpsrc | |
149 | ||
150 | echo "all tests successful" | |
151 | exit 0 |