summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-07-27 15:03:55 +0700
committerhathach <[email protected]>2022-07-27 15:20:56 +0700
commit1ff0c7a52b1350e477d75cfc5fd5243cdaedd508 (patch)
tree70c5216137d830bc80db6a490e1f9bbc70917bae /.github
parentf5f2433c5afef3785caeb5251d4cac75e62b77f0 (diff)
sleep 0.2 for new image take affect
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test_hardware.yml24
1 files changed, 14 insertions, 10 deletions
diff --git a/.github/workflows/test_hardware.yml b/.github/workflows/test_hardware.yml
index 30f9e53e8..68425a645 100644
--- a/.github/workflows/test_hardware.yml
+++ b/.github/workflows/test_hardware.yml
@@ -31,21 +31,25 @@ jobs:
env:
example: cdc_dual_ports
run: |
- openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit"
- echo "Waiting for enumeration"
- while ! lsusb | grep "cafe:" ; do : ; done
+ openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf reset exit"
+ echo "Waiting for enumeration (200 ms for reset, 5s for enumeration)"
+ sleep 0.2
+ SECONDS=0
+ while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done
# Test
- test -e /dev/ttyACM1
- test -e /dev/ttyACM2
+ test -e /dev/ttyACM1 && echo "ttyACM1 exists"
+ test -e /dev/ttyACM2 && echo "ttyACM2 exists"
- name: Test cdc_msc
env:
example: cdc_msc
run: |
- openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf verify reset exit"
- echo "Waiting for enumeration"
- while ! lsusb | grep "cafe:" ; do : ; done
+ openocd -f "interface/picoprobe.cfg" -f "target/rp2040.cfg" -c "program ${{ env.example }}.elf reset exit"
+ echo "Waiting for enumeration (200 ms for reset, 5s for enumeration)"
+ sleep 0.2
+ SECONDS=0
+ while (! lsusb | grep "cafe:") && [ $SECONDS -le 5 ] ; do : ; done
# Test
- test -e /dev/ttyACM1
- test -e /media/pi/TinyUSB\ MSC/README.TXT
+ test -e /dev/ttyACM1 && echo "ttyACM1 exists"
+ test -f /media/pi/TinyUSB\ MSC/README.TXT && echo "MSC README.TXT exist"
cat /media/pi/TinyUSB\ MSC/README.TXT