[tap-l] Outputting TAP from the shell
Ovid
publiustemp-tapx at yahoo.com
Thu Mar 20 13:30:37 UTC 2008
--- "Jeremiah C. Foster" <jeremiah.foster at ericsson.com> wrote:
> Hello!
>
> I have read a bit on the TAP wiki about various ways to output TAP.
> In
> particular I would like to output TAP so that I can read it with
> TAP::Parser::Aggregator. I have a set of scripts written in Tcl (i.e.
> expect), perl and shell script. I would like to emit TAP from the
> shell
> scripts.
>
> I looked at the git project's test scripts, and stole some code to
> print out ok and fail, but I see no way to present to the
> TAP::Parser::Aggregator module information about the number of tests
> passed. Is there an example of this somewhere written in shell?
> Lacking
> an example, what do I have to pass to TAP::Parser::Aggregator so that
> I
> can get an aggregate of passed and failed tests?
>
> Here is a sample of my output:
>
> 080319 2008 007.02.sh: ok 1 - linux-logtest.x86_64.rpm on
> 192.168.0.5
> 080319 2008 007.02.sh: ok 2 - linux-logtest.x86_64.rpm to
> 192.168.0.5
> 080319 2008 007.02.sh: FAIL 3 - linux-logtest.x86_64.rpm not
> moved!
> 080319 2008 007.02.sh: ok 4 - linux-logtest.x86_64.rpm on
> 192.168.0.5
> Passed: 0
> Failed: 0
>
>
> As you can see, I can output fail and ok, but it does not get
> aggregated. Any pointers welcome!
The ok/not ok bit must be at the start of each line (also note that I
have 'not ok' instead of 'FAIL'):
ok 1 - linux-logtest.x86_64.rpm on 192.168.0.5
ok 2 - linux-logtest.x86_64.rpm to 192.168.0.5
not ok 3 - linux-logtest.x86_64.rpm not moved!
ok 4 - linux-logtest.x86_64.rpm on 192.168.0.5
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Perl and CGI - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/
More information about the tap-l
mailing list