test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules
@ 2021-01-19  8:32 ChenBo
  2021-01-19  8:36 ` Chen, BoX C
  2021-01-21  8:24 ` Tu, Lijuan
  0 siblings, 2 replies; 4+ messages in thread
From: ChenBo @ 2021-01-19  8:32 UTC (permalink / raw)
  To: dts; +Cc: ChenBo

The coding styles of python2 and python3 are different, modify script to adapt to python3.

Signed-off-by: ChenBo <box.c.chen@intel.com>
---
 tests/TestSuite_telemetry.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py
index 81e14a6c..7e474bc2 100644
--- a/tests/TestSuite_telemetry.py
+++ b/tests/TestSuite_telemetry.py
@@ -70,8 +70,8 @@ class TestTelemetry(TestCase):
                     with open(self.json_file, 'w') as fp:
                         fp.write(data)
                 def requestMetrics(self): # Requests metrics for given client
-                    self.socket.client_fd.send(METRICS_REQ)
-                    data = self.socket.client_fd.recv(BUFFER_SIZE)
+                    self.socket.client_fd.send(METRICS_REQ.encode())
+                    data = self.socket.client_fd.recv(BUFFER_SIZE).decode()
                     return data
                 def singleRequestMetrics(self):
                     data = self.requestMetrics()
@@ -128,7 +128,7 @@ class TestTelemetry(TestCase):
         self.query_tool = ';'.join([
             'cd {}'.format(self.target_dir),
             'chmod 777 {}'.format(fileName),
-            './' + fileName])
+            'python3 ' + fileName])
 
     def rename_dpdk_telemetry_tool(self):
         '''
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-21  8:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19  8:32 [dts] [PATCH V1] tests/TestSuite_telemetry: Adapting python3 code rules ChenBo
2021-01-19  8:36 ` Chen, BoX C
2021-01-19  9:13   ` Zhao, HaiyangX
2021-01-21  8:24 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).