* update the lte_rate_matching for rx (temporarily)
* update the oai performance test cases * update ulsim and dlsim for automatic logging for performance testing git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5343 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -42,7 +42,7 @@ makerr1 = '***'
|
||||
makerr2 = 'Error 1'
|
||||
|
||||
|
||||
def execute(oai, user, pw, logfile,logdir,debug):
|
||||
def execute(oai, user, pw, host,logfile,logdir,debug):
|
||||
|
||||
case = '101'
|
||||
rv = 1;
|
||||
@@ -57,9 +57,10 @@ def execute(oai, user, pw, logfile,logdir,debug):
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for dlsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
|
||||
oai.send('make cleanall;')
|
||||
oai.send('rm -f ./dlsim.rel8;')
|
||||
oai.send('rm -f ./dlsim.rel8.'+host)
|
||||
oai.send_expect_false('make dlsim -j4' + tee, makerr1, 1500)
|
||||
oai.send('cp ./dlsim ./dlsim.rel8;')
|
||||
oai.send('cp ./dlsim ./dlsim.rel8.'+host)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv =0
|
||||
@@ -74,9 +75,9 @@ def execute(oai, user, pw, logfile,logdir,debug):
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ulsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
|
||||
oai.send('make cleanall;')
|
||||
oai.send('rm -f ./ulsim.rel8;')
|
||||
oai.send('rm -f ./ulsim.rel8.'+host)
|
||||
oai.send_expect_false('make ulsim -j4' + tee, makerr1, 1500)
|
||||
oai.send('cp ./ulsim ./ulsim.rel8;')
|
||||
oai.send('cp ./ulsim ./ulsim.rel8.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
|
||||
+21
-19
@@ -48,8 +48,8 @@ NUM_UE=2
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
PRB=[25]#,50,75,100]
|
||||
MCS=[4,5,7,9,12,15,18,21,24,27]
|
||||
PRB=[25,50,100]
|
||||
MCS=[0,4,9,10,13,16,17,22,27]
|
||||
ANT_TX=2 # 2
|
||||
ANT_RX=2 # 2
|
||||
PDCCH=2 #, 2, 3, 4
|
||||
@@ -65,26 +65,26 @@ FRAME=500
|
||||
|
||||
|
||||
|
||||
def execute(oai, user, pw, logfile,logdir,debug):
|
||||
def execute(oai, user, pw, host, logfile,logdir,debug):
|
||||
|
||||
case = '102'
|
||||
case = '10'
|
||||
oai.send('cd $OPENAIR1_DIR;')
|
||||
oai.send('cd SIMULATION/LTE_PHY;')
|
||||
|
||||
try:
|
||||
test = '0'
|
||||
test = '200'
|
||||
name = 'Run oai.dlsim.sanity'
|
||||
conf = '-a -n 100'
|
||||
diag = 'dlsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + case + test + '_1.txt;'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + case + test + '_2.txt;'
|
||||
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + case + test + '_3.txt;'
|
||||
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8 ' + conf + tee, 'FATAL', 30)
|
||||
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
@@ -92,11 +92,12 @@ def execute(oai, user, pw, logfile,logdir,debug):
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
test = 1
|
||||
MIN_SNR = 0
|
||||
test = 210
|
||||
|
||||
name = 'Run oai.dlsim.perf.'+str(PERF)+'%'
|
||||
diag = 'no diagnostic is available, check the log file'
|
||||
for i in range(len(PRB)):
|
||||
MIN_SNR = 0
|
||||
for j in range(len(MCS)):
|
||||
for k in range(1,ANT_TX):
|
||||
for m in range (1,ANT_RX):
|
||||
@@ -106,13 +107,15 @@ def execute(oai, user, pw, logfile,logdir,debug):
|
||||
for q in range(MIN_SNR,MAX_SNR):
|
||||
#if if PRB[i] :
|
||||
|
||||
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(k) + ' -z'+str(m) +' -c'+str(n) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -f.1 -P -n'+str(FRAME)+' -O'+str(PERF) #+' '+ OPT
|
||||
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(k) + ' -z'+str(m) +' -c'+str(n) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -f.1 -P -n'+str(FRAME)+' -O'+str(PERF) +' '+ OPT
|
||||
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_anttx' + str(k)+ '_antrx' + str(m) + '_pdcch' + str(n) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
match = oai.send_expect_re('./dlsim.rel8 ' + conf + tee, 'passed', 0, 1000)
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.'+ host + ' ' + conf + tee
|
||||
if debug :
|
||||
print conf
|
||||
|
||||
print cmd
|
||||
|
||||
match = oai.send_expect_re(cmd, 'passed', 0, 1000)
|
||||
|
||||
if match :
|
||||
log.ok(case, str(test), name, conf, '', logfile)
|
||||
MIN_SNR = q -1 # just to speed up the test
|
||||
@@ -131,8 +134,7 @@ def execute(oai, user, pw, logfile,logdir,debug):
|
||||
print ("Error: %s - %s." % (e.filename,e.strerror))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, str(test), name, conf, e.value, diag, logfile,trace)
|
||||
#else:
|
||||
|
||||
+20
-17
@@ -48,8 +48,8 @@ NUM_UE=2
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
PRB=[25]#,50,75,100]
|
||||
MCS=[4,5,7,9,12,15,18,21,24,27]
|
||||
PRB=[25,50,100]
|
||||
MCS=[0,4,9,10,13,16,17,22,27]
|
||||
ANT_TX=1 # 2
|
||||
ANT_RX=2 # 2
|
||||
CHANNEL=["N"] # A,B,C,D,E,F,
|
||||
@@ -63,26 +63,26 @@ FRAME=500
|
||||
|
||||
|
||||
|
||||
def execute(oai, user, pw, logfile,logdir,debug):
|
||||
def execute(oai, user, pw, host,logfile,logdir,debug):
|
||||
|
||||
case = '103'
|
||||
case = '10'
|
||||
oai.send('cd $OPENAIR1_DIR;')
|
||||
oai.send('cd SIMULATION/LTE_PHY;')
|
||||
|
||||
try:
|
||||
test = '0'
|
||||
test = '300'
|
||||
name = 'Run oai.ulsim.sanity'
|
||||
conf = '-a -n 100'
|
||||
diag = 'ulsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + case + test + '_1.txt;'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.rel8 ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + case + test + '_2.txt;'
|
||||
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.rel8 ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + case + test + '_3.txt;'
|
||||
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.rel8 ' + conf + tee, 'FATAL', 30)
|
||||
oai.send_expect_false('./ulsim.rel8.'+ host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
@@ -90,11 +90,11 @@ def execute(oai, user, pw, logfile,logdir,debug):
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
test = 1
|
||||
MIN_SNR=2
|
||||
test = 310
|
||||
name = 'Run oai.ulsim.perf.'+str(PERF)+'%'
|
||||
diag = 'no diagnostic is available, check the log file'
|
||||
for i in range(len(PRB)):
|
||||
MIN_SNR=0
|
||||
for j in range(len(MCS)):
|
||||
for m in range (1,ANT_RX):
|
||||
for o in range(len(CHANNEL)):
|
||||
@@ -102,13 +102,16 @@ def execute(oai, user, pw, logfile,logdir,debug):
|
||||
for q in range(MIN_SNR,MAX_SNR):
|
||||
#if if PRB[i] :
|
||||
|
||||
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF) #+' '+ OPT
|
||||
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF)+' '+ OPT
|
||||
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_antrx' + str(m) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
match = oai.send_expect_re('./ulsim.rel8 ' + conf + tee, 'passed', 0, 1000)
|
||||
cmd = 'taskset -c 0 ./ulsim.rel8.'+ host + ' ' + conf + tee
|
||||
|
||||
if debug :
|
||||
print conf
|
||||
|
||||
print cmd
|
||||
|
||||
match = oai.send_expect_re(cmd, 'passed', 0, 1000)
|
||||
|
||||
if match :
|
||||
log.ok(case, str(test), name, conf, '', logfile)
|
||||
MIN_SNR = q - 1 # just to speed up the test
|
||||
|
||||
@@ -187,7 +187,7 @@ class openair(core):
|
||||
def create_dir(self,dirname,debug) :
|
||||
if not os.path.exists(dirname) :
|
||||
try:
|
||||
os.makedirs(dirname)
|
||||
os.makedirs(dirname,0755)
|
||||
except OSError:
|
||||
# There was an error on creation, so make sure we know about it
|
||||
raise
|
||||
|
||||
@@ -79,13 +79,14 @@ for arg in sys.argv:
|
||||
sys.exit()
|
||||
i= i + 1
|
||||
|
||||
host = os.uname()[1]
|
||||
# get the oai object
|
||||
oai = openair('localdomain','localhost')
|
||||
#start_time = time.time() # datetime.datetime.now()
|
||||
try:
|
||||
user = getpass.getuser()
|
||||
print '\n******* Note that the user <'+user+'> should be a sudoer *******\n'
|
||||
print '******* Connecting to the localhost to perform the test *******\n'
|
||||
print '******* Connecting to the localhost <'+host+'> to perform the test *******\n'
|
||||
|
||||
if not pw :
|
||||
print "username: " + user
|
||||
@@ -104,10 +105,10 @@ except :
|
||||
|
||||
test = 'test02'
|
||||
ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d.%Hh%M")
|
||||
logdir = os.getcwd() + '/PERF';
|
||||
logdir = os.getcwd() + '/PERF_'+host;
|
||||
logfile = logdir+'/'+user+'.'+test+'.'+ctime+'.txt'
|
||||
oai.send_nowait('mkdir -p -m 755' + logdir + ';')
|
||||
|
||||
#oai.send_nowait('mkdir -p -m 755' + logdir + ';')
|
||||
oai.create_dir(logdir,debug)
|
||||
#print '=================start the ' + test + ' at ' + ctime + '=================\n'
|
||||
#print 'Results will be reported in log file : ' + logfile
|
||||
log.writefile(logfile,'====================start'+test+' at ' + ctime + '=======================\n')
|
||||
@@ -121,10 +122,11 @@ if clean == 1 :
|
||||
|
||||
# start te test cases
|
||||
#compile
|
||||
rv=case11.execute(oai, user, pw, logfile,logdir,debug)
|
||||
|
||||
rv=case11.execute(oai, user, pw, host,logfile,logdir,debug)
|
||||
if rv != 0 :
|
||||
case12.execute(oai, user, pw, logfile,logdir,debug)
|
||||
case13.execute(oai, user, pw, logfile,logdir,debug)
|
||||
case12.execute(oai, user, pw, host,logfile,logdir,debug)
|
||||
case13.execute(oai, user, pw, host,logfile,logdir,debug)
|
||||
else :
|
||||
print 'Compilation error: skip case 12 and 13'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user