automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TAP support documentation


From: Stefano Lattarini
Subject: Re: TAP support documentation
Date: Thu, 15 Nov 2012 09:58:52 +0100

On 11/14/2012 07:17 PM, Alexis Praga wrote:
> Hi,
> 
> [SNIP the part that Bob has already replied to]
> 
> Also, I would still like to have this feature. Hereis is how I rapidly
> implemented it in the top Makefile.am :
> 
> TAP_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
>                   $(top_srcdir)/build-aux/tap-driver.sh
> TESTS = foo.test
> 
> check:
>         @for i in $(TESTS); do \
>           $(TAP_LOG_DRIVER) --test-name "$$i" \
>              --log-file $$i.log --trs-file $$i.trs -- $$i;\
>         done
> 
> 
> Do you think this hack can be used without too much surprise?
>
No, it won't work properly, because the old (pre-1.12) Automake testsuite
harness won't be able to "see" and report the results saved in the *.trs
files.  You might correctly see some "FAIL" displayed by the tap-driver.sh
script, but the final exit status of "make check" will still be zero,
regardless of such errors.

> Otherwise, what do you recommand (upgrading is not an option) ?
>
If you really want to use TAP in you tests, you should use some other TAP
harness, like the 'prove' utility (warning: will require perl); for example,
assuming your tests are implemented as shell scripts, something like:

   check-local:
        prove --merge -e $(SHELL) $(TESTS)

(The above is untested, and it probably wont work in a VPATH setup;
you'll have to tweak and adjust it a bit).

HTH,
  Stefano



reply via email to

[Prev in Thread] Current Thread [Next in Thread]