[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/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
index 79c1c18..7da7e54 100644
--- a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
@@ -39,7 +39,7 @@
from tests.dependencies.ONOSSetup import ONOSSetup
except ImportError:
main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.testSetUp
except ( NameError, AttributeError ):
@@ -56,7 +56,7 @@
from tests.dependencies.ONOSSetup import ONOSSetup
except ImportError:
main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.testSetUp
except ( NameError, AttributeError ):
@@ -103,7 +103,7 @@
from tests.dependencies.ONOSSetup import ONOSSetup
except ImportError:
main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.testSetUp
except ( NameError, AttributeError ):
@@ -173,8 +173,7 @@
onfail="Failed to load topology" )
# Exit if topology did not load properly
if not topoResult:
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
main.step( "Assign switches to controllers.")
assignResult = main.TRUE
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
index a276634..553fa8e 100644
--- a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
+++ b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
@@ -39,7 +39,7 @@
from tests.dependencies.ONOSSetup import ONOSSetup
except ImportError:
main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.testSetUp
except ( NameError, AttributeError ):
@@ -58,7 +58,7 @@
from tests.dependencies.ONOSSetup import ONOSSetup
except ImportError:
main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.testSetUp
except ( NameError, AttributeError ):
@@ -103,7 +103,7 @@
from tests.dependencies.ONOSSetup import ONOSSetup
except ImportError:
main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.testSetUp
except ( NameError, AttributeError ):
@@ -176,8 +176,7 @@
onfail="Failed to load topology" )
# Exit if topology did not load properly
if not topoResult:
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
main.step( "Assign switches to controllers.")
assignResult = main.TRUE