Exit the test when flow-tester execution fails
Change-Id: I4e3704d8a09354a13f28dc2d34e703428faaba84
diff --git a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
index dc9cb52..4342bfe 100644
--- a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
+++ b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
@@ -277,12 +277,14 @@
main.log.info( resultString )
print( "\n" )
- avgOfMaxes = numpy.mean( maxes )
- main.log.info( "Average of max value from each test iteration: " + str( avgOfMaxes ) )
-
- stdOfMaxes = numpy.std( maxes )
- main.log.info( "Standard Deviation of max values: " + str( stdOfMaxes ) )
- print( "\n\n" )
+ try:
+ avgOfMaxes = numpy.mean( maxes )
+ main.log.info( "Average of max value from each test iteration: " + str( avgOfMaxes ) )
+ stdOfMaxes = numpy.std( maxes )
+ main.log.info( "Standard Deviation of max values: " + str( stdOfMaxes ) )
+ print( "\n\n" )
+ except TypeError:
+ main.cleanAndExit( msg="flow-tester execution failed" )
avgTP = int( installCount ) / avgOfMaxes # result in kflows/second