docker_test / src /eval_fs.py
朱东升
.
30b1610
raw
history blame
412 Bytes
from pathlib import Path
from safe_subprocess import run
def eval_script(path: Path):
r = run(["dotnet", "fsi", "-d:DEBUG", str(path)])
if r.timeout:
status = "Timeout"
elif r.exit_code == 0:
status = "OK"
else:
status = "Exception"
return {
"status" : status,
"exit_code": r.exit_code,
"stdout": r.stdout,
"stderr": r.stderr,
}