-#! /bin/sh\r
-#----------------------------------------------------------------------------\r
-# test suite for IRMP\r
-#\r
-# usage:\r
-#\r
-# ./test-suite.sh\r
-#\r
-# Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de\r
-#\r
-# $Id: test-suite.sh,v 1.9 2010/06/08 22:22:13 fm Exp $\r
-#----------------------------------------------------------------------------\r
-\r
-for j in \\r
- Dbox.txt \\r
- DK_Digital.txt \\r
- Grundig_TP715.txt \\r
- Grundig_TP715_SatTV.txt \\r
- Grundig_TP715_Video.txt \\r
- Matsushita.txt \\r
- Nokia.txt \\r
- Panasonic-Blue-Ray.txt \\r
- RC5-Taste.txt \\r
- Samsung_DVD_Rec_00062C.txt \\r
- Samsung_TV.txt \\r
- Sony-RM-S-310.txt \\r
- sony-rm-s311.txt \\r
- Sony-RM-U305C.txt \\r
- Sony-RMT-D142P-DVD.txt \\r
- Sony-RMT-V406.txt \\r
- Sony_RM-S315_lange.txt \\r
- Sony_Bravia_RM-ED0009_new.txt \\r
- Yamaha-RAV388.txt \\r
- apple.txt \\r
- bo_beolink1000-10kHz.txt \\r
- denon.txt \\r
- elta_radio.txt \\r
- nec-repetition.txt \\r
- nec-skymaster-dt500.txt \\r
- nec.txt \\r
- nubert-subwoofer.txt \\r
- orion_vcr_07660BM070.txt \\r
- panasonic-scan.txt \\r
- rc5.txt \\r
- rc5x-79.txt \\r
- rc5x.txt \\r
- rc6-hold.txt \\r
- rc6.txt \\r
- sharp-denon.txt \\r
- sharp-denon2.txt\r
-do\r
- echo "testing $j ..."\r
- if ../irmp < $j | grep -q error\r
- then\r
- ../irmp < $j | grep error\r
- echo "test failed"\r
- exit 1\r
- fi\r
-done\r
-\r
-for j in \\r
- Siemens-Gigaset-M740AV-15kHz.txt \\r
- bo_beolink1000-15kHz.txt \\r
- denon-15kHz.txt \\r
- fdc-15kHz.txt\r
-do\r
- echo "testing $j ..."\r
- if ../irmp-15kHz < $j | grep -q error\r
- then\r
- ../irmp-15kHz < $j | grep error\r
- echo "test failed"\r
- exit 1\r
- fi\r
-done\r
-\r
-echo "all tests successful"\r
-exit 0\r
+#! /bin/sh
+#----------------------------------------------------------------------------
+# test suite for IRMP
+#
+# usage:
+#
+# ./test-suite.sh
+#
+# Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de
+#
+# $Id: test-suite.sh,v 1.10 2010/06/09 12:04:04 fm Exp $
+#----------------------------------------------------------------------------
+
+set -e # exit on error
+cd `dirname $0`
+mkdir -p tmpsrc
+cp ../irmp.[ch] ../irmpconfig.h ../irsnd.[ch] ../irsndconfig.h ../irmpsystem.h ../irmpprotocols.h ../makefile.lnx tmpsrc
+cd tmpsrc
+sed 's/#define \(IRMP_SUPPORT_[A-Z_0-9]* *\)[01]/#define \1 1/g' <irmpconfig.h >irmpconfig.new
+mv irmpconfig.new irmpconfig.h
+make -f makefile.lnx clean
+make -f makefile.lnx all
+cd ..
+
+for j in \
+ 3xNEC3xAPPLE.log.txt \
+ Dbox.txt \
+ DK_Digital.txt \
+ Grundig_TP715.txt \
+ Grundig_TP715_SatTV.txt \
+ Grundig_TP715_Video.txt \
+ Kathrein-UFS-912-Remote.txt \
+ Matsushita.txt \
+ Nokia.txt \
+ Panasonic-Blue-Ray.txt \
+ RC5-Taste.txt \
+ Samsung_DVD_Rec_00062C.txt \
+ Samsung_TV.txt \
+ Sony-RM-S-310.txt \
+ sony-rm-s311.txt \
+ Sony-RM-U305C.txt \
+ Sony-RMT-D142P-DVD.txt \
+ Sony-RMT-V406.txt \
+ Sony_RM-S315_lange.txt \
+ Sony_Bravia_RM-ED0009_new.txt \
+ Yamaha-RAV388.txt \
+ apple.txt \
+ apple-unibody-remote.txt \
+ bo_beolink1000-10kHz.txt \
+ denon.txt \
+ elta_radio.txt \
+ fdc.txt \
+ jvc.txt \
+ nec-repetition.txt \
+ nec-skymaster-dt500.txt \
+ nec.txt \
+ nikon.txt \
+ nubert-subwoofer.txt \
+ orion_vcr_07660BM070.txt \
+ panasonic-scan.txt \
+ rc-car.txt \
+ rc5.txt \
+ rc5x-79.txt \
+ rc5x.txt \
+ rc6-hold.txt \
+ rc6.txt \
+ sharp_kurz_10khz.txt \
+ sharp_lang_10khz.txt \
+ xbox360-10kHz.txt
+do
+ echo -n "testing $j ... "
+ if tmpsrc/irmp-10kHz -v < $j | grep -q error
+ then
+ tmpsrc/irmp-10kHz -v < $j | grep error
+ echo "test failed"
+ exit 1
+ else
+ if tmpsrc/irmp-10kHz -v < $j | grep -q checked
+ then
+ echo "checked!"
+ else
+ echo "successful"
+ fi
+ fi
+done
+
+# t-home-mediareceiver-15kHz.txt (RUWIDO) conflicts with Denon
+
+for j in \
+ a1tvbox-15kHz.txt \
+ bo_beolink1000-15kHz.txt \
+ bose_wave_system_15khz.txt \
+ denon-15kHz.txt \
+ denon-rc-176-15kHz.txt \
+ denon-rc-176-repeat-15kHz.txt \
+ irc-15kHz.txt \
+ kathrein-15kHz.txt \
+ recs80-15kHz.txt \
+ saa3004-15kHz.txt \
+ samsung32-15kHz.txt \
+ sharp_15khz.txt \
+ Siemens-Gigaset-M740AV-15kHz.txt \
+ thomson-mb100-15kHz.txt \
+ tp400vt-15kHz.txt \
+ universal-15kHz.txt \
+ xbox360-15kHz.txt
+do
+ echo -n "testing $j ... "
+ if tmpsrc/irmp-15kHz -v < $j | grep -q error
+ then
+ tmpsrc/irmp-15kHz -v < $j | grep error
+ echo "test failed"
+ exit 1
+ else
+ if tmpsrc/irmp-15kHz -v < $j | grep -q checked
+ then
+ echo "checked!"
+ else
+ echo "successful"
+ fi
+ fi
+done
+
+for j in \
+ a1tvbox-20kHz.txt \
+ rc-car-20kHz.txt \
+ fdc-20kHz.txt \
+ fdc2-20kHz.txt \
+ saa3004-20kHz.txt \
+ telefunken-1560-20kHz.txt
+do
+ echo -n "testing $j ... "
+ if tmpsrc/irmp-20kHz -v < $j | grep -q error
+ then
+ tmpsrc/irmp-20kHz -v < $j | grep error
+ echo "test failed"
+ exit 1
+ else
+ if tmpsrc/irmp-20kHz -v < $j | grep -q checked
+ then
+ echo "checked!"
+ else
+ echo "successful"
+ fi
+ fi
+done
+
+# rm -rf tmpsrc
+
+echo "all tests successful"
+exit 0