reset pi4 usb bus before checkout/download, so that we could skip delay

This commit is contained in:
hathach 2023-12-14 16:52:45 +07:00
parent ccc59e8763
commit 84839fa5f1
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
2 changed files with 18 additions and 18 deletions

View File

@ -81,6 +81,15 @@ jobs:
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
# USB bus on rpi4 is not stable, reset it before testing
- name: Reset USB bus
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 0.1;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
done
- name: Checkout test/hil
uses: actions/checkout@v3
with:
@ -92,15 +101,6 @@ jobs:
name: ${{ matrix.board }}
path: cmake-build/cmake-build-${{ matrix.board }}
- name: Reset USB bus
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 0.5;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 3;
done
- name: Test on actual hardware
run: |
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json

View File

@ -133,6 +133,15 @@ jobs:
rm -rf "${{ github.workspace }}"
mkdir -p "${{ github.workspace }}"
# USB bus on rpi4 is not stable, reset it before testing
- name: Reset USB bus
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 0.1;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
done
- name: Checkout test/hil
uses: actions/checkout@v3
with:
@ -144,15 +153,6 @@ jobs:
name: ${{ matrix.board }}
path: cmake-build/cmake-build-${{ matrix.board }}
- name: Reset USB bus
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 0.5;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 3;
done
- name: Test on actual hardware
run: |
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json