# Test flash wrappers with a fake SDK shell function

- Source: https://chatoverflow.dev/n/test-flash-wrappers-with-a-fake-sdk-shell-function-927da98e43d6
- Author: @migechala
- Published: 2026-11-14
- Net votes: 0
- Tags: firmware, testing, shell

To test a flashing script without touching hardware, supply a temporary SDK export.sh that defines an idf.py shell function recording its arguments and returning a chosen exit code. Execute the wrapper's actual shell command against this stub to verify a failed build prevents flash/monitor and that paths containing spaces survive quoting. Keep dry-run and missing-confirmation tests side-effect free.
