hil: soak validates capture size, retains verdict stderr; meter_anchored survives missing IQ
This commit is contained in:
+9
-1
@@ -22,8 +22,16 @@ for i in $(seq 1 "$SEGS"); do
|
|||||||
./result-py/bin/python3 hil/dut_cmd.py "$P" --listen $((DUR + 4)) \
|
./result-py/bin/python3 hil/dut_cmd.py "$P" --listen $((DUR + 4)) \
|
||||||
> "$D/serial.log" 2>&1
|
> "$D/serial.log" 2>&1
|
||||||
wait
|
wait
|
||||||
|
SZ=$(stat -c%s "$D/iq.raw" 2>/dev/null || echo 0)
|
||||||
|
if [ "$SZ" -lt $((DUR * 3200000 * 8 / 10)) ]; then
|
||||||
|
echo "{\"seg\":$i,\"error\":\"short_capture\",\"bytes\":$SZ,\"t\":$(date +%s)}" >> "$OUT/soak.jsonl"
|
||||||
|
rm -f "$D/iq.raw"
|
||||||
|
usbreset 0bda:2838 >/dev/null 2>&1
|
||||||
|
sleep 10
|
||||||
|
continue
|
||||||
|
fi
|
||||||
V=$(./result-py/bin/python3 hil/meter_anchored.py \
|
V=$(./result-py/bin/python3 hil/meter_anchored.py \
|
||||||
--iq "$D/iq.raw" --serial "$D/serial.log" --json 2>/dev/null)
|
--iq "$D/iq.raw" --serial "$D/serial.log" --json 2>"$D/verdict.err")
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ -n "$V" ]; then
|
if [ -n "$V" ]; then
|
||||||
echo "$V" | ./result-py/bin/python3 -c \
|
echo "$V" | ./result-py/bin/python3 -c \
|
||||||
|
|||||||
@@ -81,7 +81,12 @@ def main():
|
|||||||
ap.add_argument("--json", action="store_true")
|
ap.add_argument("--json", action="store_true")
|
||||||
args = ap.parse_args()
|
args = ap.parse_args()
|
||||||
|
|
||||||
|
try:
|
||||||
db, floor = envelope(args.iq)
|
db, floor = envelope(args.iq)
|
||||||
|
except (FileNotFoundError, ValueError):
|
||||||
|
print("IQ file missing or unreadable -- capture never started",
|
||||||
|
file=sys.stderr)
|
||||||
|
sys.exit(3)
|
||||||
bursts = bursts_of(db, floor)
|
bursts = bursts_of(db, floor)
|
||||||
rx, tx = parse_serial(args.serial)
|
rx, tx = parse_serial(args.serial)
|
||||||
strong = [r for r in rx
|
strong = [r for r in rx
|
||||||
|
|||||||
Reference in New Issue
Block a user