Labgrid for testing userspace software #1203
-
Hello, I am considering labgrid as a my default framework for embedded linux testing. I've ran the demos successfully and am very happy with the way labgrid works. However I'm having trouble to comprehend how to integrate it into a little bit more software testing usecases. Lets say I have a custom application on an UART link using custom protocol used to command and control the DUT from the Labhost. What is the correct way to setup tests for this scenario using labgrid? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Do you have an example for "command and control" in your use case? What do you want to achieve/test exactly? Run an application on the "labhost" as a counterpart to an application started on your DUT? Or craft a custom counterpart using some Python library, so you can craft requests/responses dynamically? Depending on your use case, you might want to use labgrid to acquire the resources, turn on power, bring the device to a desired state in userspace. Everything else could probably be done with Python/pytest and maybe some other libraries, without further labgrid interaction? |
Beta Was this translation helpful? Give feedback.
-
Initially, I thought I had to create custom resources/drivers for my device. In the end I ended up using Labgrid for infrastructure management and pytest for the rest. An external script manages the actual tests execution using pytest. This includes results gathering. The combination of usb-sd-mux and Labgrid is extremely powerful, allowing me to create very nice CI combos as well. (i.e. flashing the device directly from my build machine). |
Beta Was this translation helpful? Give feedback.
Do you have an example for "command and control" in your use case? What do you want to achieve/test exactly? Run an application on the "labhost" as a counterpart to an application started on your DUT? Or craft a custom counterpart using some Python library, so you can craft requests/responses dynamically?
Depending on your use case, you might want to use labgrid to acquire the resources, turn on power, bring the device to a desired state in userspace. Everything else could probably be done with Python/pytest and maybe some other libraries, without further labgrid interaction?