ReqType req_type = ReqType::UNKNOWN_REQ;
bool repeat = false;
BackupType backup_type = BackupType::MOVE;
+ ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL)
+ std::cout << "Run recovery test with user request mode" << std::endl;
bpo::options_description options("Allowed options");
bpo::variables_map opt_map;
("no-backup", "Do test without backup")
("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
"backup type \'move\', \'copy and remove\'");
- bpo::store(bpo::parse_command_line(argc, argv, options), opt_map);
+ bpo::store(bpo::command_line_parser(argc, argv).
+ options(options).allow_unregistered().run(), opt_map);
if (opt_map.count("help")) {
std::cerr << options << std::endl;
return -1;
testing::InitGoogleTest(&argc, argv);
::env = static_cast<smoke_test::SmokeEnvironment*>(
testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(ci::RequestMode::GLOBAL,
+ new smoke_test::SmokeEnvironment(request_mode,
no_backup, backup_type)));
signal(SIGINT, ::signalHandler);
signal(SIGSEGV, ::signalHandler);