MCPcopy Index your code
hub / github.com/apache/orc / runProgram

Function runProgram

tools/test/ToolTest.cc:46–59  ·  view source on GitHub ↗

* Run the given program and set the stdout and stderr parameters to * the output on each of the streams. The return code of the program is * returned as the result. */

Source from the content-addressed store, hash-verified

44 * returned as the result.
45 */
46int runProgram(const std::vector<std::string>& args, std::string& out, std::string& err) {
47 std::ostringstream command;
48 std::copy(args.begin(), args.end(), std::ostream_iterator<std::string>(command, " "));
49
50 testing::internal::CaptureStdout();
51 testing::internal::CaptureStderr();
52
53 int status = system(command.str().c_str());
54
55 out = testing::internal::GetCapturedStdout();
56 err = testing::internal::GetCapturedStderr();
57
58 return WEXITSTATUS(status);
59}
60
61#define ORC_TOOL_TEST_STRINGIFY(path) ORC_TOOL_TEST_STR(path)
62#define ORC_TOOL_TEST_STR(path) #path

Callers 6

TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
checkForErrorFunction · 0.85
TESTFunction · 0.85

Calls 1

endMethod · 0.65

Tested by

no test coverage detected