Merged
This commit is contained in:
commit
2cffcb4e25
122 files changed
+2331
-1922
No files matched your search
+23
-33
@@ -1,48 +1,38 @@
|
||||
#include "lib/testing/catch_test_runner.h"
|
||||
#include "lib/utils/init_spark_lib.h"
|
||||
#include "lib/utils/thread_manager.h"
|
||||
#include "server/sparkd/cmds/CmdRegistry.h"
|
||||
#include <CLI11/CLI11.hpp>
|
||||
|
||||
// to add a command add the header here and the the REGISTER call below
|
||||
// don't touch this file except to add commands.
|
||||
#include "server/sparkd/cmds/AdminReport.h"
|
||||
#include "server/sparkd/cmds/AutoCert.h"
|
||||
#include "server/sparkd/cmds/Benchmark.h"
|
||||
#include "server/sparkd/cmds/ConfigCheck.h"
|
||||
#include "server/sparkd/cmds/FIXSim.h"
|
||||
#include "server/sparkd/cmds/Help.h"
|
||||
#include "server/sparkd/cmds/KeyCode.h"
|
||||
#include "server/sparkd/cmds/Md.h"
|
||||
#include "server/sparkd/cmds/ParseHistoricalFIX.h"
|
||||
#include "server/sparkd/cmds/PrintHedgeOrders.h"
|
||||
#include "server/sparkd/cmds/QuickTest.h"
|
||||
#include "server/sparkd/cmds/Run.h"
|
||||
#include "server/sparkd/cmds/Span.h"
|
||||
#include "server/sparkd/cmds/Spartan.h"
|
||||
#include "server/sparkd/cmds/Test.h"
|
||||
#include "server/sparkd/cmds/Web.h"
|
||||
|
||||
using namespace bts;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
utils::init_spark_lib();
|
||||
BEGIN_CMD;
|
||||
REGISTER(Test);
|
||||
REGISTER(Help);
|
||||
REGISTER(Run);
|
||||
REGISTER(Md);
|
||||
REGISTER(ConfigCheck);
|
||||
REGISTER(KeyCode);
|
||||
REGISTER(Benchmark);
|
||||
REGISTER(QuickTest);
|
||||
REGISTER(AutoCert);
|
||||
REGISTER(FIXSim);
|
||||
REGISTER(Span);
|
||||
REGISTER(Web);
|
||||
REGISTER(ParseHistoricalFIX);
|
||||
REGISTER(PrintHedgeOrders);
|
||||
REGISTER(AdminReport);
|
||||
REGISTER(Spartan);
|
||||
END_CMD;
|
||||
utils::finit_spark_lib();
|
||||
return 0;
|
||||
utils::SparkLibInit init;
|
||||
|
||||
// The catch testing framework has its own command line parser so
|
||||
// if we are testing we just forward the entire command to catch
|
||||
if (argc > 1 && std::string(argv[1]) == "test")
|
||||
return run_tests(argc, argv);
|
||||
else {
|
||||
CLI::App app("Futures trading system", "sparkd");
|
||||
app.require_subcommand();
|
||||
app.add_subcommand(CLI::App_p(new cmds::AdminReport()));
|
||||
app.add_subcommand(CLI::App_p(new cmds::Benchmark()));
|
||||
app.add_subcommand(CLI::App_p(new cmds::ConfigCheck()));
|
||||
app.add_subcommand(CLI::App_p(new cmds::Md()));
|
||||
app.add_subcommand(CLI::App_p(new cmds::QuickTest()));
|
||||
app.add_subcommand(CLI::App_p(new cmds::Run()));
|
||||
app.add_subcommand(CLI::App_p(new cmds::Spartan()));
|
||||
app.add_subcommand(CLI::App_p(new cmds::Web()));
|
||||
app.add_subcommand(
|
||||
"test", "Run unit test(s)"); // so this shows up in help
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user