diff --git a/packages/omamobile-audio/test/all b/packages/omamobile-audio/test/all index 9d623cc40..e69270fed 100755 --- a/packages/omamobile-audio/test/all +++ b/packages/omamobile-audio/test/all @@ -502,19 +502,21 @@ c9settle() { # name settle steps...: steps are delay_s:temp_bytes, applied in o local n=$1 st=$2; shift 2; local steps=("$@") c9 "$n"; ((rc == 0)) || { cat "$r/out" >&2; fail "$n: start"; } echo 'state: RUNNING' > "$r/asound/card0/pcm5p/sub0/status" - amx cset "name=Bottom DSP1 Protection cd CSPL_TEMPERATURE" 0x00,0x06,0x40,0x00 >/dev/null + amx cset "name=Bottom DSP1 Protection cd CSPL_TEMPERATURE" "${C9_START:-0x00,0x06,0x40,0x00}" >/dev/null rm -f "$r/watch.out" ( for _ in $(seq 1 100); do grep -c 'watchdog: watching' "$r/watch.out" >/dev/null 2>&1 && break; sleep 0.05; done for s in "${steps[@]}"; do sleep "${s%%:*}"; amx cset "name=Bottom DSP1 Protection cd CSPL_TEMPERATURE" "${s#*:}" >/dev/null; done ) & wprep=(OMAMOBILE_SPK_STAGE=c9 OMAMOBILE_SPK_DIGITAL=817 OMAMOBILE_SPK_ANALOG=17 FAKE_ANALOG_MAX=17 OMAMOBILE_SPK_TEMP_SETTLE=$st OMAMOBILE_SPK_TEMP_JUMP=${JUMP:-5}) - WATCH_N=80 watchrun; wait + # 200 polls (10 s at 0.05 s): on a slow CI runner the steps above arrive + # seconds late, and 80 polls let the watchdog finish before the rise came. + WATCH_N=200 watchrun; wait } c9settle c9-step 1.5 0.2:0x00,0x0a,0x00,0x00 # 25 -> 40 C: the measured value, a step ((rc == 0)) && ! muted && grep -c 's into a stream' "$r/watch.out" >/dev/null || { cat "$r/watch.out" >&2; fail "watchdog: in stage c9 the step from the reference to the measured coil does not mute"; } # The settle window leaves a second either side: on a loaded machine (CI, the # nightly publish) the step to 33 C once landed after a 0.6 s baseline was # taken, so the watchdog saw 25 -> 41 and the test failed for timing alone. -c9settle c9-rise 1.0 0.0:0x00,0x08,0x40,0x00 2.0:0x00,0x0a,0x40,0x00 # 25 -> 33 in the window, then 33 -> 41 C +C9_START=0x00,0x08,0x40,0x00 c9settle c9-rise 1.0 2.0:0x00,0x0a,0x40,0x00 # starts at the measured 33 C (so the baseline never depends on when the watchdog's output shows), then 33 -> 41 C ((rc == 1)) && muted && grep -c 'jumped 8.0 C (33.0 -> 41.0)' "$r/run/speaker-protection" >/dev/null || { cat "$r/watch.out" >&2; fail "watchdog: in stage c9 a rise of 8 C above the measured value mutes"; } c9settle c9-cold 0.4 1.5:0x00,0x07,0xc0,0x00 # no step: the baseline at 0.4 s, then 25 -> 31 C ((rc == 1)) && muted && grep -c 'jumped 6.0 C' "$r/run/speaker-protection" >/dev/null || { cat "$r/watch.out" >&2; fail "watchdog: in stage c9 a 6 C rise after the settle window mutes"; }