summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client/trex_client.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2015-12-16 09:39:41 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2015-12-16 09:39:41 +0200
commitfc92c730b46408d408b70364881571e03c7e98d7 (patch)
tree323b43f67860b288a71bb83314f4e8116714ca3d /scripts/automation/trex_control_plane/client/trex_client.py
parenta7967979b47845a1736e734c1c16f5929ae6fd48 (diff)
trex_client.py: increase timeout by '-k' argument seconds, as it leaves TRex in 'Starting' state.
Diffstat (limited to 'scripts/automation/trex_control_plane/client/trex_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_client.py b/scripts/automation/trex_control_plane/client/trex_client.py
index a8669011..341ab06d 100755
--- a/scripts/automation/trex_control_plane/client/trex_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_client.py
@@ -125,7 +125,7 @@ class CTRexClient(object):
user = user or self.__default_user
try:
d = int(d)
- if d < 30 and not trex_development: # specify a test should take at least 30 seconds long.
+ if d < 30 and not trex_development: # test duration should be at least 30 seconds, unless trex_development flag is specified.
raise ValueError
except ValueError:
raise ValueError('d parameter must be integer, specifying how long TRex run, and must be larger than 30 secs.')
@@ -133,6 +133,8 @@ class CTRexClient(object):
trex_cmd_options.update( {'f' : f, 'd' : d} )
if not trex_cmd_options.get('l'):
self.result_obj.latency_checked = False
+ if 'k' in trex_cmd_options:
+ timeout += int(trex_cmd_options[k]) # during 'k' seconds TRex stays in 'Starting' state
self.result_obj.clear_results()
try: