Skip to content

Commit aee470a

Browse files
authored
tests_hw: Reset USB Port Upon Workflow Start (#191)
* tests_hw: Reset USB Port Upon Workflow Start Added step to the setup job for the b_u585i_iot02a workflow file to reset the USB connection. This should fix unexpected states the connection is left in as the result of an interrupted west flash command during a cancelled GHA run. Uses an additional --device to allow the container to manage usb devices as needed. --------- Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
1 parent 67b813c commit aee470a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/hardware-bu585.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
- name: Create wasm directory
3030
run: mkdir /var/ocre-ci-files/wasm
3131

32+
- name: Reset USB Connection
33+
run: sudo usbreset STLINK-V3 # Product name for the b_u585i_iot02a, may have to update if we add additional STM boards to the workflow
34+
3235
build-wasm-files:
3336
name: Build .wasm Files
3437
needs: setup-local-runner
@@ -120,8 +123,7 @@ jobs:
120123
- /var/ocre-ci-files/:/var/ocre-ci-files/
121124
- /usr/local/STMicroelectronics/:/usr/local/STMicroelectronics/
122125
- /github/home/STMicroelectronics/:/github/home/STMicroelectronics/
123-
- /dev/bus/usb:/dev/bus/usb
124-
options: --user root --privileged --device=/dev/ttyACM0
126+
options: --user root --device=/dev/ttyACM0 --device=/dev/bus
125127

126128
steps:
127129
- name: Clean workspace
@@ -181,8 +183,7 @@ jobs:
181183
- /var/ocre-ci-files/:/var/ocre-ci-files/
182184
- /usr/local/STMicroelectronics/:/usr/local/STMicroelectronics/
183185
- /github/home/STMicroelectronics/:/github/home/STMicroelectronics/
184-
- /dev/bus/usb:/dev/bus/usb
185-
options: --user root --privileged --device=/dev/ttyACM0
186+
options: --user root --device=/dev/ttyACM0 --device=/dev/bus
186187

187188
steps:
188189
- name: Clean workspace
@@ -242,8 +243,7 @@ jobs:
242243
- /var/ocre-ci-files/:/var/ocre-ci-files/
243244
- /usr/local/STMicroelectronics/:/usr/local/STMicroelectronics/
244245
- /github/home/STMicroelectronics/:/github/home/STMicroelectronics/
245-
- /dev/bus/usb:/dev/bus/usb
246-
options: --user root --privileged --device=/dev/ttyACM0
246+
options: --user root --device=/dev/ttyACM0 --device=/dev/bus
247247

248248
steps:
249249
- name: Clean workspace

0 commit comments

Comments
 (0)