Files
felhom.eu/documentation/audits/night-2026-10-28/bench/tools/bx.py
T

9 lines
603 B
Python

#!/usr/bin/env python3
"""bx.py <script-file> [timeout] — run a bash script inside the bench (LXC 9401 on demo-hp) via retest-floating's bench()."""
import importlib.util, os, sys
H = "/mnt/5_hdd/felhom.eu/git/app-catalog-felhom.eu/scripts"
spec = importlib.util.spec_from_file_location("rf", os.path.join(H, "retest-floating.py"))
rf = importlib.util.module_from_spec(spec); sys.path.insert(0, H); spec.loader.exec_module(rf)
r = rf.bench(open(sys.argv[1]).read(), timeout=int(sys.argv[2]) if len(sys.argv) > 2 else 600)
sys.stdout.write(r.stdout); sys.stderr.write(r.stderr); sys.exit(r.returncode)