avocado-framework / avocado

Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
https://avocado-framework.github.io/
Other
345 stars 343 forks source link

Runnable and Suite configuration support #6006

Closed clebergnu closed 3 months ago

clebergnu commented 3 months ago

This change allows for the a runnable configuration and the suite and default configuration to coexist with the correct behavior.

In short, if the suite has a configuration, it will become the new default configuration for a runnable, while its own configuration will not be touched.

Fixes: https://github.com/avocado-framework/avocado/issues/5998

clebergnu commented 3 months ago

Hi @richtja, thanks for the review. I've addressed both issues, and explained the additional changes to the verification of values in the commit message, reading:

    Because the purpose of the default_config and config are different,
    the checks for the values they may contain are different.  The
    default_config should contain the exact keys as in the used config.
    The config itself, on the other hand, may contain nothing, or some
    values, but it should never be more than a subset of the config.
clebergnu commented 3 months ago

Hi @clebergnu, thanks for the update. I just noticed that Runnable.from_avocado_config is also used in sysinfo plugin, can you please update that as well, so we won't use deprecated code in avocado plugins. Thanks

Good catch! Just updated it! Thanks!

clebergnu commented 3 months ago

Merging based on @richtja approval and CI status.