[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chef_wrap run issue, VS2010

Hi Daniel

You don't need wrapping for what you are trying to do. You code fails because of a runtime error. You seem to have some pointer usage problems.

Think of a test harness (like cmocka) as a alternative way to exercise your code.

James Grenning - Author of TDD for Embedded C - wingman-sw.com/tddec
[![wingman software](http://www.wingman-sw.com/images/wingman.png)](http://wingman-sw.com)
On 24 Feb 2016, at 12:26, Daniel Miller wrote:

So will cmocka even *do* anything, if the wrapper functionality isn't
available??  When I was trying to get the chef project to work with VS
yesterday, it looked to me as though I was going to have to
re-write chef_cook() itself in order to get the testing functionality, but
that sort of defeats the purpose of using cmocka at all...

I'll admit that I'm stumbling a bit in understanding how the whole example
actually works...

On Wed, Feb 24, 2016 at 10:22 AM, Lukas Slebodnik <lslebodn@xxxxxxxxxx>

On (24/02/16 10:06), Daniel Miller wrote:
Hi Andreas;
Yes, I finally figured that out once I studied cmocka further; I didn't understand what --wrap was doing at first. It appears that VS doesn't support that operation, at least the way that your CMake build script
to do it (with '/Wl,--wrap=chef_cook', which simply doesn't exist).

I tried building with MinGW (A Gnu port to Windows), and this all works
fine, and furthermore, I understand it!  I'll have to see if the
engineering team is interested in dealing with yet another toolchain...

I would suggest that you simply remove the CMake scripts, which are
building a .sln project for Visual Studio; since the entire concept cannot
work, it is sort of mis-leading...
Or just test should be skipped if building with "Visual Studio".
Because other features should.


Re: chef_wrap run issue, VS2010Daniel Miller <dmiller@xxxxxxxxxxxxxxxx>
chef_wrap run issue, VS2010Daniel Miller <dmiller@xxxxxxxxxxxxxxxx>
Re: chef_wrap run issue, VS2010Andreas Schneider <asn@xxxxxxxxxxxxxx>
Re: chef_wrap run issue, VS2010Daniel Miller <dmiller@xxxxxxxxxxxxxxxx>
Re: chef_wrap run issue, VS2010Lukas Slebodnik <lslebodn@xxxxxxxxxx>
Re: chef_wrap run issue, VS2010Daniel Miller <dmiller@xxxxxxxxxxxxxxxx>