Skip to content

Commit 2e97b27

Browse files
Chris Nourseclaude
andcommitted
tests: drop manual soft-reset test from audioio suite
Test 6 (soft-reset during active playback) is covered in practice by the external frequency-sweep rig, which exercises start / stop / re- play across 30 tones in series — the same lifecycle paths the manual Ctrl-C/Ctrl-D test was checking. Drops the README section, the table row, the results-file note, and the trailing "remaining manual step" print so the docs/runner consistently say "Tests 1–5". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 11b441f commit 2e97b27

3 files changed

Lines changed: 4 additions & 28 deletions

File tree

tests/circuitpython-manual/audioio/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ These tests exercise the DAC-based `audioio.AudioOut` implementation added for S
1111
| 3 — Looping Sine Wave | Yes | Yes (audio check) |
1212
| 4 — deinit and Re-init | Yes | No |
1313
| 5 — Stereo Playback | Yes | Yes (audio check) |
14-
| 6 — Soft Reset Cleanup | No (manual Ctrl-C/D) | No |
1514

1615
`run_serial_tests.py` automates Tests 1–5: it copies the necessary files to the
1716
board and runs each script over the serial REPL, comparing the printed output to
@@ -291,27 +290,6 @@ done
291290
- On a scope: probing A0 and A1 simultaneously during phases 1 and 2 should
292291
show one channel idle (mid-scale DC) while the other carries the sine.
293292

294-
## Test 6 — Soft Reset Cleanup *(manual)*
295-
296-
Verifies that `audioout_reset()` properly cleans up when the REPL soft-resets during active playback.
297-
298-
1. Start a looping tone in the REPL:
299-
300-
```python
301-
import audiocore, audioio, board, array, math, time
302-
length = 8000 // 440
303-
s16 = array.array("h", [int(math.sin(math.pi * 2 * i / length) * 32767) for i in range(length)])
304-
dac = audioio.AudioOut(board.A0)
305-
dac.play(audiocore.RawSample(s16, sample_rate=8000), loop=True)
306-
```
307-
308-
2. While the tone is playing, press **Ctrl-C** then **Ctrl-D** (soft reset).
309-
310-
**Expected:**
311-
- **Ctrl-C** interrupts the Python code but the tone *keeps playing* — this is normal. The DMA and TIM6 run in hardware independently of Python; a `KeyboardInterrupt` does not stop them.
312-
- **Ctrl-D** triggers a soft reset which calls `audioout_reset()`. The tone stops immediately and the board returns to the `>>>` prompt with no crash or fault.
313-
- Running any of the above tests again afterwards should work normally.
314-
315293
## Oscilloscope Checks (Optional)
316294

317295
Each test script drives `board.D4` (pin D4) low at the start of each playback and high when it ends. This provides a clean trigger edge for a scope.

tests/circuitpython-manual/audioio/results.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# audioio — `run_serial_tests.py` results
22

33
- **Board:** Adafruit Feather STM32F405 Express
4-
- **Suite:** Tests 1–5 automated (Test 6 soft-reset is manual)
4+
- **Suite:** Tests 1–5 automated
55
- **Result:** all PASS
66

77
```
@@ -492,5 +492,5 @@ SUMMARY
492492
[PASS] Test 5 — Stereo Playback
493493
494494
All automated tests passed.
495-
Remaining manual step: Test 6 (soft-reset) and audio/oscilloscope verification.
495+
Remaining manual step: audio/oscilloscope verification.
496496
```

tests/circuitpython-manual/audioio/run_serial_tests.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
"""
33
run_serial_tests.py — Automated REPL-based tests for STM32F405 audioio.
44
5-
Automates Tests 1, 2, 3, and 4 from README.md by:
5+
Automates Tests 1–5 from README.md by:
66
1. Copying WAV files and test scripts to the board via mpremote.
77
2. Running each test on the device via the CircuitPython REPL.
88
3. Comparing captured output to expected patterns and reporting PASS/FAIL.
99
10-
Test 5 (soft-reset cleanup) still requires manual interaction.
11-
1210
Usage:
1311
python3 run_serial_tests.py
1412
python3 run_serial_tests.py --port /dev/cu.usbmodemXXX
@@ -559,7 +557,7 @@ def main():
559557
print()
560558
if all_passed:
561559
print("All automated tests passed.")
562-
print("Remaining manual step: Test 6 (soft-reset) and audio/oscilloscope verification.")
560+
print("Remaining manual step: audio/oscilloscope verification.")
563561
sys.exit(0)
564562
else:
565563
print("One or more tests FAILED — see details above.")

0 commit comments

Comments
 (0)