MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / execute

Method execute

Test/testlib/encoder.py:101–119  ·  view source on GitHub ↗

Run a subprocess with the specified command. Args: command: The command line arguments to use. Return: The output log (stdout) split into lines.

(self, command: list[str])

Source from the content-addressed store, hash-verified

99 assert False, 'Missing subclass implementation'
100
101 def execute(self, command: list[str]) -> list[str]:
102 '''
103 Run a subprocess with the specified command.
104
105 Args:
106 command: The command line arguments to use.
107
108 Return:
109 The output log (stdout) split into lines.
110 '''
111 try:
112 result = sp.run(command, stdout=sp.PIPE, stderr=sp.PIPE,
113 check=True, text=True)
114
115 except (OSError, sp.CalledProcessError):
116 print(f' + {" ".join(command)}')
117 assert False, 'ERROR: Test run failed'
118
119 return result.stdout.splitlines()
120
121 def parse_output(self, image: TestImage, output: list[str]) -> RunResult:
122 '''

Callers 1

run_testMethod · 0.95

Calls 1

printFunction · 0.50

Tested by

no test coverage detected