[tap-l] pgTAP

Eric Wilhelm scratchcomputing at gmail.com
Sat Jun 14 21:37:02 UTC 2008


# from David E. Wheeler
# on Saturday 14 June 2008 14:02:

>> However, there is no existing way to get harness switches passed
>> in based on the filename extension, and the factorisation of the
>> `generic_test` method and its helpers is such that you can’t
>> really use any of the bits in isolation.

As the guy responsible for the test_types thing, I'll say that I have 
since repented and decided that organizing extra tests (named with ".t" 
extensions) under xt/ is probably a better route in the long run.

This might still be true for the pgTAP case.  Perhaps a shebang or 
something allows them to be '.t' files?  The problem with changing file 
extensions and supporting it in only one tool is that various other 
tools don't work.

>Well, if I could start with some way to have one harness handle both  
>kinds of tests, I can probably break Module::Build to make it do my  
>bidding. Maybe someone would be willing to hack on this problem with  
>me at YAPC this week?

A good first step might be to discuss it on the module-build at perl.org 
list.  Some way to use features from the new harness without breaking 
compatibility would be interesting.  Perhaps that just takes the form 
of enabling the features if TAP::Harness is found.

Or the tap-x list, where shebangs have been discussed before.  There was 
once some form of config file which switched executables based on 
filenames, but I think that got scrapped.  Shebang plugins?  All the 
test has to do is emit TAP, right?

> ... but use psql under the hood, and has relevant options for it.

I suspect the complicated bits come in when you start trying to pass 
options to the executable/interpreter and adding DWIM bits.

--Eric
-- 
But you can never get 3n from n, ever, and if you think you can, please
email me the stock ticker of your company so I can short it.
--Joel Spolsky
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------


More information about the tap-l mailing list