Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

geoff (2013)

geoff
  reversethis-{gro ... om} {ta} {ffoeg}
http://www.modperlcookbook.org/

see http://www.modperlcookbook.org/~geoff/ [modperlcookbook.org] for personal information, links to presentations, GPG key, and so on.

Journal of geoff (2013)

Sunday November 16, 2003
02:42 PM

Apache-Test bugreport

[ #15801 ]
in Apache-Test 1.06 Stas introduced a new cool feature that allows you to specify a banner (or other string) to be printed when a test fails under 'make test'. for instance, if any of the mod_perl 2.0 tests fail the end-user is greeted by

+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+

the way you enable this feature is to define a bug_report() subroutine in your TEST.PL template. the only problem is, most people don't use a test template, instead calling Apache::TestRun->generate_script() to generate their test script.

the next release of Apache-Test (1.07) will include the ability to specify the failure string via a new bugreport argument to generate_script(), such as

Apache::TestRun->generate_script(bugreport => <<EOF);
---- YIKES ----
EOF

which will look like this if 'make test' fails

*** server localhost.localdomain:8529 shutdown
!!! error running tests (please examine t/logs/error_log)
---- YIKES ----
make: *** [run_tests] Error 1

of course, that's not a very useful message, but you can change it to point to rt, your documentation, or whatever - pretty useful, I think. anyway, it's checked in to cvs now, so give it a try.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.