25
25
http://www.gnu.org/copyleft/gpl.html or write to the Free Software
26
26
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
28
Revision 2.0 $Date: 2004/09/04 11:38:27 $
29
$Id: dev-manual.dbx,v 1.85 2004/09/04 11:38:27 vanbaal Exp $
28
Revision 2.0.2 $Date: 2006/07/20 12:11:15 $
29
$Id: dev-manual.dbx,v 1.87 2006/07/20 12:11:15 vanbaal Exp $
30
30
_________________________________________________________________
5031
5041
the week's changes of the stable branch into the unstable branch by
5032
5042
doing cvs update -j lire-stable-merged-20010715 -j lire-stable.
5044
Chapter 18. Testing and debugging
5048
Test before releasing
5049
Test-installations and test-runs
5050
Using the Perl debugger on Lire code
5052
Test before releasing
5036
5054
One week before release the software should be tested on all supported
5037
5055
platforms. In between releases the system gets tested on various
5038
5056
platforms on an ad hoc basis. When testing, use the to-be-released
5039
tarball. Run make dist to generate such a tarball.
5057
tarball. Run make distcheck to generate such a tarball.
5041
5059
Especially when changes to the Lire core have been made, the "test"
5042
5060
superservice can be handy, for easy setting up of tests of your code.
5043
5061
See also the section on Unit Testing in this document.
5063
Test-installations and test-runs
5065
We give some hints on various ways to debug the Lire code. One can
5066
make a test-install by extracting a tarball and running e.g.
5067
$ ./configure --prefix=$HOME/local && make && make install
5068
$ PATH=$HOME/local/bin:$PATH; export PATH
5069
$ MANPATH=$HOME/local/share/man; export MANPATH
5072
One can do a test-run by executing:
5073
$ echo 'some bug-triggering log line' | lr_log2report -o xml <converter> > /tmp
5075
$ lr_xml2report -o txt /tmp/report.xml > /tmp/report.txt
5076
$ $HOME/local/libexec/lire/convertors/combined2dlf < /tmp/combined.log > /tmp/d
5081
Using the Perl debugger on Lire code
5083
Please use the perl debugger: investing some time to learn is pays
5084
back really quick. Here's a very tiny howto.
5086
Start the debugger as e.g.
5087
perl -d `which lr_log2report` -o xml combined < tmp/log > /dev/null
5090
After starting the debugger, run "v" and "c lineno" to make sure all
5091
modules are loaded. Once that's done, you can fast-forward to a
5092
relevant routine using e.g. "c
5093
Lire::DlfAnalysers::ReferrerCategoriser::categorise". Now you can
5094
inspect variables and evaluate expressions by running e.g.
5095
DB<12> x $parsed_url->{'query'}
5098
Also, be sure to try the commands "s" and "r". Just these 4 command
5099
very likely are enough to get your job done. (The "y" command might be
5100
useful too, though). See perldebug(1) and perldebtut(1) for more
5045
5103
Chapter 19. Making a Release
5047
5105
Table of Contents