Currently, ports on the TG are not bound to the correct drivers prior to
running DTS. This causes DTS to crash if they are not initially bound to
the intended drivers.

Leverage TG runtime environment to bind TG ports to correct drivers
before and after running DTS.

Signed-off-by: Andrew Bailey <abai...@iol.unh.edu>
---
 dts/framework/test_run.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dts/framework/test_run.py b/dts/framework/test_run.py
index 274dceebfd..16d7781536 100644
--- a/dts/framework/test_run.py
+++ b/dts/framework/test_run.py
@@ -114,6 +114,7 @@
 from framework.remote_session.dpdk import (
     DPDKBuildEnvironment,
     DPDKSUTRuntimeEnvironment,
+    DPDKTGRuntimeEnvironment,
 )
 from framework.settings import SETTINGS
 from framework.test_result import Result, ResultNode, TestRunResult
@@ -169,6 +170,7 @@ class TestRun:
     ctx: Context
     result: TestRunResult
     selected_tests: list[TestScenario]
+    tg_runtime_env: DPDKTGRuntimeEnvironment
 
     blocked: bool
     remaining_tests: deque[TestScenario]
@@ -203,6 +205,7 @@ def __init__(
 
         dpdk_build_env = DPDKBuildEnvironment(config.dpdk.build, sut_node)
         dpdk_sut_runtime_env = DPDKSUTRuntimeEnvironment(config.dpdk, 
sut_node, dpdk_build_env)
+        self.tg_runtime_env = DPDKTGRuntimeEnvironment(tg_node)
         traffic_generator = create_traffic_generator(config.traffic_generator, 
tg_node)
 
         self.ctx = Context(
@@ -343,6 +346,7 @@ def next(self) -> State | None:
 
         test_run.ctx.sut_node.setup()
         test_run.ctx.tg_node.setup()
+        test_run.tg_runtime_env.setup()
         test_run.ctx.dpdk.setup()
         test_run.ctx.topology.setup()
 
-- 
2.50.1

Reply via email to