This repository has been archived on 2026-08-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
donglora/vendor/zerocopy/agent_docs/ui_tests.md
T
swaitsandClaude Opus 4.6 3102fc747a feat: add display UI with splash screen, dashboard, and RSSI sparkline
Implement full SSD1306 OLED display support:
- Splash screen on boot (1.5s) with project name, version, board
- Dashboard showing radio state, config, counters, RSSI/SNR
- RSSI history sparkline (64-sample ring buffer, 2px-wide bars)
- DisplayOn/DisplayOff host commands routed via dedicated channel
- Pure render functions against generic DrawTarget (no hardware coupling)
- Display on/off control bypasses radio task entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:42:54 -06:00

2.1 KiB

UI & Output Tests

When updating UI test files (tests/ui-* or zerocopy-derive/tests/ui-*) or functionality which could affect compiler error output or derive output, run: ./tools/update-expected-test-output.sh.

Note: We maintain separate UI tests for different toolchains (ui-msrv, ui-stable, ui-nightly) because compiler output varies. The script handles this automatically.

To share test code across toolchains while allowing for different error output, we use a symlink pattern:

  1. Canonical Source: The ui-nightly directory holds the actual source files (.rs).
  2. Symlinks: The ui-stable and ui-msrv directories contain symlinks to the .rs files in ui-nightly.
    • Example: tests/ui-stable/foo.rs -> ../ui-nightly/foo.rs
  3. Unique Output: Each directory contains its own .stderr files.

Workflow Rules

  • Adding a Test:
    1. Create the .rs file in ui-nightly.
    2. Create relative symlinks in ui-stable and ui-msrv pointing to the new file in ui-nightly.
    3. Run ./tools/update-expected-test-output.sh to generate the .stderr files.
  • Modifying a Test:
    1. Edit the .rs file in ui-nightly.
    2. Run ./tools/update-expected-test-output.sh to update the .stderr files.
  • Removing a Test:
    1. Delete the .rs file from ui-nightly.
    2. Delete the symlinks from ui-stable and ui-msrv.
    3. Delete the corresponding .stderr files from all three directories.

NEVER edit .stderr files directly. Only update them via the script or the commands it runs. If a .stderr file is causing a test failure and updating it via tooling does not fix the failure, that indicates a bug.