summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-11-29 15:34:05 +0700
committerGitHub <[email protected]>2023-11-29 15:34:05 +0700
commit9c9ebb342d2d3cb0396ff4ad8c7b09acd2aee75e (patch)
tree25c1bdd8a9f5e74cd32448b0a79d32d184ce86cc /.github/workflows
parent390c109aed6afe69285fb68cd7f778fa7f6a47b0 (diff)
parentb8d1acd1049d0535c9c2ef8f63a7aea82abd9cbd (diff)
Merge pull request #2355 from hathach/update-hil-rp2040
Update hil test for rp2040 on self-hosted PI4
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cmake_arm.yml48
1 files changed, 10 insertions, 38 deletions
diff --git a/.github/workflows/cmake_arm.yml b/.github/workflows/cmake_arm.yml
index e57c297d7..f4b93cec7 100644
--- a/.github/workflows/cmake_arm.yml
+++ b/.github/workflows/cmake_arm.yml
@@ -105,15 +105,14 @@ jobs:
# ---------------------------------------
# Hardware in the loop (HIL)
- # Current self-hosted instance is running on an RPI4 with
- # - pico + pico-probe connected via USB
- # - pico-probe is /dev/ttyACM0
+ # Current self-hosted instance is running on an RPI4.
+ # For attached hardware checkout hil_pi4.json
# ---------------------------------------
hw-rp2040-test:
# run only with hathach's commit due to limited resource on RPI4
if: github.repository_owner == 'hathach'
needs: build-arm
- runs-on: [self-hosted, Linux, ARM64, rp2040]
+ runs-on: [self-hosted, rp2040, hardware-in-the-loop]
steps:
- name: Clean workspace
@@ -122,43 +121,16 @@ jobs:
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
+ - name: Checkout test/hil
+ uses: actions/checkout@v3
+ with:
+ sparse-checkout: test/hil
+
- name: Download rp2040 Artifacts
uses: actions/download-artifact@v3
with:
name: rp2040
- - name: Create flash.sh
- run: |
- echo > flash.sh 'cmdout=$(openocd -f "interface/cmsis-dap.cfg" -f "target/rp2040.cfg" -c "adapter speed 5000" -c "program $1 reset exit")'
- echo >> flash.sh 'if (( $? )) ; then echo $cmdout ; fi'
- chmod +x flash.sh
-
- - name: Test cdc_dual_ports
- run: |
- ./flash.sh cdc_dual_ports.elf
- while (! ([ -e /dev/ttyACM1 ] && [ -e /dev/ttyACM2 ])) && [ $SECONDS -le 10 ]; do :; done
- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
- test -e /dev/ttyACM2 && echo "ttyACM2 exists"
-
- - name: Test cdc_msc
- run: |
- ./flash.sh cdc_msc.elf
- readme='/media/pi/TinyUSB MSC/README.TXT'
- while (! ([ -e /dev/ttyACM1 ] && [ -f "$readme" ])) && [ $SECONDS -le 10 ]; do :; done
- test -e /dev/ttyACM1 && echo "ttyACM1 exists"
- test -f "$readme" && echo "$readme exists"
- cat "$readme"
-
- - name: Test dfu
- run: |
- ./flash.sh dfu.elf
- while (! (dfu-util -l | grep "Found DFU")) && [ $SECONDS -le 10 ]; do :; done
- dfu-util -d cafe -a 0 -U dfu0
- dfu-util -d cafe -a 1 -U dfu1
- grep "TinyUSB DFU! - Partition 0" dfu0
- grep "TinyUSB DFU! - Partition 1" dfu1
-
- - name: Test dfu_runtime
+ - name: Test on actual hardware (hardware in the loop)
run: |
- ./flash.sh dfu_runtime.elf
- while (! (dfu-util -l | grep "Found Runtime")) && [ $SECONDS -le 10 ]; do :; done
+ python3 test/hil/hil_test.py hil_pi4.json