xmltv/grab/fi test.sh,2.07,2.08
Stefan Becker <[email protected]> Sun, 06 Dec 2015 13:43:09 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/fi
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11773/grab/fi
Modified Files:
test.sh
Log Message:
- test.sh: add check for Perl warnings
- programme.pm: fix Perl warnings
Index: test.sh
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fi/test.sh,v
retrieving revision 2.07
retrieving revision 2.08
diff -C2 -d -r2.07 -r2.08
*** test.sh 21 Jun 2014 16:36:15 -0000 2.07
--- test.sh 6 Dec 2015 13:43:07 -0000 2.08
***************
*** 16,19 ****
--- 16,34 ----
fi
}
+ check_perl_warnings() {
+ local log=$1
+ if [ -s "$log" ]; then
+ perl <$log >"${log}_warnings" -ne 'print if / at \S+ line \d+\.$/'
+ if [ -s "${log}_warnings" ]; then
+ ( \
+ echo "Test with log '$log' caused Perl warnings:"; \
+ echo; \
+ cat "${log}_warnings"; \
+ echo; \
+ ) 1>&2
+ test_failure=1
+ fi
+ fi
+ }
validate_xml() {
local xml=$1
***************
*** 81,88 ****
--- 96,105 ----
perl -I ${xmltv_lib} ${script_file} --list-channels --cache t_fi_cache > t_fi_channels.xml --quiet 2>t_fi_channels.log
if [ $? -ne 0 ]; then
+ check_perl_warnings t_fi_channels.log
tail -1 t_fi_channels.log
test_failure=1
fi
perl -I ${xmltv_lib} ${script_file} --config-file ${script_dir}/test.conf --offset 1 --days 2 --cache t_fi_cache > t_fi_1_2.xml --quiet 2>t_fi_1.log
+ check_perl_warnings t_fi_1.log
validate_xml t_fi_1_2.xml
${xmltv_script}/tv_cat t_fi_1_2.xml --output /dev/null 2>t_fi_6.log
***************
*** 91,96 ****
--- 108,116 ----
check_log t_fi_1_2.sort.log
perl -I ${xmltv_lib} ${script_file} --config-file ${script_dir}/test.conf --offset 1 --days 1 --cache t_fi_cache --output t_fi_1_1.xml 2>t_fi_2.log
+ check_perl_warnings t_fi_2.log
perl -I ${xmltv_lib} ${script_file} --config-file ${script_dir}/test.conf --offset 2 --days 1 --cache t_fi_cache > t_fi_2_1.xml 2>t_fi_3.log
+ check_perl_warnings t_fi_3.log
perl -I ${xmltv_lib} ${script_file} --config-file ${script_dir}/test.conf --offset 1 --days 2 --cache t_fi_cache --quiet --output t_fi_4.xml 2>t_fi_4.log
+ check_perl_warnings t_fi_4.log
${xmltv_script}/tv_cat t_fi_1_1.xml t_fi_2_1.xml --output t_fi_1_2-2.xml 2>t_fi_5.log
check_log t_fi_5.log
***************
*** 105,112 ****
--- 125,135 ----
perl -pe 's/^#channel\s+/channel /' <${script_dir}/test.conf >${test_dir}/test.conf
perl -I ${xmltv_lib} ${script_file} --config-file ${test_dir}/test.conf --offset 1 --days 7 --cache t_fi_cache >t_fi_full_7.xml --quiet 2>t_fi_full.log
+ check_perl_warnings t_fi_full.log
validate_xml t_fi_full_7.xml
+ rm -f t_fi_single.log
for d in $(seq 1 7); do
perl -I ${xmltv_lib} ${script_file} --config-file ${test_dir}/test.conf --offset $d --days 1 --cache t_fi_cache >t_fi_single_$d.xml --quiet 2>>t_fi_single.log
done
+ check_perl_warnings t_fi_single.log
${xmltv_script}/tv_cat t_fi_full_7.xml --output /dev/null 2>t_fi_output.log
${xmltv_script}/tv_sort --duplicate-error t_fi_full_7.xml --output t_fi_full_7.sorted.xml 2>>t_fi_output.log
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140