[v1,0/4] node and inheritance improvements

Message ID 20240423091252.62924-1-juraj.linkes@pantheon.tech (mailing list archive)
Headers
Series node and inheritance improvements |

Message

Juraj Linkeš April 23, 2024, 9:12 a.m. UTC
  There are two areas that are unified:
The super() calls, where the arguments were removed as they're not
needed in single inheritance.
The classes derived from object don't need to explicitly state that.

The tg node execution setup and teardown was omitted and is fixed in
this series.

And probably the most important part if the cleanup of execution and
build target setup and teardown. Build targets are relevant only for sut
nodes, so it's been moved there, same for vdevs. The execution
setup/teardown code was modified so that subclasses use super() to
extend the base methods.

Juraj Linkeš (4):
  dts: add tg node execution setup and teardown
  dts: unify class inheritance from object
  dts: unify super calls
  dts: refine pre-test setup and teardown steps

 dts/framework/remote_session/testpmd_shell.py |  2 +-
 dts/framework/runner.py                       |  2 +
 dts/framework/test_result.py                  | 16 ++---
 dts/framework/test_suite.py                   |  2 +-
 dts/framework/testbed_model/cpu.py            |  4 +-
 dts/framework/testbed_model/node.py           | 65 ++-----------------
 dts/framework/testbed_model/sut_node.py       | 53 ++++++++++-----
 dts/framework/testbed_model/tg_node.py        |  4 +-
 dts/framework/testbed_model/virtual_device.py |  2 +-
 dts/framework/utils.py                        |  4 +-
 10 files changed, 61 insertions(+), 93 deletions(-)
  

Comments

Luca Vizzarro April 23, 2024, 10:07 a.m. UTC | #1
On 23/04/2024 10:12, Juraj Linkeš wrote:
> There are two areas that are unified:
> The super() calls, where the arguments were removed as they're not
> needed in single inheritance.
> The classes derived from object don't need to explicitly state that.
> 
> The tg node execution setup and teardown was omitted and is fixed in
> this series.
> 
> And probably the most important part if the cleanup of execution and
> build target setup and teardown. Build targets are relevant only for sut
> nodes, so it's been moved there, same for vdevs. The execution
> setup/teardown code was modified so that subclasses use super() to
> extend the base methods.

Hi Juraj,

Thank you for your submission and improvements. It all looks good to me!

Best,
Luca