[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/clidriver.py b/TestON/drivers/common/clidriver.py
index aa8a12e..6f26cfc 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -330,8 +330,7 @@
return returnVal
elif i == 7: # EOF
main.log.error( "Pexpect.EOF found!!!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
elif i == 8: # timeout
main.log.error(
"No route to the Host " +
@@ -410,27 +409,23 @@
120 )
if j != 0:
main.log.error( "Incorrect Password" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
elif i == 2:
main.log.error( "Connection timeout" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
elif i == 3: # timeout
main.log.error(
"No route to the Host " +
uName +
"@" +
ipAddress )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
elif i == 4:
main.log.error(
"ssh: connect to host " +
ipAddress +
" port 22: Connection refused" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
elif i == 6:
main.log.info( "Password not required logged in" )