subsys: usb: shell: Added pytest#6
subsys: usb: shell: Added pytest#6roma-jam wants to merge 4 commits intopr-add-dwc2-uhc-channels-initfrom
Conversation
d33aa8c to
f92073d
Compare
801c8b0 to
0a028a5
Compare
7271103 to
40afb3a
Compare
40afb3a to
7f16b15
Compare
aae36b7 to
0f267aa
Compare
There was a problem hiding this comment.
FYI, for convenience, this file got submitted here:
There was a problem hiding this comment.
Cool, thanks!
I also want to check the ztest to know what is it better.
Seems it might be worth switch to them to test uhc on hardware instead of running the shell example.
There was a problem hiding this comment.
Twister works the same way for the shell sample and USB test, so it might not need a lot of effort or learning.
I am testing the pytest and for now it did not get the prompt, but very nice setup nonetheless, first time I use pytest with twister.
I am now trying a HIL test that calls the usb_init/enable() and will report here.
Hopefully this can be proposed upstream then, so that we can have it on any PR.
Thanks for the infrastructure effort!
There was a problem hiding this comment.
However interactively it all works without glitch so far.
There was a problem hiding this comment.
| shell: bash | ||
| run: | | ||
| cd "$GITHUB_WORKSPACE" | ||
| tar -czf twister-out.tgz twister-out |
There was a problem hiding this comment.
maybe you'd like to try twisters option to prepare packed artifacts? It should store only what is needed for execution --package-artifacts https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/pylib/twister/twisterlib/environment.py#L377C10-L377C29. If you need some extra files you can add --keep-artifacts https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/pylib/twister/twisterlib/environment.py#L654C10-L654C26
There was a problem hiding this comment.
Cool, thanks a lot for a note!
Will definitely try it.
| -p esp32s3_devkitc/esp32s3/procpu \ | ||
| -s sample.usbh.shell.hil \ | ||
| --build-only \ | ||
| -j 1 -v \ |
There was a problem hiding this comment.
Interesting question actually....I thought that if I build only one app and I don't need to make it faster, I decided to do it via single worker only.
But there was no error or anything, so it might be removed.
b21a310 to
6c8ebae
Compare
PerMac
left a comment
There was a problem hiding this comment.
I just realized I got this comment pending for 2 weeks
| . "$GITHUB_WORKSPACE/ws/.venv/bin/activate" | ||
| cd "$GITHUB_WORKSPACE/ws/zephyr" | ||
|
|
||
| west twister \ |
There was a problem hiding this comment.
I believe you not using the artifacts, but rebuilding the image. To skip building you'd need also --test-only https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/pylib/twister/twisterlib/environment.py#L382 I suggest you add --log-level debug which will print all the cmake command etc to verify if it was rebuild or not
6c8ebae to
f73bbf2
Compare
3bb08bc to
650ae19
Compare
Add host_prj.conf for the applicaiton and test_usbh_shell.py. Add the sample.usbh.shell.hil entry in the usbh subsys sample to be able to run and test usbh in CI with pytest harness for twister. Signed-off-by: Roman Leonov <jam_roma@yahoo.com>
Add workflow with zephyr container to test the subsys usbh shell sample Signed-off-by: Roman Leonov <jam_roma@yahoo.com>
650ae19 to
f0fb8c3
Compare
4321f55 to
5c9e0be
Compare
23c14fd to
5d82af9
Compare
Description
Automation of the verification process during
uhc_dwc2driver development.samples/subsys/usb/shellprovides the possibility to send driver commands, such as:init,enable,device listetc.To verify the current working state of the driver on a hardware usually the test requires manual launch and typing the commands.
To automate the process, the approach of building the twister artifacts on the ubuntu-latest and running them on the self-hosted runner is used.
Changes
This PR adds: