|
import subprocess
|
|
|
|
async def run(check):
|
|
result = subprocess.run(
|
|
check["command"],
|
|
shell=True,
|
|
stdout=subprocess.PIPE,
|
|
stderr=subprocess.PIPE
|
|
)
|
|
ok = result.returncode == 0
|
|
return {
|
|
"status": "PASS" if ok else "FAIL",
|
|
"stdout": result.stdout.decode()
|
|
}
|