fix: CLI11 integration

* Run 'sparkd tests' outside of the CLI::App framework
  (delegate to 'catch', which has a solid cli).  This
  fixes a bug which prevented callers from specifying
  test tags (in the form of '[<tag>]'), as the CLI::App's
  parse method removes square brackets from cli options.

* Bind cli options to instance members of their subcommand's
  CLI::App derived class.  This seems to fix a bug which caused
  the [static instance] binding source to be destructed twice.

 * Add help text for several subcommands
This commit is contained in:
John Colvin committed 2021-01-16 00:01:15 -06:00
1 parent 45de55a552
commit ca4e477f56
61 files changed
+841 -742

No files matched your search

+5 -4
View File
@@ -85,10 +85,11 @@ void md_report() {
}
}
void AdminReport::register_cmd(CLI::App &app) {
auto *cmd = app.add_subcommand(
"admin-report", "Write a market data entitlement report csv to stdout");
cmd->add_subcommand("md")->callback(md_report);
AdminReport::AdminReport()
: CLI::App(
"Write a market data entitlement report csv to stdout",
"admin-report") {
add_subcommand("md")->callback(md_report);
}
} // namespace bts::cmds