EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Support for Google Test in EPICS base / modules?
From: Ralph Lange via Core-talk <[email protected]>
To: EPICS Core Talk <[email protected]>
Date: Thu, 18 Apr 2019 13:35:18 +0200
On Wed, 17 Apr 2019 at 20:47, Konrad, Martin <[email protected]> wrote:
Hi Ralph,
> I found a single-header-file tap listener that makes Google Test
> (gtest) executables spit out TAP, so that Google Test can be used
> inside the EPICS build system in the same way as our own EPICS unit
> testing stuff, without changes to Make rules, perl wrappers etc. Use
> is through its own gtest_main.cc stub that replaces the original
> listener with the TAP listener before running tests. Both files are
> under the MIT license, so they could easily be included in Base.
>
> Opinions?
As you know we're using Google Test/Mock for a bunch of support modules
and we love it for it's readable Hamcrest-style matchers and the clear
error messages it emits. The fact that it has to be compiled along with
the project makes it a little harder to integrate into the build system,
though. IIRC Google Test also requires a C++11 compatible compiler.

For which components do you intend to use it and how do you picture
building/using it?

I am using gtest/gmock for a C++ Device Support module.

At this point I am using the Debian binary packages for gtest and a manual Windows install on my two main development platforms, but I also have a locally compiled version (on Debian) that I can switch to.

The main (and probably only) thing that the tap-listener achieves: I can call "make runtests" and the gtest parts work exactly the same as the epicsUnitTest parts, so that CI scripts, CI web display of test results etc. "just work", even for a mixture of epicsUnitTest and gtest.
I would include the two small files needed to do that into EPICS Base, so that any module that uses/compiles against EPICS Base could use any combination of epicsUnitTest and gtest. (It would eventually also allow C++ parts of EPICS Base (like the PVA modules) to use gtest, but that's another story not currently in my scope.)
For the time being, I would leave provision of gtest to the platform or CI job. Setting GTEST_HOME in CONFIG_SITE.local should be all an EPICS module needs to do. A CI job would build gtest (preferably cached) and provide the GTEST_HOME setting.

Cheers,
~Ralph


Replies:
Re: Support for Google Test in EPICS base / modules? Johnson, Andrew N. via Core-talk
References:
Re: Support for Google Test in EPICS base / modules? Konrad, Martin via Core-talk

Navigate by Date:
Prev: [Merge] ~anj/epics-base/+git/base-7.0:fix-1824277 into epics-base:7.0 Andrew Johnson via Core-talk
Next: Re: Support for Google Test in EPICS base / modules? Konrad, Martin via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Support for Google Test in EPICS base / modules? Konrad, Martin via Core-talk
Next: Re: Support for Google Test in EPICS base / modules? Johnson, Andrew N. via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 18 Apr 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·