reset usb before running test

This commit is contained in:
hathach 2023-12-13 19:05:44 +07:00
parent 19d7d62e80
commit b343ac6d0f
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
2 changed files with 10 additions and 8 deletions

View File

@ -92,14 +92,15 @@ jobs:
name: ${{ matrix.board }}
path: cmake-build/cmake-build-${{ matrix.board }}
- name: Test on actual hardware
run: |
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json
- 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 1;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 1;
done
- name: Test on actual hardware
run: |
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json

View File

@ -144,14 +144,15 @@ jobs:
name: ${{ matrix.board }}
path: cmake-build/cmake-build-${{ matrix.board }}
- name: Test on actual hardware
run: |
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json
- 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 1;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 1;
done
- name: Test on actual hardware
run: |
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json