On Jan 3, 2014, at 8:48 AM, Alan D. Cabrera <l...@toolazydogs.com> wrote:
> > On Jan 2, 2014, at 9:04 AM, James Peach <jpe...@apache.org> wrote: > >> On Dec 31, 2013, at 2:44 PM, Alan D. Cabrera <l...@toolazydogs.com> wrote: >> >>> >>> On Dec 31, 2013, at 1:53 PM, James Peach <jpe...@apache.org> wrote: >>> >>>> On Dec 31, 2013, at 8:44 AM, Alan D. Cabrera <l...@toolazydogs.com> wrote: >>>> >>>>> I'm looking for an example of an ATS plugin that has extensive unit tests. >>>> >>>> There are none. >>>> >>>>> 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. >>>> >>>> There's no reason, in principle, that this would not work. For many >>>> plugins it would be reasonable to separate core functions from the Traffic >>>> Server bindings, and use a TDD approach for developing the core. >>> >>> Yes, but Autotools is getting in the way. I can't seem to get those core >>> functions, which are in the static library that's shared by the plugin and >>> tests, into the ATS plugin module. This is the Autotools "example" that >>> I'm looking for. >> >> You should be able to build the core as an autotools convenience library, >> then link that into the test harness and the plugin. > > Yes, I agree but getting that autotools convenience library to be included in > the plugin module is what is causing problems for me. I reference the > convenience library in my plugin module but the object files do not get > included within. I could make it into a shared library but that would make > things messier, imo. I just remembered that the ESI plugin does this .... https://github.com/apache/trafficserver/blob/master/plugins/experimental/esi/Makefile.am J