Replies: 1 comment
-
Looking at getting-started; it shows that you really do need to build this from the package source code. Main reason is: you'll want MakefileWorker.mk to be included from your project's Makefile. The best way for me to start up a new project is to follow James Grenning's step-by step instructions at TDD Howto: Get your Legacy C into a Test Harness. Central to that winning recipe is starting with the Cpputest starter project. Once you have the source package, you can read through the main package-generating files, configure.ac and Makefile.am. When used in the normal way with Autotools, output files are generated, including config.h. Here, you can find #define statements for PACKAGE_VERSION and VERSION. Include that $(CPPUTEST_HOME)/config.h and the rest is easy. However, I can't say how that works when building with Cmake. Sorry it took a year for anyone to respond to you. best regards, Keith |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone
I've used CppUTest for a couple of years now. I'm mostly very pleased with it. It's been useful for regression testing, and finding memory leaks (although I do use Valgrind as well).
I've just been documenting the process I went through installing my build environment, etc. I am running Linux. I have not built CppUTest from the repo, but instead have installed the versions available with
apt
. Although I could do the former, I am putting together some "howto" instructions for my colleagues who aren't very familiar with some of the build processes.Unfortunately, the versions installed using
apt
are different for the two flavours of Linux I am using. In both cases I believe I am using the latest versions available withapt
.On Linux Mint:
On Ubuntu:
As you can see, the versions on the two versions of Linux are different. This matters because, for one set of tests, I switch off the memory leak checker, in the
teardown()
function:As indicated in the code comments, the version running on Linux Mint needs to use the function
MemoryLeakWarningPlugin::turnOnNewDeleteOverloads()
, and the (newer) version on Ubuntu needs to useMemoryLeakWarningPlugin::turnOnDefaultNotThreadSafeNewDeleteOverloads()
.Rather than requiring the user to change the code as required, it would be nice if I could use a
#ifdef
directive to select the correct function based on the version of CppUTest running. Ideally the version in which this code change was made.is it possible to do this? if so, where is the version number stored?
Thank you
Matthew
Beta Was this translation helpful? Give feedback.
All reactions