Skip to content

Commit

Permalink
fix: Separate flash and monitor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
achxkloel committed Jan 31, 2024
1 parent e623cd1 commit 9de1590
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,31 +141,43 @@ jobs:
env:
ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board }}
run: espflash_app/espflash erase-flash 2>&1

- name: flash test
env:
ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board }}
ESPFLASH_APP: espflash/${{ matrix.board }}_app/hello_world
shell: bash
run: |
result=$(espflash_app/espflash flash ${{ env.ESPFLASH_APP }} 2>&1)
echo "$result"
if ! echo "$result" | grep -q "Flashing has completed!"; then
exit 1
fi
- name: monitor test
env:
ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board }}
shell: 'script -qec "bash {0}"'
run: |
result=$(timeout 20s espflash_app/espflash flash --monitor ${{ env.ESPFLASH_APP }} 2>&1)
result=$(timeout 10s espflash_app/espflash monitor -b no-reset-no-sync -c ${{ matrix.board }} 2>&1)
echo "$result"
ret=$?
if [[ $ret -eq 124 ]]; then
ret=0
fi
if ! echo "$result" | grep -q "Flashing has completed!"; then
if ! echo "$result" | grep -q "Hello world!"; then
ret=1
fi
exit $ret
- name: cat serial port
env:
ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board }}
run: timeout 5s cat ${{ env.ESPFLASH_PORT }} 2>&1
# - name: cat serial port
# env:
# ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board }}
# run: timeout 5s cat ${{ env.ESPFLASH_PORT }} 2>&1

# - name: cat serial port
# env:
Expand Down

0 comments on commit 9de1590

Please sign in to comment.