Jump to content
  • Advertisement
Sign in to follow this  
Clash

STDOUT as Build Tasks (VC.NET)

This topic is 4855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm setting up the build enviroment for my next project. Like a good citizen, I intend to do lots of automated unit testing. My question is, how can I redirect the output of the application so that it is interpeted by Visual Studio and placed in the "Build Tasks" window? I want my automated test output to be integrated with the IDE if possible. I have so far been able to "re-run" my application as a post-build step and it will capture the STDOUT in the Output window. In the Build Tasks it just says "a post-build tool returned an error". Has anyone got anything lke this to work before? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Well, as luck may have I figured out part of the solution. Apparently if a tool run by the pre or post build\link steps produces output that is exactly in the format VC expects, it will parse it. So, I got my test failures to show up in the build tasks list.

However, I would rather not have to run the app twice! It runs once because I "build and run" it, and it runs a second time as the post-build step (where the output is captured from).

If anyone has gotten the built applications STDOUT into VC.NET's output window, speak up!

:)

Share this post


Link to post
Share on other sites
I've come up with a solution that is Good Enough. For those of you who may have been interested...

I changed my unit-test app so that it simply returns from main if the first command-line argument to the app is "quiet". So visual studio passes that, so it does nothing. Then the post-build event runs and the app runs, outputting the results.

The only shortcoming to this is that if you run it again from VS without changing anything, it won't run the post-build tool.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!