Sign in to follow this  
Staffan E

[VC++] Post-Build Event output is cut off halfway

Recommended Posts

Staffan E    536
Hey people. I recently made the migration of my development environment from XP to Win7 and now I've run into an unexpected problem. I build my C++ project through Visual C++ 2008 Express and I use a post-build event to run automated tests on the whole code base. On XP this works fine, but on Win7 the output from the test app is cut off at a certain point, in mid-sentence really. My setup is this: I have my main project Citizen built into a static library which is linked to a launcher project CitiLaunch and to a testing project CitiTest. CitiLaunch just pushes the "run button" while CitiTest uses the FCTX library to run a number of test suites on the code. Then when CitiTest is finished building a post-build event kicks in and runs the test exe. If a test fails it aborts and does not build CitiLaunch. A pretty standard setup I guess. The testing app seems to run and return the right codes but its output is cut a fixed point. There does not seem to be anything specific in the testing code causing this because if I rearrange the tests the output stops after roughly the same number of lines, but at another test. Moreover this is only a problem when I run it through the VS output window. I have tried using a build event and by setting the test app up as an external tool (from the menu). If I run it from the OS command prompt it shows no sign of halting. Also if I check out the code on an XP machine and build it the tests are reported correctly from inside VS. I'm currently at a loss here. Does anyone know if there is a limitation on the output length of a tool from VS (on Win7), or if it may be redirecting stdout at some point from the output window? I mean apparently it works correctly under the hood but if I can't read the testing report from within VS it pretty much defeats the purpose of automated testing. Thanks in advance for any insight or ideas.

Share this post


Link to post
Share on other sites
Staffan E    536
Today I tried to dump a large text file in the console by a command script and running it as a VS tool to direct output to the output window. Although the text was a lot longer than my testing output, it was all printed out.

So I guess this rules out the idea that output was truncated to a size. Maybe the FCTX library does something to mess with the output target. But why then did it work on XP?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this