Opened 13 years ago
Closed 13 years ago
#3121 closed Bugs (worksforme)
--log_format=XML invalid XML file
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | To Be Determined | Component: | test |
Version: | Boost 1.38.0 | Severity: | Problem |
Keywords: | Cc: | astukalov@… |
Description
After several tries I have figured out how to create an XML output from an unit test. I have redirected (_unit_test --log_level=test_suite --log_format=XML >> log.xml) the output to a file, so I can automatically parse the file for errors.
But I was not able to open the created XML file. After a few analizes I have figured out why the XML file was corrupt. The "dumping objects" output is just added without XML Tags.
Either the "dumping objects" output should be parametrizeable (on/off) or written in XML format too.
The other thing is that the test summary is not inside the XML file: * 1 failure detected in test suite "Master Test Suite". This should also be written inside XML Tags, to have the possibility to have an overview either the test succeeded or not.
The last point is that I have always the "Master Test Suite" appears somewhere and I don´t know why. Also when there are errors inside the test this is shown with Master suite as written above.
Change History (5)
comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
--output_format=XML seems to be the thing I want to have
The other side is that --detect_memory_leak=0 doesn´t have an effect on my test. I also tried to set the environment variable BOOST_TEST_DETECT_MEMORY_LEAK = 0, but this also has no effect. I have always a summary at the end of my test which can´t be disabled!
</TestResult> Detected memory leaks! Dumping objects -> {5803} normal block at 0x01BBE138, 30 bytes long.
Is there a way to write the output to a file with a parameter or environment variable?
comment:3 by , 13 years ago
detect_memory_leaks works for me fine there is no parameter to redirect leaks output into a file at the moment --output_format=XML you have, anything else?
comment:4 by , 13 years ago
Cc: | added |
---|
--detect_memory_leak=0
have no effect for me too (MSVC2008, debug)
+1 for being able to specify log/report output file, otherwise there is no guarantee, that the resulting file would be XML.
comment:5 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
--detect_memory_leak=0 or --detect_memory_leaks=0 should do the trick. Former works in recent versions of Boost. Later worked always.
As for the log and report sink - i'll consider this.
Please let me know if you still having any issues.