[Test] log_level (was RE: [1.72][Test][Math][Fiber] Recent breaking change in Boost.Test breaks fiber/math tests)
I think it is very counter-intuitive that messages only emerge to the normal output if there is an error or --log_level="message"
And that
#define BOOST_TEST_LOG_LEVEL "message"
does not appear to have the same effect as --log_level="message"
which is also surprising, and in my book a buglet?
I suggest that this behaviour should be changed so that BOOST_TEST_MESSAGE *always* produces output.
BOOST_AUTO_TEST_CASE(test_message) { BOOST_TEST_MESSAGE("\nTest BOOST_TEST_MESSAGE.\n"); } // BOOST_AUTO_TEST_CASE(test_message)
Otherwise I am sure I will not be the only person confused.
At the very least the documentation should highlight that ones expectation may not match what actually happens.
Hi, I think it would be a bad idea to change the default value of --log_level (in your suggestion, from "error" to "message"). The default has been "error" for a long time (I don't like to count how long, because it makes me feel old!). And I'm sure that a lot of parsing tools have been built around the world assuming Boost.Test output is of a certain form. I know I've had to 'teach' various CI systems Boost.Test-speak over the years.
#define BOOST_TEST_LOG_LEVEL "message"
BOOST_TEST_LOG_LEVEL is supported as an environment variable, not as a macro. Supporting it as a macro would be a bad idea for similar reasons as above - the layout and volume of the output should be for the *user* to control not the author of the tests, or otherwise the user can't rely on what the test output is going to look like from one library to the next. If you, personally, always want the log_level to be 'message', then you should set the environment variable BOOST_TEST_LOG_LEVEL permanently on your system. Hope that helps, Pete
participants (1)
-
Peter Bartlett