|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-07-24 05:52:15
>-----Original Message-----
>From: boost-bounces_at_[hidden]
>[mailto:boost-bounces_at_[hidden]] On Behalf Of Thorsten Ottosen
>Sent: 23 July 2007 17:07
>To: boost_at_[hidden]
>Cc: boost-test_at_[hidden]
>Subject: Re: [boost] Problem with the web page for Boost unit
>test library
>I was browsing through your excellent docs here:
>http://boost.org/libs/test/doc/usage/msvc_net.html
>
>I stumbled upon a irritating problem: I could not re-run the test
>without changing a source file.
>
>I think I found a solution: I set the custom build step instead of the
>the post-build event. Here I set "outputs" to c:\dummy_file.txt
>(anything non-empty will do).
>
>Thus when I hiut F5, I get the errors in the output window in visual
>studio :-)
Brilliant! This has been bugging me for some time :-)
I've refined it a bit by using in Custom build
Command line: "$(TargetDir)$(TargetName).exe" (and more perhaps)
Description: Autorun "$(TargetDir)$(TargetName).exe"
This makes the source filename appear too - a useful feature when you get confused about various versions in different directories.
Output: c:\dummy_file_used_by_autorun.txt
The dummy_file seems to be deleted after each run so a longer and more unique name might be wiser.
How does one write output to it?
On rebuild, the output window shows, for example:
Compiling...
test_cauchy_mean.cpp
Linking...
Generating code
Finished generating code
Embedding manifest...
Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\release\test_cauchy_mean.exe"
Running 1 test case...
1.#QNAN
errno = 33
errno is EDOM
*** No errors detected
Build Time 0:08
Alt B U does a re-build.
Ctrl F5 re-runs and also shows output in the cmd.exe window.
F5 is not so useful - debugs - but you may want this (but there are never any bugs in programs of course ;-).
Question: How could on get the date and time (clock or file saved) into this output (without changing the source program)?
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk