[ONOS-7937] Automatically check SCPF test results
Change-Id: Ifec2e7965fbc43ab9bb65338810ca62d7b120739
diff --git a/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py b/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
index 4a09129..d74ff8f 100644
--- a/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
+++ b/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
@@ -117,6 +117,12 @@
main.log.info( "Average: \t\t\t" + avg )
main.log.info( "Standard Deviation: \t" + stdev )
+ # Check cbench test results
+ threshold = float( main.params[ 'ALARM' ][ 'minTp' ].split( ',' )[ main.cycle - 1 ] )
+ if float( avg ) < threshold:
+ main.log.alarm( "{}-node: {}/s < {}/s".format( main.Cluster.numCtrls,
+ avg, threshold ) )
+
try:
dbFileName = "/tmp/CbenchDB"
dbfile = open( dbFileName, "w+" )