diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-03-27 15:09:30 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-03-27 15:09:30 +0300 |
commit | 3804a5dd52975a9a6fd3ff094ae16593bfeb2303 (patch) | |
tree | 87348315331081fea6e67eb3f6afe4714790705d /scripts/automation/trex_control_plane | |
parent | a2fdf41ac599bdef6657642152c0acdaf488ee6c (diff) |
regression: fix failing on positive return status of server
Diffstat (limited to 'scripts/automation/trex_control_plane')
-rwxr-xr-x | scripts/automation/trex_control_plane/server/trex_launch_thread.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/server/trex_launch_thread.py b/scripts/automation/trex_control_plane/server/trex_launch_thread.py index 59c382ea..74ce1750 100755 --- a/scripts/automation/trex_control_plane/server/trex_launch_thread.py +++ b/scripts/automation/trex_control_plane/server/trex_launch_thread.py @@ -51,8 +51,8 @@ class AsynchronousTRexSession(threading.Thread): self.trexObj.set_verbose_status("TRex run failed due to wrong input parameters, or due to readability issues.\n\nTRex command: {cmd}\n\nRun output:\n{output}".format(
cmd = self.cmd, output = self.load_trex_output(self.export_path)))
self.trexObj.errcode = -11
- elif (self.session.returncode is not None and self.session.returncode < 0) or ( (self.time_stamps['run_time'] < self.duration) and (not self.stoprequest.is_set()) ):
- if (self.session.returncode is not None and self.session.returncode < 0):
+ elif (self.session.returncode is not None and self.session.returncode != 0) or ( (self.time_stamps['run_time'] < self.duration) and (not self.stoprequest.is_set()) ):
+ if (self.session.returncode is not None and self.session.returncode != 0):
logger.debug("Failed TRex run due to session return code ({ret_code})".format( ret_code = self.session.returncode ) )
elif ( (self.time_stamps['run_time'] < self.duration) and not self.stoprequest.is_set()):
logger.debug("Failed TRex run due to running time ({runtime}) combined with no-stopping request.".format( runtime = self.time_stamps['run_time'] ) )
|