* 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
25 lines
568 B
C++
25 lines
568 B
C++
#include "ConfigCheck.h"
|
|
#include "lib/config/ConfigCheck.h"
|
|
|
|
namespace bts::cmds {
|
|
|
|
struct ConfigCheck::Args {
|
|
std::vector<std::string> args;
|
|
};
|
|
|
|
ConfigCheck::ConfigCheck()
|
|
: CLI::App("Print current configuration", "config-check"),
|
|
_args(new ConfigCheck::Args()) {
|
|
add_option("args", _args->args);
|
|
callback([&] {
|
|
std::vector<const char *> ch_args;
|
|
for (auto const &s : _args->args)
|
|
ch_args.push_back(s.c_str());
|
|
configcheck(ch_args.size(), &ch_args[0]);
|
|
});
|
|
}
|
|
|
|
ConfigCheck::~ConfigCheck() {}
|
|
|
|
} // namespace bts::cmds
|