(cmd)
| 326 | |
| 327 | # Quiet mode means: only print in case of error. |
| 328 | def _call_quiet(cmd): |
| 329 | p = subprocess.run(cmd, shell=True, capture_output=True) |
| 330 | stderr = p.stderr.decode('utf-8') |
| 331 | if stderr: |
| 332 | # Siso prints errors to stdout, so report that as well. |
| 333 | sys.stderr.write(p.stdout.decode('utf-8')) |
| 334 | sys.stderr.write(stderr) |
| 335 | # By not including stdout in the returned output, we implicitly skip the |
| 336 | # interactive "re-run mksnapshot in GDB" feature, which is just fitting |
| 337 | # for quiet mode. |
| 338 | return p.returncode, stderr |
| 339 | |
| 340 | |
| 341 | def _call_with_output(cmd): |
no test coverage detected