Commit 7ca88722 authored by hardy's avatar hardy

fix test status fail/pass + test update + cleaning

parent 37cc4d60
......@@ -940,18 +940,6 @@ class RANManagement():
logging.debug(dlsch_ulsch_stats[key])
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
datalog_rt_stats['Data']={}
if len(real_time_stats)!=0: #check if dictionary is not empty
......@@ -962,8 +950,13 @@ class RANManagement():
avg=float(tmp.group('avg'))
max=float(tmp.group('max'))
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
#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:
statMsg = 'No real time stats found in the log file\n'
logging.debug('No real time stats found in the log file')
......
......@@ -24,7 +24,7 @@
<htmlTabRef>gNB-PHY-Test</htmlTabRef>
<htmlTabName>Run-gNB-PHY-Test</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<repeatCount>3</repeatCount>
<TestCaseRequestedList>
090101 000001 090109
</TestCaseRequestedList>
......@@ -40,7 +40,7 @@
<testCase id="000001">
<class>IdleSleep</class>
<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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment