[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/FUNC/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
index 03ab601..0f3fcf9 100644
--- a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
@@ -48,12 +48,13 @@
- Install ONOS package
- Build ONOS package
"""
+ main.cleanAndExit()
try:
from tests.dependencies.ONOSSetup import ONOSSetup
main.testSetUp = ONOSSetup()
except ImportError:
main.log.error( "ONOSSetup not found. exiting the test" )
- main.exit()
+ main.cleanAndExit()
main.testSetUp.envSetupDescription()
stepResult = main.FALSE
@@ -121,7 +122,7 @@
from tests.dependencies.topology import Topology
except ImportError:
main.log.error( "Topology not found exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.topoRelated
except ( NameError, AttributeError ):
@@ -401,7 +402,7 @@
from tests.dependencies.utils import Utils
except ImportError:
main.log.error( "Utils not found exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.Utils
except ( NameError, AttributeError ):
@@ -432,8 +433,7 @@
mininetResult = main.Utils.mininetCleanup( main.Mininet1 )
# Exit if topology did not load properly
if not ( mininetResult and scapyResult ):
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
def CASE19( self, main ):
"""
@@ -443,7 +443,7 @@
from tests.dependencies.utils import Utils
except ImportError:
main.log.error( "Utils not found exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.Utils
except ( NameError, AttributeError ):
diff --git a/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py b/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
index 5f29037..f4743ee 100644
--- a/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
+++ b/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
@@ -1514,7 +1514,7 @@
from tests.dependencies.topology import Topology
except Exception:
main.log.error( "Topology not found exiting the test" )
- main.exit()
+ main.cleanAndExit()
try:
main.topoRelated
except ( NameError, AttributeError ):
@@ -1697,8 +1697,7 @@
return main.FALSE
except Exception:
main.log.exception( self.name + ": Uncaught exception!" )
- main.cleanup()
- main.exit()
+ main.cleanAndExit()
main.log.info( "Checking Intent Paritions for Change in Leadership" )
mismatch = False
for dict1 in leaders1: