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

Function RunProcess

TestHelper/Tools.cpp:60–75  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

58
59 //-------------------------------------------------------------------------
60 std::string RunProcess(const fs::path& program,
61 const std::vector<std::string>& args)
62 {
63 Poco::Pipe outPipe;
64 auto handle = Poco::Process::launch(
65 program.string(), args, nullptr, &outPipe, nullptr);
66 Poco::PipeInputStream istr(outPipe);
67 std::string content{std::istreambuf_iterator<char>(istr),
68 std::istreambuf_iterator<char>()};
69
70 int exitCode = handle.wait();
71 if (exitCode)
72 throw std::runtime_error("Error when running: " + program.string() +
73 " " + content);
74 return content;
75 }
76
77 //------------------------------------------------------------------------ -
78 fs::path GetVisualStudioPath()

Callers 3

ExtractRelocationsFunction · 0.85
ExtractBaseAddressFunction · 0.85
GetVisualStudioPathFunction · 0.85

Calls

no outgoing calls

Tested by 2

ExtractRelocationsFunction · 0.68
ExtractBaseAddressFunction · 0.68