On Dec 31, 2013, at 10:11 AM, Leif Hedstrom <zw...@apache.org> wrote:

> 
> On Dec 31, 2013, at 9:44 AM, Alan D. Cabrera <l...@toolazydogs.com> wrote:
> 
>> I'm looking for an example of an ATS plugin that has extensive unit tests.
>> 
>> I'm having problems linking my Boost unit tests against the plugin library 
>> for obvious reasons, it's a module not a shared library.
>> 
>> I tried setting up an internal static library that the tests would link 
>> against but can't seem to get the object files directly included into the 
>> ATS plugin.
> 
> 
> 
> I *think* Yahoo have (or had) a stub library to help with this. Basically, 
> provide the necessary TS APIs for a plugin to at least run some basic unit 
> tests. It’s a wee bit tricky though, particularly if the plugin expects to 
> operate on real data (like request / response headers).
> 
> Bryan: Do you remember anything about this stub library ? Is it something 
> Yahoo kept maintaining ?
> 
> Other than that, this seems like it’d be a useful harness for someone to 
> provide :-).

A harness and mock APIs would be awesome but I think that I am struggling with 
something more fundamental, more specifically, how to structure my Autotools 
based Makefile.ac so that my Boost based unit tests can call into the same code 
that is in my plugin module.  I tried using a static library which would hold 
the code that is used by the ATS plugin module and tested by the unit tests but 
it seems that the object files in the static library are not included in the 
ATS plugin module, regardless of what Autotools incantations I put into my 
Makefile.ac.

I was wondering how other people structure their Makefile.ac to allow this to 
work.


Regards,
Alan

Reply via email to