]>
Commit | Line | Data |
---|---|---|
881dbf79 | 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 | ||
6f750020 | 14 | set -e # exit on error |
881dbf79 | 15 | cd `dirname $0` |
6f750020 | 16 | mkdir -p tmpsrc |
08f2dd9d | 17 | cp ../irmp.[ch] ../irmpconfig.h ../irsnd.[ch] ../irsndconfig.h ../irmpsystem.h ../irmpprotocols.h ../makefile.lnx tmpsrc |
6f750020 | 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 .. | |
881dbf79 | 24 | |
25 | for j in \ | |
775fabfa | 26 | 3xNEC3xAPPLE.log.txt \ |
881dbf79 | 27 | Dbox.txt \ |
28 | DK_Digital.txt \ | |
29 | Grundig_TP715.txt \ | |
30 | Grundig_TP715_SatTV.txt \ | |
31 | Grundig_TP715_Video.txt \ | |
c7a47e89 | 32 | Kathrein-UFS-912-Remote.txt \ |
881dbf79 | 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 \ | |
770a1a9d | 48 | apple-unibody-remote.txt \ |
881dbf79 | 49 | bo_beolink1000-10kHz.txt \ |
50 | denon.txt \ | |
51 | elta_radio.txt \ | |
6f750020 | 52 | fdc.txt \ |
770a1a9d | 53 | jvc.txt \ |
881dbf79 | 54 | nec-repetition.txt \ |
55 | nec-skymaster-dt500.txt \ | |
56 | nec.txt \ | |
9405f84a | 57 | nikon.txt \ |
881dbf79 | 58 | nubert-subwoofer.txt \ |
59 | orion_vcr_07660BM070.txt \ | |
60 | panasonic-scan.txt \ | |
6f750020 | 61 | rc-car.txt \ |
881dbf79 | 62 | rc5.txt \ |
63 | rc5x-79.txt \ | |
64 | rc5x.txt \ | |
65 | rc6-hold.txt \ | |
66 | rc6.txt \ | |
a6a30aa6 | 67 | sharp_kurz_10khz.txt \ |
68 | sharp_lang_10khz.txt \ | |
c7a47e89 | 69 | xbox360-10kHz.txt |
881dbf79 | 70 | do |
775fabfa | 71 | echo -n "testing $j ... " |
72 | if tmpsrc/irmp-10kHz -v < $j | grep -q error | |
881dbf79 | 73 | then |
775fabfa | 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 | |
881dbf79 | 84 | fi |
85 | done | |
86 | ||
08f2dd9d | 87 | # t-home-mediareceiver-15kHz.txt (RUWIDO) conflicts with Denon |
88 | ||
881dbf79 | 89 | for j in \ |
fa09ce10 | 90 | a1tvbox-15kHz.txt \ |
881dbf79 | 91 | bo_beolink1000-15kHz.txt \ |
3a7e26e1 | 92 | bose_wave_system_15khz.txt \ |
c7a47e89 | 93 | denon-15kHz.txt \ |
3a7e26e1 | 94 | denon-rc-176-15kHz.txt \ |
775fabfa | 95 | denon-rc-176-repeat-15kHz.txt \ |
cc4e8ef2 | 96 | irc-15kHz.txt \ |
97 | kathrein-15kHz.txt \ | |
98 | recs80-15kHz.txt \ | |
0f700c8e | 99 | samsung32-15kHz.txt \ |
a6a30aa6 | 100 | sharp_15khz.txt \ |
08f2dd9d | 101 | Siemens-Gigaset-M740AV-15kHz.txt \ |
775fabfa | 102 | thomson-mb100-15kHz.txt \ |
08f2dd9d | 103 | tp400vt-15kHz.txt \ |
93ba2e01 | 104 | universal-15kHz.txt \ |
c7a47e89 | 105 | xbox360-15kHz.txt |
881dbf79 | 106 | do |
775fabfa | 107 | echo -n "testing $j ... " |
6f750020 | 108 | if tmpsrc/irmp-15kHz -v < $j | grep -q error |
881dbf79 | 109 | then |
775fabfa | 110 | tmpsrc/irmp-15kHz -v < $j | grep error |
111 | echo "test failed" | |
112 | exit 1 | |
113 | else | |
114 | if tmpsrc/irmp-15kHz -v < $j | grep -q checked | |
115 | then | |
116 | echo "checked!" | |
117 | else | |
118 | echo "successful" | |
119 | fi | |
881dbf79 | 120 | fi |
121 | done | |
122 | ||
6f750020 | 123 | for j in \ |
fa09ce10 | 124 | a1tvbox-20kHz.txt \ |
6f750020 | 125 | rc-car-20kHz.txt \ |
126 | fdc-20kHz.txt \ | |
127 | fdc2-20kHz.txt | |
128 | do | |
775fabfa | 129 | echo -n "testing $j ... " |
6f750020 | 130 | if tmpsrc/irmp-20kHz -v < $j | grep -q error |
131 | then | |
775fabfa | 132 | tmpsrc/irmp-20kHz -v < $j | grep error |
133 | echo "test failed" | |
134 | exit 1 | |
135 | else | |
136 | if tmpsrc/irmp-20kHz -v < $j | grep -q checked | |
137 | then | |
138 | echo "checked!" | |
139 | else | |
140 | echo "successful" | |
141 | fi | |
6f750020 | 142 | fi |
143 | done | |
881dbf79 | 144 | |
fc80d688 | 145 | # rm -rf tmpsrc |
881dbf79 | 146 | |
147 | echo "all tests successful" | |
148 | exit 0 |