Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Qingqing Huang
openairinterface5G
Commits
1bff2ec7
Commit
1bff2ec7
authored
9 years ago
by
Rohit Gupta
Browse files
Options
Downloads
Patches
Plain Diff
updates for thoughput tests in test framework
parent
dc3d32db
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+48
-31
48 additions, 31 deletions
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/test_case_list.xml
+51
-51
51 additions, 51 deletions
cmake_targets/autotests/test_case_list.xml
with
99 additions
and
82 deletions
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+
48
−
31
View file @
1bff2ec7
w
#! /usr/bin/python
#! /usr/bin/python
#******************************************************************************
#******************************************************************************
# OpenAirInterface
# OpenAirInterface
...
@@ -285,7 +285,7 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
...
@@ -285,7 +285,7 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
result
=
oai
.
send_expect_false
(
cmd
,
'
Match found
'
,
False
)
result
=
oai
.
send_expect_false
(
cmd
,
'
Match found
'
,
False
)
print
result
print
result
res
=
oai
.
send_recv
(
CleanUpAluLteBox
,
True
)
res
=
oai
.
send_recv
(
CleanUpAluLteBox
,
True
)
res
=
oai
.
send_recv
(
ExmimoRfStop
,
Tru
e
)
res
=
oai
.
send_recv
(
ExmimoRfStop
,
Fals
e
)
class
myThread
(
threading
.
Thread
):
class
myThread
(
threading
.
Thread
):
def
__init__
(
self
,
threadID
,
name
,
counter
):
def
__init__
(
self
,
threadID
,
name
,
counter
):
...
@@ -548,9 +548,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
...
@@ -548,9 +548,9 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
oai_EPC
.
connect
(
user
,
password
)
oai_EPC
.
connect
(
user
,
password
)
res
=
oai_eNB
.
send_recv
(
cmd
)
res
=
oai_eNB
.
send_recv
(
cmd
)
cleanOldPrograms
(
oai_eNB
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
#
cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
cleanOldPrograms
(
oai_UE
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
#
cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
cleanOldPrograms
(
oai_EPC
,
oldprogramList
,
CleanUpAluLteBox
,
ExmimoRfStop
)
#
cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop)
logdir_eNB
=
logdirOAI5GRepo
+
'
/cmake_targets/autotests/log/
'
+
testcasename
logdir_eNB
=
logdirOAI5GRepo
+
'
/cmake_targets/autotests/log/
'
+
testcasename
logdir_UE
=
logdirOAI5GRepo
+
'
/cmake_targets/autotests/log/
'
+
testcasename
logdir_UE
=
logdirOAI5GRepo
+
'
/cmake_targets/autotests/log/
'
+
testcasename
logdir_EPC
=
logdirOpenaircnRepo
+
'
/TEST/autotests/log/
'
+
testcasename
logdir_EPC
=
logdirOpenaircnRepo
+
'
/TEST/autotests/log/
'
+
testcasename
...
@@ -616,13 +616,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
...
@@ -616,13 +616,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
task_eNB
=
task_eNB
+
'
env |grep OPENAIR
\n
'
+
'
array_exec_pid=()
\n
'
task_eNB
=
task_eNB
+
'
env |grep OPENAIR
\n
'
+
'
array_exec_pid=()
\n
'
if
eNB_pre_exec
!=
""
:
if
eNB_pre_exec
!=
""
:
task_eNB
=
task_eNB
+
'
(
'
+
eNB_pre_exec
+
'
'
+
eNB_pre_exec_args
+
'
) >
'
+
logfile_pre_exec_eNB
+
'
2>&1
\n
'
task_eNB
=
task_eNB
+
'
(
date;
'
+
eNB_pre_exec
+
'
'
+
eNB_pre_exec_args
+
'
) >
'
+
logfile_pre_exec_eNB
+
'
2>&1
\n
'
if
eNB_main_exec
!=
""
:
if
eNB_main_exec
!=
""
:
task_eNB
=
task_eNB
+
'
(
'
+
addsudo
(
eNB_main_exec
+
'
'
+
eNB_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_eNB
+
'
2>&1 &
\n
'
task_eNB
=
task_eNB
+
'
(
date;
'
+
addsudo
(
eNB_main_exec
+
'
'
+
eNB_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_eNB
+
'
2>&1 &
\n
'
task_eNB
=
task_eNB
+
'
array_exec_pid+=($!)
\n
'
task_eNB
=
task_eNB
+
'
array_exec_pid+=($!)
\n
'
task_eNB
=
task_eNB
+
'
echo eNB_main_exec PID = $!
\n
'
task_eNB
=
task_eNB
+
'
echo eNB_main_exec PID = $!
\n
'
if
eNB_traffic_exec
!=
""
:
if
eNB_traffic_exec
!=
""
:
task_eNB
=
task_eNB
+
'
(
'
+
eNB_traffic_exec
+
'
'
+
eNB_traffic_exec_args
+
'
) >
'
+
logfile_traffic_eNB
+
'
2>&1 &
\n
'
task_eNB
=
task_eNB
+
'
(
date;
'
+
eNB_traffic_exec
+
'
'
+
eNB_traffic_exec_args
+
'
) >
'
+
logfile_traffic_eNB
+
'
2>&1 &
\n
'
task_eNB
=
task_eNB
+
'
array_exec_pid+=($!)
\n
'
task_eNB
=
task_eNB
+
'
array_exec_pid+=($!)
\n
'
task_eNB
=
task_eNB
+
'
echo eNB_traffic_exec PID = $!
\n
'
task_eNB
=
task_eNB
+
'
echo eNB_traffic_exec PID = $!
\n
'
#terminate the eNB test case after timeout_cmd seconds
#terminate the eNB test case after timeout_cmd seconds
...
@@ -662,13 +662,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
...
@@ -662,13 +662,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
task_UE
=
task_UE
+
'
source cmake_targets/tools/build_helper
\n
'
task_UE
=
task_UE
+
'
source cmake_targets/tools/build_helper
\n
'
task_UE
=
task_UE
+
'
env |grep OPENAIR
\n
'
task_UE
=
task_UE
+
'
env |grep OPENAIR
\n
'
if
UE_pre_exec
!=
""
:
if
UE_pre_exec
!=
""
:
task_UE
=
task_UE
+
'
(
'
+
UE_pre_exec
+
'
'
+
UE_pre_exec_args
+
'
) >
'
+
logfile_pre_exec_UE
+
'
2>&1
\n
'
task_UE
=
task_UE
+
'
(
date;
'
+
UE_pre_exec
+
'
'
+
UE_pre_exec_args
+
'
) >
'
+
logfile_pre_exec_UE
+
'
2>&1
\n
'
if
UE_main_exec
!=
""
:
if
UE_main_exec
!=
""
:
task_UE
=
task_UE
+
'
(
'
+
addsudo
(
UE_main_exec
+
'
'
+
UE_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_UE
+
'
2>&1 &
\n
'
task_UE
=
task_UE
+
'
(
date;
'
+
addsudo
(
UE_main_exec
+
'
'
+
UE_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_UE
+
'
2>&1 &
\n
'
task_UE
=
task_UE
+
'
array_exec_pid+=($!)
\n
'
task_UE
=
task_UE
+
'
array_exec_pid+=($!)
\n
'
task_UE
=
task_UE
+
'
echo UE_main_exec PID = $!
\n
'
task_UE
=
task_UE
+
'
echo UE_main_exec PID = $!
\n
'
if
UE_traffic_exec
!=
""
:
if
UE_traffic_exec
!=
""
:
task_UE
=
task_UE
+
'
(
'
+
UE_traffic_exec
+
'
'
+
UE_traffic_exec_args
+
'
) >
'
+
logfile_traffic_UE
+
'
2>&1 &
\n
'
task_UE
=
task_UE
+
'
(
date;
'
+
UE_traffic_exec
+
'
'
+
UE_traffic_exec_args
+
'
) >
'
+
logfile_traffic_UE
+
'
2>&1 &
\n
'
task_UE
=
task_UE
+
'
array_exec_pid+=($!)
\n
'
task_UE
=
task_UE
+
'
array_exec_pid+=($!)
\n
'
task_UE
=
task_UE
+
'
echo UE_traffic_exec PID = $!
\n
'
task_UE
=
task_UE
+
'
echo UE_traffic_exec PID = $!
\n
'
#terminate the UE test case after timeout_cmd seconds
#terminate the UE test case after timeout_cmd seconds
...
@@ -708,17 +708,17 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
...
@@ -708,17 +708,17 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
task_EPC
=
task_EPC
+
'
cd
'
+
logdirOpenaircnRepo
+
'
\n
'
task_EPC
=
task_EPC
+
'
cd
'
+
logdirOpenaircnRepo
+
'
\n
'
task_EPC
=
task_EPC
+
'
source BUILD/TOOLS/build_helper
\n
'
task_EPC
=
task_EPC
+
'
source BUILD/TOOLS/build_helper
\n
'
if
EPC_pre_exec
!=
""
:
if
EPC_pre_exec
!=
""
:
task_EPC
=
task_EPC
+
'
(
'
+
EPC_pre_exec
+
'
'
+
EPC_pre_exec_args
+
'
) >
'
+
logfile_pre_exec_EPC
+
'
2>&1
\n
'
task_EPC
=
task_EPC
+
'
(
date;
'
+
EPC_pre_exec
+
'
'
+
EPC_pre_exec_args
+
'
) >
'
+
logfile_pre_exec_EPC
+
'
2>&1
\n
'
if
HSS_main_exec
!=
""
:
if
HSS_main_exec
!=
""
:
task_EPC
=
task_EPC
+
'
(
'
+
addsudo
(
HSS_main_exec
+
'
'
+
HSS_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_HSS
+
'
2>&1 &
\n
'
task_EPC
=
task_EPC
+
'
(
date;
'
+
addsudo
(
HSS_main_exec
+
'
'
+
HSS_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_HSS
+
'
2>&1 &
\n
'
task_EPC
=
task_EPC
+
'
array_exec_pid+=($!)
\n
'
task_EPC
=
task_EPC
+
'
array_exec_pid+=($!)
\n
'
task_EPC
=
task_EPC
+
'
echo HSS_main_exec PID = $!
\n
'
task_EPC
=
task_EPC
+
'
echo HSS_main_exec PID = $!
\n
'
if
EPC_main_exec
!=
""
:
if
EPC_main_exec
!=
""
:
task_EPC
=
task_EPC
+
'
(
'
+
addsudo
(
EPC_main_exec
+
'
'
+
EPC_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_EPC
+
'
2>&1 &
\n
'
task_EPC
=
task_EPC
+
'
(
date;
'
+
addsudo
(
EPC_main_exec
+
'
'
+
EPC_main_exec_args
,
mypassword
)
+
'
) >
'
+
logfile_exec_EPC
+
'
2>&1 &
\n
'
task_EPC
=
task_EPC
+
'
array_exec_pid+=($!)
\n
'
task_EPC
=
task_EPC
+
'
array_exec_pid+=($!)
\n
'
task_EPC
=
task_EPC
+
'
echo EPC_main_exec PID = $!
\n
'
task_EPC
=
task_EPC
+
'
echo EPC_main_exec PID = $!
\n
'
if
EPC_traffic_exec
!=
""
:
if
EPC_traffic_exec
!=
""
:
task_EPC
=
task_EPC
+
'
(
'
+
EPC_traffic_exec
+
'
'
+
EPC_traffic_exec_args
+
'
) >
'
+
logfile_traffic_EPC
+
'
2>&1 &
\n
'
task_EPC
=
task_EPC
+
'
(
date;
'
+
EPC_traffic_exec
+
'
'
+
EPC_traffic_exec_args
+
'
) >
'
+
logfile_traffic_EPC
+
'
2>&1 &
\n
'
task_EPC
=
task_EPC
+
'
array_exec_pid+=($!)
\n
'
task_EPC
=
task_EPC
+
'
array_exec_pid+=($!)
\n
'
task_EPC
=
task_EPC
+
'
echo EPC_traffic_exec PID = $!
\n
'
task_EPC
=
task_EPC
+
'
echo EPC_traffic_exec PID = $!
\n
'
#terminate the EPC test case after timeout_cmd seconds
#terminate the EPC test case after timeout_cmd seconds
...
@@ -882,6 +882,7 @@ dlsim=0
...
@@ -882,6 +882,7 @@ dlsim=0
localshell
=
0
localshell
=
0
is_compiled
=
0
is_compiled
=
0
timeout
=
2000
timeout
=
2000
GitOAI5GRepoBranch
=
''
xmlInputFile
=
"
./test_case_list.xml
"
xmlInputFile
=
"
./test_case_list.xml
"
NFSResultsDir
=
'
/mnt/sradio
'
NFSResultsDir
=
'
/mnt/sradio
'
cleanupOldProgramsScript
=
'
$OPENAIR_DIR/cmake_targets/autotests/tools/remove_old_programs.bash
'
cleanupOldProgramsScript
=
'
$OPENAIR_DIR/cmake_targets/autotests/tools/remove_old_programs.bash
'
...
@@ -928,6 +929,9 @@ while i < len (sys.argv):
...
@@ -928,6 +929,9 @@ while i < len (sys.argv):
i
=
i
+
1
i
=
i
+
1
elif
arg
==
'
-c
'
:
elif
arg
==
'
-c
'
:
cleanUpRemoteMachines
=
True
cleanUpRemoteMachines
=
True
elif
arg
==
'
-5GRepoBranch
'
:
GitOAI5GRepoBranch
=
sys
.
argv
[
i
+
1
]
i
=
i
+
1
elif
arg
==
'
-h
'
:
elif
arg
==
'
-h
'
:
print
"
-d: low debug level
"
print
"
-d: low debug level
"
print
"
-dd: high debug level
"
print
"
-dd: high debug level
"
...
@@ -938,6 +942,7 @@ while i < len (sys.argv):
...
@@ -938,6 +942,7 @@ while i < len (sys.argv):
print
"
-w: set the password for ssh to localhost
"
print
"
-w: set the password for ssh to localhost
"
print
"
-l: use local shell instead of ssh connection
"
print
"
-l: use local shell instead of ssh connection
"
print
"
-t: set the time out in second for commands
"
print
"
-t: set the time out in second for commands
"
print
"
-5GRepoBranch: Branch for OAI 5G Repository to run tests (overrides the branch in test_case_list.xml)
"
sys
.
exit
()
sys
.
exit
()
else
:
else
:
print
"
Unrecongnized Option: <
"
+
arg
+
"
>. Use -h to see valid options
"
print
"
Unrecongnized Option: <
"
+
arg
+
"
>. Use -h to see valid options
"
...
@@ -995,7 +1000,10 @@ MachineList = xmlRoot.findtext('MachineList',default='')
...
@@ -995,7 +1000,10 @@ MachineList = xmlRoot.findtext('MachineList',default='')
NFSResultsShare
=
xmlRoot
.
findtext
(
'
NFSResultsShare
'
,
default
=
''
)
NFSResultsShare
=
xmlRoot
.
findtext
(
'
NFSResultsShare
'
,
default
=
''
)
GitOpenaircnRepo
=
xmlRoot
.
findtext
(
'
GitOpenair-cnRepo
'
,
default
=
''
)
GitOpenaircnRepo
=
xmlRoot
.
findtext
(
'
GitOpenair-cnRepo
'
,
default
=
''
)
GitOAI5GRepo
=
xmlRoot
.
findtext
(
'
GitOAI5GRepo
'
,
default
=
''
)
GitOAI5GRepo
=
xmlRoot
.
findtext
(
'
GitOAI5GRepo
'
,
default
=
''
)
GitOAI5GRepoBranch
=
xmlRoot
.
findtext
(
'
GitOAI5GRepoBranch
'
,
default
=
''
)
if
GitOAI5GRepoBranch
==
''
:
GitOAI5GRepoBranch
=
xmlRoot
.
findtext
(
'
GitOAI5GRepoBranch
'
,
default
=
''
)
GitOpenaircnRepoBranch
=
xmlRoot
.
findtext
(
'
GitOpenair-cnRepoBranch
'
,
default
=
''
)
GitOpenaircnRepoBranch
=
xmlRoot
.
findtext
(
'
GitOpenair-cnRepoBranch
'
,
default
=
''
)
CleanUpOldProgs
=
xmlRoot
.
findtext
(
'
CleanUpOldProgs
'
,
default
=
''
)
CleanUpOldProgs
=
xmlRoot
.
findtext
(
'
CleanUpOldProgs
'
,
default
=
''
)
CleanUpAluLteBox
=
xmlRoot
.
findtext
(
'
CleanUpAluLteBox
'
,
default
=
''
)
CleanUpAluLteBox
=
xmlRoot
.
findtext
(
'
CleanUpAluLteBox
'
,
default
=
''
)
...
@@ -1011,10 +1019,15 @@ print "GitOpenaircnRepoBranch = " + GitOpenaircnRepoBranch
...
@@ -1011,10 +1019,15 @@ print "GitOpenaircnRepoBranch = " + GitOpenaircnRepoBranch
print
"
NFSResultsShare =
"
+
NFSResultsShare
print
"
NFSResultsShare =
"
+
NFSResultsShare
cmd
=
"
git show-ref --heads -s
"
+
GitOAI5GRepoBranch
cmd
=
"
git show-ref --heads -s
"
+
GitOAI5GRepoBranch
GitOAI5GHeadVersion
=
subprocess
.
check_output
([
cmd
],
shell
=
True
)
GitOAI5GHeadVersion
=
subprocess
.
check_output
([
cmd
],
shell
=
True
)
GitOAI5GHeadVersion
=
GitOAI5GHeadVersion
.
replace
(
"
\n
"
,
""
)
print
"
GitOAI5GHeadVersion =
"
+
GitOAI5GHeadVersion
print
"
GitOAI5GHeadVersion =
"
+
GitOAI5GHeadVersion
print
"
CleanUpOldProgs =
"
+
CleanUpOldProgs
print
"
CleanUpOldProgs =
"
+
CleanUpOldProgs
print
"
Timeout_execution =
"
+
str
(
Timeout_execution
)
print
"
Timeout_execution =
"
+
str
(
Timeout_execution
)
if
GitOAI5GHeadVersion
==
''
:
print
"
Error getting the OAI5GBranch Head version...Exiting
"
sys
.
exit
()
MachineList
=
MachineList
.
split
()
MachineList
=
MachineList
.
split
()
MachineListGeneric
=
MachineListGeneric
.
split
()
MachineListGeneric
=
MachineListGeneric
.
split
()
...
@@ -1123,7 +1136,7 @@ for index in oai_list:
...
@@ -1123,7 +1136,7 @@ for index in oai_list:
#print oai_list[oai].send_recv('sudo su')
#print oai_list[oai].send_recv('sudo su')
#print oai_list[oai].send_recv('who am i')
#print oai_list[oai].send_recv('who am i')
#cleanUpPrograms(oai_list[oai]
#cleanUpPrograms(oai_list[oai]
cmd
=
'
mkdir -p
'
+
logdir
+
'
;
rm -fr
'
+
logdir
+
'
/*
'
cmd
=
'
sudo -S -E rm -fr
'
+
logdir
+
'
;
mkdir -p
'
+
logdir
result
=
oai_list
[
index
].
send_recv
(
cmd
)
result
=
oai_list
[
index
].
send_recv
(
cmd
)
setuplogfile
=
logdir
+
'
/setup_log_
'
+
MachineList
[
index
]
+
'
_.txt
'
setuplogfile
=
logdir
+
'
/setup_log_
'
+
MachineList
[
index
]
+
'
_.txt
'
...
@@ -1133,28 +1146,30 @@ for index in oai_list:
...
@@ -1133,28 +1146,30 @@ for index in oai_list:
#cmd = cmd + 'mkdir -p ' + logdir + '\n'
#cmd = cmd + 'mkdir -p ' + logdir + '\n'
cmd
=
cmd
+
'
cd
'
+
logdir
+
'
\n
'
cmd
=
cmd
+
'
cd
'
+
logdir
+
'
\n
'
cmd
=
cmd
+
'
git config --global http.sslVerify false
\n
'
cmd
=
cmd
+
'
git config --global http.sslVerify false
\n
'
cmd
=
cmd
+
'
git clone
'
+
GitOAI5GRepo
+
'
\n
'
cmd
=
cmd
+
'
git clone
--depth 1
'
+
GitOAI5GRepo
+
'
-b
'
+
GitOAI5GRepoBranch
+
'
\n
'
cmd
=
cmd
+
'
git clone
'
+
GitOpenaircnRepo
+
'
\n
'
cmd
=
cmd
+
'
git clone
'
+
GitOpenaircnRepo
+
'
-b
'
+
GitOpenaircnRepoBranch
+
'
\n
'
cmd
=
cmd
+
'
cd
'
+
logdirOAI5GRepo
+
'
\n
'
cmd
=
cmd
+
'
cd
'
+
logdirOAI5GRepo
+
'
\n
'
cmd
=
cmd
+
'
git checkout
'
+
GitOAI5GRepoBranch
+
'
\n
'
cmd
=
cmd
+
'
git checkout
'
+
GitOAI5GRepoBranch
+
'
\n
'
cmd
=
cmd
+
'
git checkout
'
+
GitOAI5GHeadVersion
+
'
\n
'
#cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion + '\n'
cmd
=
cmd
+
'
git_head = `git ls-remote |grep
\"
'
+
GitOAI5GRepoBranch
+
'
\"
'
cmd
=
cmd
+
'
git_head=`git ls-remote |grep
\'
'
+
GitOAI5GRepoBranch
+
'
\'
`
\n
'
cmd
=
cmd
+
'
git_head = ($git_head)
'
cmd
=
cmd
+
'
git_head=($git_head)
\n
'
cmd
=
cmd
+
'
git_head = ${git_head[0]}
'
cmd
=
cmd
+
'
git_head=${git_head[0]}
\n
'
cmd
=
cmd
+
'
if [
\"
$git_head
\"
!=
\"
'
+
GitOAI5GHeadVersion
+
'
\"
]; then echo
\"
error: Git openairinterface5g head version does not match
\"
; fi
'
cmd
=
cmd
+
'
echo
\"
GitOAI5GHeadVersion_remote = $git_head
\"
'
cmd
=
cmd
+
'
echo
\"
GitOAI5GHeadVersion_local =
'
+
GitOAI5GHeadVersion
+
'
\"
\n
'
cmd
=
cmd
+
'
if [
\"
$git_head
\"
!=
\"
'
+
GitOAI5GHeadVersion
+
'
\"
]; then echo
\"
error: Git openairinterface5g head version does not match
\"
; fi
\n
'
cmd
=
cmd
+
'
source oaienv
'
+
'
\n
'
cmd
=
cmd
+
'
source oaienv
'
+
'
\n
'
cmd
=
cmd
+
'
cd
'
+
logdirOpenaircnRepo
+
'
\n
'
cmd
=
cmd
+
'
cd
'
+
logdirOpenaircnRepo
+
'
\n
'
cmd
=
cmd
+
'
git checkout
'
+
GitOpenaircnRepoBranch
+
'
\n
'
cmd
=
cmd
+
'
git checkout
'
+
GitOpenaircnRepoBranch
+
'
\n
'
cmd
=
cmd
+
'
env |grep OPENAIR
'
+
'
\n
'
cmd
=
cmd
+
'
env |grep OPENAIR
'
+
'
\n
'
cmd
=
cmd
+
'
cd
'
+
logdir
+
'
\n
'
cmd
=
cmd
+
'
cd
'
+
logdir
+
'
\n
'
cmd
=
cmd
+
'
) >
'
+
setuplogfile
+
'
2>&1
'
cmd
=
cmd
+
'
) >
'
+
setuplogfile
+
'
2>&1
\n
'
#cmd = cmd + 'echo \' ' + cmd + '\' > ' + setup_script + ' 2>&1 \n '
#cmd = cmd + 'echo \' ' + cmd + '\' > ' + setup_script + ' 2>&1 \n '
#result = oai_list[index].send_recv(cmd, False, 300 )
#result = oai_list[index].send_recv(cmd, False, 300 )
write_file
(
setup_script
,
cmd
,
mode
=
"
w
"
)
write_file
(
setup_script
,
cmd
,
mode
=
"
w
"
)
tempThread
=
oaiThread
(
index
,
'
thread_setup_
'
+
str
(
index
)
+
'
_
'
+
MachineList
[
index
]
,
MachineList
[
index
]
,
user
,
pw
,
cmd
,
False
,
300
)
tempThread
=
oaiThread
(
index
,
'
thread_setup_
'
+
str
(
index
)
+
'
_
'
+
MachineList
[
index
]
,
MachineList
[
index
]
,
user
,
pw
,
cmd
,
False
,
300
)
threads_init_setup
.
append
(
tempThread
)
threads_init_setup
.
append
(
tempThread
)
tempThread
.
start
()
tempThread
.
start
()
#localfile = locallogdir + '/setup_log_' + MachineList[index] + '_.txt'
#localfile = locallogdir + '/setup_log_' + MachineList[index] + '_.txt'
#remotefile = logdir + '/setup_log_' + MachineList[index] + '_.txt'
#remotefile = logdir + '/setup_log_' + MachineList[index] + '_.txt'
...
@@ -1215,8 +1230,10 @@ for t in threads_init_setup:
...
@@ -1215,8 +1230,10 @@ for t in threads_init_setup:
paramList
.
append
(
{
"
operation
"
:
'
put
'
,
"
localfile
"
:
localfile
,
"
remotefile
"
:
remotefile
}
)
paramList
.
append
(
{
"
operation
"
:
'
put
'
,
"
localfile
"
:
localfile
,
"
remotefile
"
:
remotefile
}
)
sftp_log
=
os
.
path
.
expandvars
(
locallogdir
+
'
/sftp_module.log
'
)
sftp_log
=
os
.
path
.
expandvars
(
locallogdir
+
'
/sftp_module.log
'
)
sftp_module
(
user
,
pw
,
MachineList
[
index
],
port
,
paramList
,
sftp_log
)
sftp_module
(
user
,
pw
,
MachineList
[
index
],
port
,
paramList
,
sftp_log
)
index
=
index
+
1
cmd
=
'
cd
'
+
logdirOAI5GRepo
+
'
; source oaienv ; env|grep OPENAIR
\n
'
res
=
oai_list
[
index
].
send_recv
(
cmd
)
index
=
index
+
1
if
os
.
path
.
exists
(
localfile
)
==
0
:
if
os
.
path
.
exists
(
localfile
)
==
0
:
print
"
Setup log file <
"
+
localfile
+
"
> missing for machine <
"
+
MachineList
[
index
]
+
"
>. Please check the setup log files. Exiting now
"
print
"
Setup log file <
"
+
localfile
+
"
> missing for machine <
"
+
MachineList
[
index
]
+
"
>. Please check the setup log files. Exiting now
"
sys
.
exit
(
1
)
sys
.
exit
(
1
)
...
@@ -1224,14 +1241,14 @@ for t in threads_init_setup:
...
@@ -1224,14 +1241,14 @@ for t in threads_init_setup:
#Now we process all the test cases
#Now we process all the test cases
#Now we check if there was error in setup files
#Now we check if there was error in setup files
status
,
out
=
commands
.
getstatusoutput
(
'
grep
'
+
'
-il
\'
error
\'
'
+
locallogdir
+
'
/setup*
'
)
status
,
out
=
commands
.
getstatusoutput
(
'
grep
'
+
'
-il
\'
error
\'
'
+
locallogdir
+
'
/setup
_log
*
'
)
if
(
out
!=
''
)
:
if
(
out
!=
''
)
:
print
"
There is error in setup of machines
"
print
"
There is error in setup of machines
"
print
"
status =
"
+
str
(
status
)
+
"
\n
Check files for error =
"
+
out
print
"
status =
"
+
str
(
status
)
+
"
\n
Check files for error =
"
+
out
print
sys
.
exit
(
1
)
print
sys
.
exit
(
1
)
if
cleanUpRemoteMachines
==
True
:
if
cleanUpRemoteMachines
==
True
:
cleanOldProgramsAllMachines
(
oai_list
,
CleanOldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
cleanOldProgramsAllMachines
(
oai_list
,
Clean
Up
OldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
sys
.
exit
(
0
)
sys
.
exit
(
0
)
threadListGlobal
=
[]
threadListGlobal
=
[]
...
@@ -1244,7 +1261,7 @@ for testcase in testcaseList:
...
@@ -1244,7 +1261,7 @@ for testcase in testcaseList:
desc
=
testcase
.
findtext
(
'
desc
'
,
default
=
''
)
desc
=
testcase
.
findtext
(
'
desc
'
,
default
=
''
)
#print "Machine list top level = " + ','.join(MachineList)
#print "Machine list top level = " + ','.join(MachineList)
if
search_test_case_group
(
testcasename
,
testcasegroup
,
TestCaseExclusionList
)
==
True
:
if
search_test_case_group
(
testcasename
,
testcasegroup
,
TestCaseExclusionList
)
==
True
:
cleanOldProgramsAllMachines
(
oai_list
,
CleanOldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
cleanOldProgramsAllMachines
(
oai_list
,
Clean
Up
OldProgs
,
CleanUpAluLteBox
,
ExmimoRfStop
)
if
testcaseclass
==
'
lte-softmodem
'
:
if
testcaseclass
==
'
lte-softmodem
'
:
eNBMachine
=
testcase
.
findtext
(
'
eNB
'
,
default
=
''
)
eNBMachine
=
testcase
.
findtext
(
'
eNB
'
,
default
=
''
)
UEMachine
=
testcase
.
findtext
(
'
UE
'
,
default
=
''
)
UEMachine
=
testcase
.
findtext
(
'
UE
'
,
default
=
''
)
...
...
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/test_case_list.xml
+
51
−
51
View file @
1bff2ec7
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment