Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
40c68030
Commit
40c68030
authored
9 years ago
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge changes from bugfix-56-UE_category3_throughput
parent
0dc471d2
Branches unavailable
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
2020.w30
2020.w29
2020.w28
2020.w26
2020.w25
2020.w24
2020.w23
2020.w22
2020.w19
2020.w17
2020.w16
2020.w15
2020.w11
2020.w09
2020.w06
2020.w05
2020.w04
2020.w03
2019.w51
2019.w44
2019.w41
2019.w36
2019.w30
2019.w28
2019.w27
2019.w25
2019.w23
2019.w21
2019.w17
2019.w15
2019.w13
2019.w11
2019.w10
2019.w09
2019.w08
2019.w07
2019.w06
2019.w04
2019.w03
2018.w51
2018.w48
2018.w47
2018.w46
2018.w44
2018.w41
2018.w40
2018.w39
2018.w36
2018.w33
2018.w31
2018.w29
2018.w25
2018.w19
2018.w15
2018.w12
2018.w11
2018.w10
2018.w09
2018.w08
2018.w07
2018.w06
2018.w05
2018.w04
2018.w03
2018.w02
2017.w48
2017.w46
2017.w43
2017.w42
2017.w34
2017.w30
2017.w25
2017.w24
2017.w22
2017.w20
2017.w19
2017.w15
2017.w14
2017.w13
2017.w12
2017.w11
2017.w10
2017.w09
2017.w08
2017.w07
2017.w06
2017.w05
2017.w04
2017.w03
2017.w02
2017.w01
2016.w50
2016.w49
v2.1.0
v2.0.0
v1.2.2
v1.2.1
v1.2.0
v1.1.1
v1.1.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v1B0.8
v1B0.7
v1B0.6
v1B0.5
v1B0.4
v1B0.3
v1B0.2
v1B0.1
v0.6.1
v0.6.1_tdd
v0.6
v0.5.2
v0.5.1_tdd
v0.5
v0.4
v0.3
v0.2
v0.1
setparam
osa-etsi-ws-ue
osa-etsi-ws-try2
osa-etsi-ws-try1
osa-etsi-ws-gNB
oai_nr_sync
nr-ip-over-lte
nr-ip-over-lte-v.1.5
nr-ip-over-lte-v.1.4
nr-ip-over-lte-v.1.3
nr-ip-over-lte-v.1.2
nr-ip-over-lte-v.1.1
nr-ip-over-lte-v.1.0
flexran-eol
develop-nr-pdcch
develop-nr-2020w03
develop-nr-2020w02
develop-nr-2019w51
develop-nr-2019w50
develop-nr-2019w48
develop-nr-2019w47
develop-nr-2019w45
develop-nr-2019w43
develop-nr-2019w42
develop-nr-2019w40
develop-nr-2019w28
develop-nr-2019w23
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
283 additions
and
132 deletions
+283
-132
cmake_targets/autotests/openair.py
cmake_targets/autotests/openair.py
+11
-7
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+47
-14
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+225
-111
No files found.
cmake_targets/autotests/openair.py
View file @
40c68030
...
...
@@ -43,6 +43,7 @@ import shutil
import
subprocess
import
sys
import
traceback
import
time
# import call
from
core
import
*
...
...
@@ -82,6 +83,7 @@ class openair(core):
return
(
stdout
,
stderr
)
def
connect
(
self
,
username
,
password
,
prompt
=
'PEXPECT_OAI'
):
while
True
:
self
.
prompt1
=
prompt
self
.
prompt2
=
prompt
self
.
password
=
''
...
...
@@ -103,13 +105,15 @@ class openair(core):
self
.
oai
.
sendline
(
'uptime'
)
self
.
oai
.
prompt
()
print
self
.
oai
.
before
break
except
Exception
,
e
:
error
=
''
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
print
"Retrying again in 60 seconds"
time
.
sleep
(
60
)
#sys.exit(1)
def
connect2
(
self
,
username
,
password
,
prompt
=
'$'
):
self
.
prompt1
=
prompt
...
...
@@ -190,7 +194,7 @@ class openair(core):
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
#
sys.exit(1)
def
rm_driver
(
self
,
oai
,
user
,
pw
):
try
:
...
...
@@ -205,7 +209,7 @@ class openair(core):
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
#
sys.exit(1)
def
driver
(
self
,
oai
,
user
,
pw
):
#pwd = oai.send_recv('pwd')
...
...
@@ -222,7 +226,7 @@ class openair(core):
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
#
sys.exit(1)
def
cleandir
(
self
,
logdir
,
debug
)
:
...
...
@@ -238,8 +242,8 @@ class openair(core):
error
=
error
+
' In function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
#
sys.exit(1)
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
def
create_dir
(
self
,
dirname
,
debug
)
:
if
not
os
.
path
.
exists
(
dirname
)
:
...
...
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
40c68030
...
...
@@ -257,6 +257,22 @@ def update_config_file(oai, config_string, logdirRepo, python_script):
return
cmd
#result = oai.send_recv(cmd)
def
SSHSessionWrapper
(
machine
,
username
,
key_file
,
password
,
logdir_remote_testcase
,
logdir_local_base
):
while
True
:
try
:
ssh
=
SSHSession
(
machine
,
username
,
key_file
,
password
)
ssh
.
get_all
(
logdir_remote_testcase
,
logdir_local_base
)
break
except
Exception
,
e
:
error
=
''
error
=
error
+
' In Class = function: '
+
sys
.
_getframe
().
f_code
.
co_name
+
': *** Caught exception: '
+
str
(
e
.
__class__
)
+
" : "
+
str
(
e
)
error
=
error
+
'
\n
username = '
+
username
+
'
\n
machine = '
+
machine
+
'
\n
logdir_remote = '
+
logdir_remote_testcase
+
'
\n
logdir_local_base = '
+
logdir_local_base
error
=
error
+
traceback
.
format_exc
()
print
error
print
" Trying again in 60 seconds"
time
.
sleep
(
60
)
print
"Continuing ..."
#Function to clean old programs that might be running from earlier execution
...
...
@@ -366,8 +382,9 @@ class testCaseThread_generic (threading.Thread):
#print "ThreadID = " + str(self.threadID) + "ThreadName: " + self.name + " testcasename: " + self.testcasename + "Execution Result = " + res
write_file
(
logfile_task_testcasename
,
cmd
,
mode
=
"w"
)
#Now we copy all the remote files
ssh
=
SSHSession
(
self
.
machine
,
username
=
user
,
key_file
=
None
,
password
=
self
.
password
)
ssh
.
get_all
(
logdir_remote_testcase
,
logdir_local_base
)
#ssh = SSHSession(self.machine , username=user, key_file=None, password=self.password)
#ssh.get_all(logdir_remote_testcase , logdir_local_base)
SSHSessionWrapper
(
self
.
machine
,
user
,
None
,
self
.
password
,
logdir_remote_testcase
,
logdir_local_base
)
print
"Finishing test case : "
+
self
.
testcasename
+
" On machine "
+
self
.
machine
cleanOldPrograms
(
oai
,
self
.
oldprogramList
,
self
.
CleanupAluLteBox
)
#oai.kill(user,mypassword)
...
...
@@ -378,9 +395,12 @@ class testCaseThread_generic (threading.Thread):
error
=
error
+
'
\n
threadID = '
+
str
(
self
.
threadID
)
+
'
\n
threadName = '
+
self
.
name
+
'
\n
testcasename = '
+
self
.
testcasename
+
'
\n
machine = '
+
self
.
machine
+
'
\n
logdirOAI5GRepo = '
+
self
.
logdirOAI5GRepo
+
'
\n
'
+
'
\n
timeout = '
+
str
(
self
.
timeout
)
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
()
print
"Continuing with next test case..."
#sys.exit()
def
addsudo
(
cmd
,
password
=
""
):
cmd
=
'echo
\'
'
+
password
+
'
\'
| sudo -S -E bash -c
\'
'
+
cmd
+
'
\'
'
return
cmd
...
...
@@ -434,23 +454,26 @@ def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramLis
error
=
error
+
'
\n
testcasename = '
+
testcasename
+
'
\n
logdirOAI5GRepo = '
+
logdirOAI5GRepo
+
'
\n
MachineList = '
+
','
.
join
(
MachineList
)
+
'
\n
timeout = '
+
str
(
timeout
)
+
'
\n
'
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
print
"Continuing..."
#sys.exit(1)
#Blocking wait for all threads related to generic testcase execution, class (compilation and execution)
def
wait_testcaseclass_generic_threads
(
threadListGeneric
,
timeout
=
1
):
threadListGenericNew
=
[]
for
param
in
threadListGeneric
:
thread_id
=
param
[
"thread_id"
]
machine
=
param
[
"Machine"
]
testcasenameold
=
param
[
"testcasename"
]
thread_id
.
join
(
timeout
)
if
thread_id
.
isAlive
()
==
True
:
threadListGenericNew
.
append
(
param
)
print
"thread_id on machine: "
+
machine
+
" is still alive: testcasename: "
+
testcasenameold
print
" Exiting now..."
sys
.
exit
(
1
)
else
:
print
"thread_id on machine: "
+
machine
+
" is stopped: testcasename: "
+
testcasenameold
threadListGeneric
.
remove
(
param
)
return
threadListGeneric
#
threadListGeneric.remove(param)
return
threadListGeneric
New
#Function to handle test case class : lte-softmodem
def
handle_testcaseclass_softmodem
(
testcase
,
oldprogramList
,
logdirOAI5GRepo
,
logdirOpenaircnRepo
,
MachineList
,
password
,
CleanUpAluLteBox
):
...
...
@@ -760,16 +783,21 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
print
"Copying files from EPCMachine : "
+
EPCMachine
+
"logdir_EPC = "
+
logdir_EPC
ssh
=
SSHSession
(
EPCMachine
,
username
=
user
,
key_file
=
None
,
password
=
password
)
ssh
.
get_all
(
logdir_EPC
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
)
#ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password)
#ssh.get_all(logdir_EPC , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
SSHSessionWrapper
(
EPCMachine
,
user
,
None
,
password
,
logdir_EPC
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
)
print
"Copying files from eNBMachine "
+
eNBMachine
+
"logdir_eNB = "
+
logdir_eNB
ssh
=
SSHSession
(
eNBMachine
,
username
=
user
,
key_file
=
None
,
password
=
password
)
ssh
.
get_all
(
logdir_eNB
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
)
#ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password)
#ssh.get_all(logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
SSHSessionWrapper
(
eNBMachine
,
user
,
None
,
password
,
logdir_eNB
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
)
print
"Copying files from UEMachine : "
+
UEMachine
+
"logdir_UE = "
+
logdir_UE
ssh
=
SSHSession
(
UEMachine
,
username
=
user
,
key_file
=
None
,
password
=
password
)
ssh
.
get_all
(
logdir_UE
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
)
#ssh = SSHSession(UEMachine , username=user, key_file=None, password=password)
#ssh.get_all(logdir_UE , logdir_local + '/cmake_targets/autotests/log/'+ testcasename)
SSHSessionWrapper
(
UEMachine
,
user
,
None
,
password
,
logdir_UE
,
logdir_local
+
'/cmake_targets/autotests/log/'
+
testcasename
)
#Currently we only perform throughput tests
tput_run_string
=
''
...
...
@@ -1159,6 +1187,10 @@ for t in threads_init_setup:
sftp_log
=
os
.
path
.
expandvars
(
locallogdir
+
'/sftp_module.log'
)
sftp_module
(
user
,
pw
,
MachineList
[
index
],
port
,
paramList
,
sftp_log
)
index
=
index
+
1
if
os
.
path
.
exists
(
localfile
)
==
0
:
print
"Setup log file <"
+
localfile
+
"> missing for machine <"
+
MachineList
[
index
]
+
">. Please check the setup log files. Exiting now"
sys
.
exit
(
1
)
#Now we process all the test cases
#Now we check if there was error in setup files
...
...
@@ -1166,7 +1198,7 @@ for t in threads_init_setup:
status
,
out
=
commands
.
getstatusoutput
(
'grep '
+
' -il
\'
error
\'
'
+
locallogdir
+
'/setup*'
)
if
(
out
!=
''
)
:
print
"There is error in setup of machines"
print
"status = "
+
str
(
status
)
+
"
\n
out
= "
+
out
print
"status = "
+
str
(
status
)
+
"
\n
Check files for error
= "
+
out
print
sys
.
exit
(
1
)
...
...
@@ -1207,7 +1239,8 @@ for testcase in testcaseList:
error
=
error
+
'
\n
testcasename = '
+
testcasename
+
'
\n
testcaseclass = '
+
testcaseclass
+
'
\n
desc = '
+
'desc'
+
'
\n
'
error
=
error
+
traceback
.
format_exc
()
print
error
sys
.
exit
(
1
)
print
"Continuing to next test case..."
#sys.exit(1)
print
"Exiting the test cases execution now..."
...
...
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/test_case_list.xml
View file @
40c68030
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment