aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2019-07-31 13:14:16 +0000
committerDamjan Marion <dmarion@me.com>2019-09-25 22:05:36 +0000
commit51699e62c4d0b6ecf153d9802131dd969839ccd0 (patch)
treed33cb6dafdc113be7548f7eb19a61d37ebaec7ce /test
parent00127d69996792e8ea120df5915a61f808904335 (diff)
tests: support worker threads
Add support for specifying the worker thread when adding packet stream. Type: feature Change-Id: I8a98b91c211e60cd53e1166f9f51365394ecacfd Signed-off-by: Klement Sekera <ksekera@cisco.com> (cherry picked from commit 4ecbf105a4290de9917b1ded14b0854c68cbd655)
Diffstat (limited to 'test')
-rwxr-xr-xtest/vpp_pg_interface.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/vpp_pg_interface.py b/test/vpp_pg_interface.py
index ed45b459251..b347f9d5096 100755
--- a/test/vpp_pg_interface.py
+++ b/test/vpp_pg_interface.py
@@ -82,6 +82,8 @@ class VppPGInterface(VppInterface):
"""CLI string to load the injected packets"""
if self._nb_replays is not None:
return "%s limit %d" % (self._input_cli, self._nb_replays)
+ if self._worker is not None:
+ return "%s worker %d" % (self._input_cli, self._worker)
return self._input_cli
@property
@@ -158,13 +160,14 @@ class VppPGInterface(VppInterface):
def disable_capture(self):
self.test.vapi.cli("%s disable" % self.capture_cli)
- def add_stream(self, pkts, nb_replays=None):
+ def add_stream(self, pkts, nb_replays=None, worker=None):
"""
Add a stream of packets to this packet-generator
:param pkts: iterable packets
"""
+ self._worker = worker
self._nb_replays = nb_replays
self._rename_previous_capture_file(self.in_path,
self.in_history_counter,