[COMMIT LOGREPORT] service/doc dev-manual.dbx,1.85,1.86
Joost van Baal
vanbaal at users.sourceforge.net
Sun Jul 16 16:45:34 CEST 2006
Update of /cvsroot/logreport/service/doc
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31608
Modified Files:
dev-manual.dbx
Log Message:
added some extra notes and hints on how to test and debug Lire code
Index: dev-manual.dbx
===================================================================
RCS file: /cvsroot/logreport/service/doc/dev-manual.dbx,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- dev-manual.dbx 4 Sep 2004 11:38:27 -0000 1.85
+++ dev-manual.dbx 16 Jul 2006 14:45:32 -0000 1.86
@@ -2641,7 +2641,10 @@
</chapter>
<chapter id="chap:testing">
- <title>Testing</title>
+ <title>Testing and debugging</title>
+
+ <section>
+ <title>Test before releasing</title>
<para>One week before release the software should be tested on
all supported platforms. In between releases the system gets tested
@@ -2655,6 +2658,58 @@
tests of your code. See also the section on Unit Testing in this
document.
</para>
+
+ </section>
+ <section>
+ <title>Test-installations and test-runs</title>
+ <para>
+ We give some hints on various ways to debug the &Lire; code.
+ One can make a test-install by extracting a tarball and running e.g.
+
+ <programlisting>
+&user-prompt; ./configure --prefix=$HOME/local && make && make install
+&user-prompt;PATH=$HOME/local/bin:$PATH; export PATH
+&user-prompt;MANPATH=$HOME/local/share/man; export MANPATH
+ </programlisting>
+
+ One can do a test-run by executing:
+
+ <programlisting>
+&user-prompt;echo 'some bug-triggering log line' | lr_log2report -o xml <converter> > /tmp/report.xml
+&user-prompt;lr_xml2report -o txt /tmp/report.xml > /tmp/report.txt
+&user-prompt;$HOME/local/libexec/lire/convertors/combined2dlf < /tmp/combined.log > /tmp/dlf
+
+ </programlisting>
+ </para>
+ </section>
+ <section>
+ <title>Using the Perl debugger on Lire code</title>
+
+ <para>
+ Please use the perl debugger: investing some time to learn is pays back really
+ quick. Here's a very tiny howto.
+ </para>
+ <para>
+ Start the debugger as e.g.
+
+ <programlisting>
+perl -d `which lr_log2report` -o xml combined < tmp/log > /dev/null
+ </programlisting>
+
+After starting the debugger, run "v" and "c lineno" to make sure all modules are
+loaded. Once that's done, you can fast-forward to a relevant routine using
+e.g. "c Lire::DlfAnalysers::ReferrerCategoriser::categorise". Now you can
+inspect variables and evaluate expressions by running e.g.
+
+ <programlisting>
+ DB<12> x $parsed_url->{'query'}
+ </programlisting>
+
+Also, be sure to try the commands "s" and "r". Just these 4 command very likely
+are enough to get your job done. (The "y" command might be useful too, though).
+See perldebug(1) and perldebtut(1) for more information.
+ </para>
+ </section>
</chapter>
<chapter id="chap:release">
--
To UNSUBSCRIBE, email to commit-request at logreport.org with a subject of
"unsubscribe". Trouble? Send an email with subject "help" to
commit-request at logreport.org
More information about the Commit
mailing list