<div class="gmail_quote">On Mon, May 4, 2009 at 9:17 PM, fREW Schmidt <span dir="ltr"><<a href="mailto:frioux@gmail.com">frioux@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><div class="im">On Mon, May 4, 2009 at 5:26 AM, Andy Armstrong <span dir="ltr"><<a href="mailto:andy@hexten.net" target="_blank">andy@hexten.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On 4 May 2009, at 05:21, fREW Schmidt wrote:<br>
> I have written a small module that will turn TAP into color coded<br>
> html. It seems to work fine when I run it from a special standalone<br>
> service, but if I run it directly inside of a CGI::Application<br>
> controller the output never actually gets parsed. It's extremely<br>
> strange: if I run the TAP somehow ends up being the output of<br>
> running some apache related binary (it outputs a bunch of help on<br>
> what switches to use etc.)<br>
<br>
</div>Can we see that output please?<br>
<div></div></blockquote></div><div><br>Ok, here's the output from CAS:<br><br><span style="font-family: courier new,monospace;">FrewSchmidt2 [10185] ~/personal/web_critic % perl ../web_test/bin/webserver.pl </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">CGI::Application::Server: You can connect to your server at <a href="http://localhost:5052/" target="_blank">http://localhost:5052/</a></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">1..5</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ok 1 - use WebTest::Tester;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">ok 2 - didn't pass directory into constructor</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ok 3 - new() works</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">ok 4 - get_directory() works</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">not ok 5 - should find errors in test file</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># Failed test 'should find errors in test file'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># at /home/frew/personal/web_test/t/critic.t line 24.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># Structures begin differing at:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># $got = ''</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># $expected = ARRAY(0x8ebaec0)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># Looks like you failed 1 test of 5.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">1..1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ok 1 - hello_world should have a sane result</span><br style="font-family: courier new,monospace;">
<br>And then the following gets put in the apache error log:<br><br><span style="font-family: courier new,monospace;"># Usage: apache2 [-D name] [-d directory] [-f file]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># [-C "directive"] [-c "directive"]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># [-k start|restart|graceful|graceful-stop|stop]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># [-v] [-V] [-h] [-l] [-L] [-t] [-S] [-X]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># Options:</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -D name : define a name for use in <IfDefine name> directives</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -d directory : specify an alternate initial ServerRoot</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -f file : specify an alternate ServerConfigFile</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -C "directive" : process directive before reading config files</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -c "directive" : process directive after reading config files</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -e level : show startup errors of level (see LogLevel)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -E file : log startup errors to file</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -v : show version number</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -V : show compile settings</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -h : list available command line options (this page)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -l : list compiled in modules</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -L : list available configuration directives</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -S : a synonym for -t -D DUMP_VHOSTS</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -t -D DUMP_MODULES : show all loaded modules </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -M : a synonym for -t -D DUMP_MODULES</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"># -t : run syntax check for config files</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># -X : debug mode (only one worker, do not detach)</span><br style="font-family: courier new,monospace;">
<br></div></div>Any ideas?</blockquote><div><br>I don't know what caused this but I solved it by replacing:<br><br> my $parser = TAP::Parser->new( { source => $source } );<br><br>with:<br><br> my $tap_output = qx{perl $file 2>&1};<br>
my $parser = TAP::Parser->new( { tap => $tap_output } );<br><br>Anyway, whatever. It works now! Have a nice day! <br></div></div><br>-- <br>fREW Schmidt<br><a href="http://blog.afoolishmanifesto.com">http://blog.afoolishmanifesto.com</a><br>