MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / ExecuteCommand

Function ExecuteCommand

tools/fuzz/fuzz.cpp:46–54  ·  view source on GitHub ↗

Execute a command using the shell. Returns true if and only if the command's exit status was 0.

Source from the content-addressed store, hash-verified

44// Execute a command using the shell.
45// Returns true if and only if the command's exit status was 0.
46bool ExecuteCommand(const std::string& command) {
47 errno = 0;
48 int status = std::system(command.c_str());
49 assert(errno == 0 && "failed to execute command");
50 // The result returned by 'system' is implementation-defined, but is
51 // usually the case that the returned value is 0 when the command's exit
52 // code was 0. We are assuming that here, and that's all we depend on.
53 return status == 0;
54}
55
56// Status and actions to perform after parsing command-line arguments.
57enum class FuzzActions {

Callers 1

ShrinkFunction · 0.70

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected