Closed psteinb closed 7 years ago
ok, we have to drop the utf auto-magic somehow to make this work, I found that if I provide:
$ ./gearshifft_x --help
I am not even landing in benchmark.cpp:48! this also holds for
$ ./gearshifft_x -- --help
what we'd rather should do is (disclaimer: pseudo-code!)
int main(argc,argv){
auto argv_with_gearshift_flags_removed = parse_gearshift_command_line_args(...);
//handle gearshift args if needed
parse_boost_utf_flags(argv_with_gearshift_flags_removed);
//handle boost_utf_flags if needed
configure_benchmark();
run_benchmark();
return 0;
}
Example 9 in the boost.utf documentation illustrates how to go through main and setup the test suite/fixture from there
@tdd11235813 : do you think that would work?
Example 9 would work. I wondered, that you run into wrong help message. Just for the record, you should see:
$ ./gearshifft_clfft -- -h
gearshifft extra command line parameters
Options:
-h [ --help ] Print help messages
<snip>
Test setup error: test tree is empty <- will be removed after refactoring gearshifft-boost interface
The test tree is generated manually, using Boost test suite and test case, e.g. see here and here.
The auto-magic you mentioned is the init_unit_test_suite
function, which is hooked up by Boost behind the stage (including program options parsing). So this probably caused the false "landing". Your proposed pseudo-code is what I want, too.
I tried only few solutions, which hide the Boost framework from the benchmark programmer/user, but other things were more important that time, thus the unpleasant stuff came back into benchmark.cpp waiting for refactoring.
--run_test=...
is not an ideal program option to power benchmarks on, --list_content
would be still ok.
You already mentioned to get rid off separate zones of command line flags and I second that, to only have gearshifft program options.
I would close this now as gearshifft reached the wanted level.
how to produce the non-boost-utf help message?
I'll dig deeper now.