MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / runCmd

Function runCmd

scripts/llvm-coverage.py:16–24  ·  view source on GitHub ↗
(cmd, data=None)

Source from the content-addressed store, hash-verified

14#------------------------------------------------------------------------------
15
16def runCmd(cmd, data=None):
17 if input is None:
18 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
19 stdout, stderr = p.communicate()
20 else:
21 p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
22 stdout, stderr = p.communicate(input=data)
23
24 return stdout.decode('utf-8'), stderr.decode('utf-8'), p.returncode
25#------------------------------------------------------------------------------
26
27def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected