diff options
author | pmikus <peter.mikus@protonmail.ch> | 2023-10-13 06:47:52 +0000 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2023-10-13 06:58:49 +0000 |
commit | 64921d9ec4ebc5f32ab1e8f8b4498f27ee72fdb2 (patch) | |
tree | c7db9eaf70d76063227807b7e0ffaac020aca45d /resources | |
parent | e2c0d2e1481f899ba82a3892694a04a127668b2b (diff) |
feat(core): Multilink TRex ASTF Async mode
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch>
Change-Id: I9e4eac451578c0f6b86b1dde237512184c163def
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/TrafficGenerator.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index fa645c32d4..e036448f77 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -471,17 +471,17 @@ class TrafficGenerator(AbstractMeasurer): :type node: dict :raises RuntimeError: If stop traffic script fails. """ - command_line = OptionString().add(u"python3") + command_line = OptionString().add("python3") dirname = f"{Constants.REMOTE_FW_DIR}/GPL/tools/trex" command_line.add(f"'{dirname}/trex_astf_stop.py'") - command_line.change_prefix(u"--") - for index, value in enumerate(self._xstats): + command_line.add("--xstat") + for value in self._xstats: if value is not None: - value = value.replace(u"'", u"\"") - command_line.add_equals(f"xstat{index}", f"'{value}'") + value = value.replace("'", "\"") + command_line.add(f"'{value}'") stdout, _ = exec_cmd_no_error( node, command_line, - message=u"T-Rex ASTF runtime error!" + message="T-Rex ASTF runtime error!" ) self._parse_traffic_results(stdout) @@ -495,7 +495,7 @@ class TrafficGenerator(AbstractMeasurer): :type node: dict :raises RuntimeError: If stop traffic script fails. """ - command_line = OptionString().add(u"python3") + command_line = OptionString().add("python3") dirname = f"{Constants.REMOTE_FW_DIR}/GPL/tools/trex" command_line.add(f"'{dirname}/trex_stl_stop.py'") command_line.add("--xstat") @@ -505,7 +505,7 @@ class TrafficGenerator(AbstractMeasurer): command_line.add(f"'{value}'") stdout, _ = exec_cmd_no_error( node, command_line, - message=u"T-Rex STL runtime error!" + message="T-Rex STL runtime error!" ) self._parse_traffic_results(stdout) |