tests: gadget0: delay between calls to trigger races
Attempt to be more brutal by delaying more often, instead of always promptly servicing the usb stack. This is implemented via using timer6 to do a known number of microseconds busy delay, and so only works on platforms that have reached at least core timer functionality, and provide the rcc_apb1_frequency variable. NOTE! This will _fail_ on devices using the st_usbfs drivers at present, but the code _should_ work, and the tests land to verify that the library fix, fixes the problem. (see subsequent commit)
This commit is contained in:
@@ -40,6 +40,11 @@ Ran 27 tests in 0.388s
|
||||
OK (skipped=2)
|
||||
```
|
||||
|
||||
To be even more brutal, run this in a shell loop.
|
||||
```
|
||||
$ while true; do python test_gadget0.py stm32f072disco; done
|
||||
```
|
||||
|
||||
You can also run individual tests, or individual sets of tests, see the [unittest documentation](https://docs.python.org/3/library/unittest.html) for more information.
|
||||
|
||||
Many development environments, such as [PyCharm](https://www.jetbrains.com/pycharm/) can
|
||||
|
||||
Reference in New Issue
Block a user