From fc92c730b46408d408b70364881571e03c7e98d7 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 16 Dec 2015 09:39:41 +0200 Subject: trex_client.py: increase timeout by '-k' argument seconds, as it leaves TRex in 'Starting' state. --- scripts/automation/trex_control_plane/client/trex_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/client/trex_client.py') 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: -- cgit From f0919e280a6a7b74a52f05b8e6f591e1b7e08200 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Wed, 16 Dec 2015 09:45:56 +0200 Subject: typo --- scripts/automation/trex_control_plane/client/trex_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/client/trex_client.py') diff --git a/scripts/automation/trex_control_plane/client/trex_client.py b/scripts/automation/trex_control_plane/client/trex_client.py index 341ab06d..5709b7a5 100755 --- a/scripts/automation/trex_control_plane/client/trex_client.py +++ b/scripts/automation/trex_control_plane/client/trex_client.py @@ -134,7 +134,7 @@ class CTRexClient(object): 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 + timeout += int(trex_cmd_options['k']) # during 'k' seconds TRex stays in 'Starting' state self.result_obj.clear_results() try: -- cgit