[ONOS-6901] Fix how the systemTest does not return any result when it forced to quit the test
Change-Id: If93c48d46e8dc2494046b42de21f732775d7f520
diff --git a/TestON/drivers/common/cli/onosclusterdriver.py b/TestON/drivers/common/cli/onosclusterdriver.py
index 4be6191..63bee60 100755
--- a/TestON/drivers/common/cli/onosclusterdriver.py
+++ b/TestON/drivers/common/cli/onosclusterdriver.py
@@ -214,12 +214,10 @@
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
main.log.error( self.name + ": " + self.handle.before )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
except Exception:
main.log.exception( self.name + ": Uncaught exception!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
def disconnect( self ):
"""
@@ -274,17 +272,14 @@
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
main.log.error( self.name + ": " + self.handle.before )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
except Exception:
main.log.exception( self.name + ": Uncaught exception!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
else:
# namespace is not clear!
main.log.error( name + " component already exists!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
def setRestOptions( self, name, host ):
"""
@@ -322,17 +317,14 @@
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
main.log.error( self.name + ": " + self.handle.before )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
except Exception:
main.log.exception( self.name + ": Uncaught exception!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
else:
# namespace is not clear!
main.log.error( name + " component already exists!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
def setBenchOptions( self, name ):
"""
@@ -364,17 +356,14 @@
except pexpect.EOF:
main.log.error( self.name + ": EOF exception found" )
main.log.error( self.name + ": " + self.handle.before )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
except Exception:
main.log.exception( self.name + ": Uncaught exception!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
else:
# namespace is not clear!
main.log.error( name + " component already exists!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
def createComponents( self, prefix='' ):
"""