A new TAPx::Parser

Ovid on 2007-01-07T20:53:52

In case you don't read the Perl QA list, there's a development version of TAPx::Parser available on the CPAN. It has a huge number of new features (mostly the test harness and the new runtests utility, including:

  • Optional colored test output
  • Telling you which TODO tests passes
  • Capturing more information than Test::Harness
  • Simultaneously run tests in multiple languages via the --execrc feature
  • Tell the harness how Perl will run the tests (via --exec)
  • Uses IPC::Open3 to guarantee STDERR and STDOUT are synchronized (no longer overriding Test::Builder internals)
  • More examples/
  • Very easy to customize and override the test output

See the example/README and the Changes file for a decent idea of what you can do with this new release. I think it's finally at the point where I can switch to this rather than rely on prove and Test::Harness.

If it passes tests on your system, would you please post your OS and version of Perl for me?


Built fine on OS X / 5.8.8

Adrian on 2007-01-08T09:49:42

% uname -a
Darwin dhcp-157.office.community.net.uk 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386

% perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
    Platform:
        osname=darwin, osvers=8.7.1, archname=darwin-2level
        uname='darwin dhcp-162.office.community.net.uk 8.7.1 darwin kernel version 8.7.1: wed jun 7 16:19:56 pdt 2006; root:xnu-792.9.72.obj~2release_i386 i386 i386 '
        config_args='-de'
        hint=recommended, useposix=true, d_sigaction=define
        usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
        useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
        use64bitint=undef use64bitall=undef uselongdouble=undef
        usemymalloc=n, bincompat5005=undef
    Compiler:
        cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement',
        optimize='-O3',
        cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
        ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5250)', gccosandvers=''
        intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
        d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
        ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
        alignbytes=8, prototype=define
    Linker and Libraries:
        ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =''
        libpth=/usr/lib
        libs=-ldbm -ldl -lm -lc
        perllibs=-ldl -lm -lc
        libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
        gnulibc_version=''
    Dynamic Linking:
        dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
        cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup'

Characteristics of this binary (from libperl):
    Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO
    Built under darwin
    Compiled at Jul 26 2006 16:31:11
    @INC: /usr/local/lib/perl5/5.8.8/darwin-2level /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl
        .

Ok in Mac OS X

melo on 2007-01-08T12:11:16

melo@63:~ $ uname -a
Darwin 63.63.103.87.rev.vodafone.pt 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386
melo@63:~ $ perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
    Platform:
        osname=darwin, osvers=8.0, archname=darwin-thread-multi-2level
        uname='darwin b01.apple.com 8.0 darwin kernel version 8.3.0: mon oct 3 20:04:04 pdt 2005; root:xnu-792.6.22.obj~2release_ppc power macintosh powerpc '
        config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=-Dman3ext=3pm -Duseithreads -Duseshrplib'
        hint=recommended, useposix=true, d_sigaction=define
        usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
        useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
        use64bitint=undef use64bitall=undef uselongdouble=undef
        usemymalloc=n, bincompat5005=undef
    Compiler:
        cc='cc', ccflags ='-g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include',
        optimize='-O3',
        cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include'
        ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5363)', gccosandvers=''
        intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
        d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
        ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
        alignbytes=8, prototype=define
    Linker and Libraries:
        ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/usr/local/lib'
        libpth=/usr/local/lib /usr/lib
        libs=-ldbm -ldl -lm -lc
        perllibs=-ldl -lm -lc
        libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
        gnulibc_version=''
    Dynamic Linking:
        dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
        cccdlflags=' ', lddlflags='-bundle -undefined dynamic_lookup -L/usr/local/lib'

Characteristics of this binary (from libperl):
    Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
    Locally applied patches:
                23953 - fix for File::Path::rmtree CAN-2004-0452 security issue
                33990 - fix for setuid perl security issues
                SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962
    Built under darwin
    Compiled at Oct 16 2006 22:54:34
    @INC: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1
        .

Thanks for new TODO feature / runtests feedback

markjugg on 2007-01-08T18:30:22

I'm really looking forward to the better TODO report! That's a reason to switch from using 'prove'.

However, here was my first impression of 'runtests'. The first thing I did was try "-h" and then "--help" to compare the options it supports with prove. In both cases I got this cryptic result:

Unknown option: h Cannot determine source for t at /usr/local/lib/perl5/site_perl/5.8.0/TAPx/Harness.pm line 608 t....

( There was also no newline at the end of this message ).

Support for "--help" would be really nice, and "-h" would also be good, since it is fairly universal for "--help". I realize that would break backwards compatibility with "--harness, but I bet the "help" usage will be used more frequently.

Mark

wish: line numbers for passing TODOs

markjugg on 2007-01-08T18:53:15

Sorry about the formatting of the previous post. The "Preview" had looked OK, but it got submitted as HTML when I meant plain text.

One more point of feedback: To complete the passing TODO enhancement, it would be really nice to have the line numbers for these tests, like we do with failing tests. With just the test number alone, tests can still be a little challenging to track down, since test scripts don't often contain test numbers.

Re:wish: line numbers for passing TODOs

Ovid on 2007-01-08T19:08:48

Thanks for your feedback. I'll be working on this. You'll have to talk to Schwern, the maintainer of Test::Simple, for the 'TODO line number' feature. I have no control over that since the TODO information is TAP and I merely parse the TAP.

I should have another release out soon.