fix test status fail/pass + test update + cleaning
This commit is contained in:
+7
-14
@@ -940,18 +940,6 @@ class RANManagement():
|
|||||||
logging.debug(dlsch_ulsch_stats[key])
|
logging.debug(dlsch_ulsch_stats[key])
|
||||||
htmleNBFailureMsg += statMsg
|
htmleNBFailureMsg += statMsg
|
||||||
|
|
||||||
#real time statistics (old but working version)
|
|
||||||
#if len(real_time_stats)!=0: #check if dictionary is not empty
|
|
||||||
# statMsg=''
|
|
||||||
# for k in real_time_stats:
|
|
||||||
# tmp=re.match(r'^(?P<metric>.*):\s+(?P<avg>\d+\.\d+) us;\s+\d+;\s+(?P<max>\d+\.\d+) us;',real_time_stats[k])
|
|
||||||
# if tmp is not None:
|
|
||||||
# metric=tmp.group('metric')
|
|
||||||
# avg=tmp.group('avg')
|
|
||||||
# max=tmp.group('max')
|
|
||||||
# statMsg += metric + ' : avg = ' + avg + 'us ; max = ' + max +'us\n'
|
|
||||||
# htmleNBFailureMsg += statMsg
|
|
||||||
|
|
||||||
#real time statistics
|
#real time statistics
|
||||||
datalog_rt_stats['Data']={}
|
datalog_rt_stats['Data']={}
|
||||||
if len(real_time_stats)!=0: #check if dictionary is not empty
|
if len(real_time_stats)!=0: #check if dictionary is not empty
|
||||||
@@ -962,8 +950,13 @@ class RANManagement():
|
|||||||
avg=float(tmp.group('avg'))
|
avg=float(tmp.group('avg'))
|
||||||
max=float(tmp.group('max'))
|
max=float(tmp.group('max'))
|
||||||
datalog_rt_stats['Data'][metric]=["{:.0f}".format(avg),"{:.0f}".format(max),"{:.2f}".format(avg/datalog_rt_stats['Ref'][metric])]
|
datalog_rt_stats['Data'][metric]=["{:.0f}".format(avg),"{:.0f}".format(max),"{:.2f}".format(avg/datalog_rt_stats['Ref'][metric])]
|
||||||
#store the data as a class attribute to build a dedicated HTML table afterward
|
#once all metrics are collected, store the data as a class attribute to build a dedicated HTML table afterward
|
||||||
self.datalog_rt_stats=datalog_rt_stats
|
self.datalog_rt_stats=datalog_rt_stats
|
||||||
|
#check if there is a fail => will render the test as failed
|
||||||
|
for k in datalog_rt_stats['Data']:
|
||||||
|
if float(datalog_rt_stats['Data'][k][2])> datalog_rt_stats['Threshold'][k]: #condition for fail : avg/ref is greater than the fixed threshold
|
||||||
|
#setting prematureExit is ok although not the best option
|
||||||
|
self.prematureExit=True
|
||||||
else:
|
else:
|
||||||
statMsg = 'No real time stats found in the log file\n'
|
statMsg = 'No real time stats found in the log file\n'
|
||||||
logging.debug('No real time stats found in the log file')
|
logging.debug('No real time stats found in the log file')
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<htmlTabRef>gNB-PHY-Test</htmlTabRef>
|
<htmlTabRef>gNB-PHY-Test</htmlTabRef>
|
||||||
<htmlTabName>Run-gNB-PHY-Test</htmlTabName>
|
<htmlTabName>Run-gNB-PHY-Test</htmlTabName>
|
||||||
<htmlTabIcon>tasks</htmlTabIcon>
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
<repeatCount>2</repeatCount>
|
<repeatCount>3</repeatCount>
|
||||||
<TestCaseRequestedList>
|
<TestCaseRequestedList>
|
||||||
090101 000001 090109
|
090101 000001 090109
|
||||||
</TestCaseRequestedList>
|
</TestCaseRequestedList>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<testCase id="000001">
|
<testCase id="000001">
|
||||||
<class>IdleSleep</class>
|
<class>IdleSleep</class>
|
||||||
<desc>Sleep</desc>
|
<desc>Sleep</desc>
|
||||||
<idle_sleep_time_in_sec>180</idle_sleep_time_in_sec>
|
<idle_sleep_time_in_sec>300</idle_sleep_time_in_sec>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user