Skip to content

Commit

Permalink
tests: Add espflash flash --monitor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Feb 12, 2025
1 parent b77f1f4 commit 6fb20aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion espflash/tests/scripts/flash.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env bash

result=$(espflash flash --no-skip $1 2>&1)
result=$(timeout 8s espflash flash --no-skip --monitor --non-interactive $1 2>&1)
echo "$result"
if [[ ! $result =~ "Flashing has completed!" ]]; then
echo "Flashing failed!"
exit 1
fi
if ! echo "$result" | grep -q "Hello world!"; then
echo "Monitoring failed!"
exit 1
fi

0 comments on commit 6fb20aa

Please sign in to comment.