Home | History | Annotate | Download | only in tools

Lines Matching refs:cmdLine

87 void registerOptions (de::cmdline::Parser& parser)
89 using de::cmdline::Option;
90 using de::cmdline::NamedValue;
110 << Option<CmdLineArgs> (DE_NULL, "cmdline", "Additional command line arguments for the test binary.", "");
142 bool parseCommandLine (CommandLine& cmdLine, int argc, const char* const* argv)
144 de::cmdline::Parser parser;
145 de::cmdline::CommandLine opts;
177 cmdLine.runMode = RUNMODE_START_SERVER;
178 cmdLine.serverBinOrAddress = opts.getOption<opt::StartServer>();
182 cmdLine.runMode = RUNMODE_CONNECT;
183 cmdLine.serverBinOrAddress = opts.getOption<opt::Host>();
188 cmdLine.inFile = opts.getOption<opt::ContinueFile>();
190 if (cmdLine.inFile.empty())
197 cmdLine.port = opts.getOption<opt::Port>();
198 cmdLine.caseListDir = opts.getOption<opt::CaseListDir>();
199 cmdLine.testset = opts.getOption<opt::TestSet>();
200 cmdLine.exclude = opts.getOption<opt::ExcludeSet>();
201 cmdLine.outFile = opts.getOption<opt::TestLogFile>();
202 cmdLine.infoFile = opts.getOption<opt::InfoLogFile>();
203 cmdLine.summary = opts.getOption<opt::Summary>();
204 cmdLine.targetCfg.binaryName = opts.getOption<opt::BinaryName>();
205 cmdLine.targetCfg.workingDir = opts.getOption<opt::WorkingDir>();
206 cmdLine.targetCfg.cmdLineArgs = opts.getOption<opt::CmdLineArgs>();
459 xe::CommLink* createCommLink (const CommandLine& cmdLine)
461 if (cmdLine.runMode == RUNMODE_START_SERVER)
466 link->start(cmdLine.serverBinOrAddress.c_str(), DE_NULL, cmdLine.port);
475 else if (cmdLine.runMode == RUNMODE_CONNECT)
481 address.setHost(cmdLine.serverBinOrAddress.c_str());
482 address.setPort(cmdLine.port);
495 throw xe::Error("Failed to connect to ExecServer at: " + cmdLine.serverBinOrAddress + ":" + de::toString(cmdLine.port) + ", " + error.what());
578 void runExecutor (const CommandLine& cmdLine)
583 readCaseLists(root, cmdLine.caseListDir.c_str());
589 for (vector<string>::const_iterator filterIter = cmdLine.testset.begin(); filterIter != cmdLine.testset.end(); ++filterIter)
596 for (vector<string>::const_iterator filterIter = cmdLine.exclude.begin(); filterIter != cmdLine.exclude.end(); ++filterIter)
604 if (!cmdLine.inFile.empty())
605 readLogFile(&batchResult, cmdLine.inFile.c_str());
608 de::UniquePtr<xe::CommLink> commLink(createCommLink(cmdLine));
610 xe::BatchExecutor executor(cmdLine.targetCfg, commLink.get(), &root, testSet, &batchResult, &infoLog);
622 if (!cmdLine.outFile.empty())
624 xe::writeBatchResultToFile(batchResult, cmdLine.outFile.c_str());
625 cmdLine.outFile.c_str());
628 if (!cmdLine.infoFile.empty())
630 writeInfoLog(infoLog, cmdLine.infoFile.c_str());
631 printf("Info log written to %s\n", cmdLine.infoFile.c_str());
634 if (cmdLine.summary)
640 if (!cmdLine.outFile.empty())
642 xe::writeBatchResultToFile(batchResult, cmdLine.outFile.c_str());
643 printf("Test log written to %s\n", cmdLine.outFile.c_str());
646 if (!cmdLine.infoFile.empty())
648 writeInfoLog(infoLog, cmdLine.infoFile.c_str());
649 printf("Info log written to %s\n", cmdLine.infoFile.c_str());
652 if (cmdLine.summary)
667 CommandLine cmdLine;
669 if (!parseCommandLine(cmdLine, argc, argv))
674 runExecutor(cmdLine);