On 12.08.18 20:17, Olaf Peter via Boost-users wrote:
Hi, how get an 'user' API for the boost.test like this:
testsuite_xyz -- --help
or even
testsuite_xyz -- --save-path=/foo
to get the user aspects. I know I can get the args by
int argc{ framework::master_test_suite().argc }; char** argv{ framework::master_test_suite().argv };
Further, at test/include/boost/test/utils/runtime/cla/parser.hpp are some utils used by boost.test self. Anyway, the problem rises to get the behaviour desribed above, simply using a global fixture with:
fixture::fixture() { int argc{ utf::framework::master_test_suite().argc }; char** argv{ utf::framework::master_test_suite().argv };
for (int i = 0; i != argc; ++i) { std::cerr << "test_observer_fixture: " << argv[i] << "\n"; } }
doesn't give the expected results - all the BOOST_AUTO_TEST_SUITE test cases are called even they depend on this arguments.
Thanks, Olaf
Also, for installing the global fixture, please use the new macro BOOST_TEST_GLOBAL_FIXTURE. Raffi