[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/core/teston.py b/TestON/core/teston.py
index 3030f3f..0f45e04 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -754,6 +754,17 @@
os.system( "stty sane" ) # fix format if necessary
sys.exit()
+ def cleanAndExit( self ):
+ """
+ It will set the testcase result to be FAILED and update it
+ before cleaning up and exitting the test.
+ :return:
+ """
+ if self.CurrentTestCaseNumber:
+ self.testCaseResult[ str( self.CurrentTestCaseNumber ) ] = self.FALSE
+ self.logger.updateCaseResults( self )
+ self.cleanup()
+ self.exit()
def stop( self, email=False ):
"""