MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / RunChildProcesses

Function RunChildProcesses

TestCoverageConsole/TestBasic.cpp:41–57  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

39
40 //-------------------------------------------------------------------------
41 void RunChildProcesses(int argc, _TCHAR* argv[])
42 {
43 auto outputBinaryPath = TestCoverageConsole::GetOutputBinaryPath();
44
45 if (argc < 2)
46 throw std::runtime_error("Invalid number of arguments.");
47 if (argv[1] != TestCoverageConsole::TestChildProcess)
48 throw std::runtime_error("Invalid argument.");
49
50 for (int i = 2; i < argc; ++i)
51 {
52 auto argument = Tools::ToLocalString(argv[i]);
53 std::cout << "Start: " << outputBinaryPath << " with " << argument << std::endl;
54 auto handle = Poco::Process::launch(outputBinaryPath.string(), std::vector<std::string>{argument});
55 handle.wait();
56 }
57 }
58
59 //-------------------------------------------------------------------------
60 void UnloadReloadDll()

Callers 1

_tmainFunction · 0.85

Calls 2

ToLocalStringFunction · 0.85
GetOutputBinaryPathFunction · 0.70

Tested by

no test coverage detected