tests/power_telemetry: update to add runpath to query tool args

Message ID 20230630172756.128108-1-karen.kelly@intel.com (mailing list archive)
State New
Headers
Series tests/power_telemetry: update to add runpath to query tool args |

Checks

Context Check Description
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-suite-test warning SKIPPED

Commit Message

Kelly, Karen June 30, 2023, 5:27 p.m. UTC
  Telemetry test creates query_tool.py. Due to changes to
dpdk_telemetry_client.py, query_tool.py needed to be updated to take
in the value of the runpath.

Signed-off-by: Karen Kelly <karen.kelly@intel.com>
---
 tests/TestSuite_power_telemetry.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
  

Comments

Pattan, Reshma July 10, 2023, 8:29 a.m. UTC | #1
> -----Original Message-----
> From: Kelly, Karen <karen.kelly@intel.com>
> Subject: [dts][PATCH] tests/power_telemetry: update to add runpath to query
> tool args
> 
> Telemetry test creates query_tool.py. Due to changes to
> dpdk_telemetry_client.py, query_tool.py needed to be updated to take in the
> value of the runpath.
> 
> Signed-off-by: Karen Kelly <karen.kelly@intel.com>

Acked-by: Reshma Pattan <reshma.pattan@intel.com>
  

Patch

diff --git a/tests/TestSuite_power_telemetry.py b/tests/TestSuite_power_telemetry.py
index 9ddf7992..d6a7efd4 100644
--- a/tests/TestSuite_power_telemetry.py
+++ b/tests/TestSuite_power_telemetry.py
@@ -154,6 +154,8 @@  class TestPowerTelemetry(TestCase):
             import json
             from dpdk_telemetry_client import Client, GLOBAL_METRICS_REQ, BUFFER_SIZE
 
+            RUN_TIME_PATH = "/var/run/dpdk/rte"
+
             class ClientExd(Client):
                 def __init__(self, json_file):
                     super(ClientExd, self).__init__()
@@ -176,11 +178,16 @@  class TestPowerTelemetry(TestCase):
                                 nargs='*',
                                 default=None,
                                 help='json_file option')
+            parser.add_argument('-r',
+                                '--run_time_path',
+                                nargs='*',
+                                default=RUN_TIME_PATH,
+                                help='run time path option')
             args = parser.parse_args()
             file_path = args.file_prefix[0]
             client = ClientExd(args.json_file[0])
             client.getFilepath(file_path)
-            client.setRunpath(file_path)
+            client.setRunpath(args.run_time_path)
             client.register()
             client.requestGlobalMetrics()
             time.sleep(2)