Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Incompatibility with Cudafy.Net
rold2007
#1 Posted : Tuesday, May 27, 2014 9:15:45 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/19/2012(UTC)
Posts: 2
Location: New Caledonia

Thanks: 1 times
Hi,

I just encountered an issue while adding new tests to a class containing some "Cudafy" code. Running the code with NCrunch caused compilation problems for Cudafy. After a while I realized that Cudafy was compiling code where NCrunch had already added some instrumentation calls. Obvisousy, Cudafy doesn't know anything about EnsureStackSpaceExists(), MarkTestLineStart() and ExitMethod()...

I tried to work around the issue by adding the usual code coverage suppression comments but there was still some NCrunch's calls in my Cudafied code. Is this normal ?

I was wondering if there was anything I could do to prevent one method from being instrumented. I read here that the best would probably be to move this method to a separate assembly and disable instrumentation on that assembly.

One thing I would appreciate though is if you could rename the instrumentation calls to something like NCrunchEnsureStackSpaceExist() or another relevant name. This would have helped me understand where these were from as my first search of "EnsureStackSpaceExists" on Google returned 0 result and it is only by searching MarkTestLineStart later on that I found one post on this forum.

Cheers,

David
Remco
#2 Posted : Tuesday, May 27, 2014 10:52:46 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi David,

You're correct in your understanding that the right way to solve this problem is to move the code into an assembly with the instrumentation turned off. Even with code coverage suppression comments, NCrunch will still place some limited instrumentation into each method.

I see no reason why the methods being called by the instrumentation cannot be named more specifically. I'll make a note to look into this. Thanks for the feedback.


Cheers,

Remco
1 user thanked Remco for this useful post.
rold2007 on 5/28/2014(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download