Open mkopec opened 11 months ago
@BeataZdunczyk This may need a bit more work to evaluate all of the places needing to be changed, but probably still valid. We need to build more concrete plan here.
A good example of how to approach this is how the options lib has been implemented: https://github.com/Dasharo/open-source-firmware-validation/tree/develop/lib/options
The Power On / Power Cycle On and similar keywords behave differently on many devices.
For example Running Power On
or Power Cycle On
on a device without a power control, (laptops) does nothing.
On other devices running such keyword causes the device to turn off and boot with the firmware read from the flash memory. The tests which flash the devices depend on it and it might be surprising that running a Power On keyword won't cause the newly flashed firmware to be booted.
The problem you're addressing (if any)
Right now it's a bit messy with each DUT using a different set of control methods for power, serial, wake etc, which are selected using flags (DUT_CONNECTION_METHOD etc)
Describe the solution you'd like
Factor out each implementation into a separate library with a defined interface
i.e.
wakeonlan
andrte
libraries for waking up,rte
andpikvm
for terminal output,rte
andsonoff
for power control, etc.Platform configs would only include the libraries that they need.
Where is the value to a user, and who might that user be?
Makes tests simpler by having a set of well known kwds for things that are platform-specific
Enforces a stable interface for power, terminal I/O control
Describe alternatives you've considered
do nothing?
Additional context
No response