
"Paul Giaccone" <paulg@cinesite.co.uk> wrote in message news:4433AB1C.3080209@cinesite.co.uk...
Boost unit test framework seems to have a race condition in its output.
When I run my test program from a shell, I get this output:
paulg@klingon 120% ./CubicTest Running 8 test cases...
*** No errors detected paulg@klingon 121% ./CubicTest>/dev/null
*** No errors detected
Note that the second call above, redirecting output to /dev/null, suggests to me that "Running 8 test cases..." goes to standard out and "*** No errors detected" goes to standard error.
Because standard error is unbuffered, this can mean that the messages are output in the reverse order. This is the case when I run my program from Eclipse (under Linux), and, in general, will happen if the tests run faster than the time it takes for the buffer to flush to the output.
Ok. I've added flush statement at the end of testing for log stream. This with happened before report is started. Gennadiy