cpputest

Valgrind and QEMU - Unable to detect memory leak

早过忘川 提交于 2020-02-02 16:01:22
问题 I want to test my C++ code for memory leaks with Valgrind (memcheck) x86. But the software gets cross-compiled and is running on ARM. In order to do some automated testing I decided to emulate my ARM hardware via QEMU. And I also decided to use the cpputest unit test ARM binaries to ensure a deterministic behaviour and search for memory leaks within the scope the unit test covers. All in all, I have an ARM binary which should be emulated via QEMU user mode. My call looks like that: ./valgrind

Compiling cpputest with mingw-w64

为君一笑 提交于 2020-01-16 02:26:31
问题 I'm trying to compile cpputest with mingw-w64 but can't make it work and I can't find any resources on how to do that. So hopefully this question will help others in the future. I would like to compile cpputest using mingw-w64, preferably without installing MSYS2 or other packages. I have mingw-w64 i686-8.1.0-posix-dwarf-rt_v6-rev0 installed. I've cloned cpputest from here. I tried following Compiling Google test with Mingw-w64 and Compiling and using CppUTest 3.8 under MSYS2/MinGW32 by

CPPUTEST: How to ignore only one mocked call placed between other ones

孤街浪徒 提交于 2019-12-12 04:14:01
问题 I would like to ignore one call placed between other ones that I want to call under the same case test. If I use ignoreothercalls I have not clear if the rest of the calls, following this, will be called. I need the rest, after ignored call, will be called. Or at least, to find the way of stopping ignoreothercalls effect before the end of the test case. TEST(group, test1){ ... mock().expectOneCall("HAL_AS393x_CommandStrobes").withParameter("cCommandCode",AS393X_CMD_CALIB_RCO_LC); /*----------