aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/HoststackUtil.py
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2020-01-08 21:14:25 +0000
committerDave Wallace <dwallacelf@gmail.com>2020-01-29 13:59:03 +0000
commit074ae9732d06f962a65d91147b55abf86b42b6d9 (patch)
treee66c8119d4c9af581b2200c5ef166e12efb24ab2 /resources/libraries/python/HoststackUtil.py
parent3bc72c6e268474a6bed725e5371d66f0e369ab16 (diff)
perf: QUIC transport hoststack test suite
Change-Id: I73f4be7ea315c7a5dcce46e1bd3034bcb0a97ee2 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'resources/libraries/python/HoststackUtil.py')
-rw-r--r--resources/libraries/python/HoststackUtil.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/resources/libraries/python/HoststackUtil.py b/resources/libraries/python/HoststackUtil.py
index f95a6a6636..dde5cf60d0 100644
--- a/resources/libraries/python/HoststackUtil.py
+++ b/resources/libraries/python/HoststackUtil.py
@@ -44,6 +44,8 @@ class HoststackUtil():
f"socket-name {vpp_echo_attributes[u'vpp_api_socket']} " \
f"{vpp_echo_attributes[u'json_output']} " \
f"uri {proto}://{addr}/{port} " \
+ f"nthreads {vpp_echo_attributes[u'nthreads']} " \
+ f"mq-size {vpp_echo_attributes[u'mq_size']} " \
f"nclients {vpp_echo_attributes[u'nclients']} " \
f"quic-streams {vpp_echo_attributes[u'quic_streams']} " \
f"time {vpp_echo_attributes[u'time']} " \
@@ -299,10 +301,20 @@ class HoststackUtil():
raise RuntimeError(test_results)
if program_stdout:
bad_test_results = False
- if program == u"vpp_echo" and u"JSON stats" not in program_stdout:
- test_results += u"Invalid test data output!\n"
- bad_test_results = True
- test_results += program_stdout
+ if program[u"name"] == u"vpp_echo":
+ if u"JSON stats" in program_stdout:
+ test_results += program_stdout
+ # TODO: Decode vpp_echo output when JSON format is correct.
+ # json_start = program_stdout.find(u"{")
+ # vpp_echo_results = json.loads(program_stdout[json_start:])
+ if u'"has_failed": "0"' not in program_stdout:
+ bad_test_results = True
+ else:
+ test_results += u"Invalid test data output!\n" + \
+ program_stdout
+ bad_test_results = True
+ else:
+ test_results += program_stdout
if bad_test_results:
raise RuntimeError(test_results)
else: