Skip to content

Commit 84839fa

Browse files
committed
reset pi4 usb bus before checkout/download, so that we could skip delay
1 parent ccc59e8 commit 84839fa

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

.github/workflows/build_esp.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ jobs:
8181
rm -rf "${{ github.workspace }}"
8282
mkdir -p "${{ github.workspace }}"
8383
84+
# USB bus on rpi4 is not stable, reset it before testing
85+
- name: Reset USB bus
86+
run: |
87+
for port in $(lspci | grep USB | cut -d' ' -f1); do
88+
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
89+
sleep 0.1;
90+
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
91+
done
92+
8493
- name: Checkout test/hil
8594
uses: actions/checkout@v3
8695
with:
@@ -92,15 +101,6 @@ jobs:
92101
name: ${{ matrix.board }}
93102
path: cmake-build/cmake-build-${{ matrix.board }}
94103

95-
- name: Reset USB bus
96-
run: |
97-
for port in $(lspci | grep USB | cut -d' ' -f1); do
98-
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
99-
sleep 0.5;
100-
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
101-
sleep 3;
102-
done
103-
104104
- name: Test on actual hardware
105105
run: |
106106
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json

.github/workflows/cmake_arm.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ jobs:
133133
rm -rf "${{ github.workspace }}"
134134
mkdir -p "${{ github.workspace }}"
135135
136+
# USB bus on rpi4 is not stable, reset it before testing
137+
- name: Reset USB bus
138+
run: |
139+
for port in $(lspci | grep USB | cut -d' ' -f1); do
140+
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
141+
sleep 0.1;
142+
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
143+
done
144+
136145
- name: Checkout test/hil
137146
uses: actions/checkout@v3
138147
with:
@@ -144,15 +153,6 @@ jobs:
144153
name: ${{ matrix.board }}
145154
path: cmake-build/cmake-build-${{ matrix.board }}
146155

147-
- name: Reset USB bus
148-
run: |
149-
for port in $(lspci | grep USB | cut -d' ' -f1); do
150-
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
151-
sleep 0.5;
152-
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
153-
sleep 3;
154-
done
155-
156156
- name: Test on actual hardware
157157
run: |
158158
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json

0 commit comments

Comments
 (0)