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
8ffaca89
Commit
8ffaca89
authored
9 years ago
by
Rohit Gupta
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature-34-test_framework' into develop
parents
be2b9d41
7cc2a5cd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+2
-2
2 additions, 2 deletions
.gitlab-ci.yml
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+13
-3
13 additions, 3 deletions
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
with
15 additions
and
5 deletions
.gitlab-ci.yml
+
2
−
2
View file @
8ffaca89
...
@@ -21,8 +21,8 @@ job1:
...
@@ -21,8 +21,8 @@ job1:
-
echo $NFS_TEST_RESULTS_DIR
-
echo $NFS_TEST_RESULTS_DIR
-
echo $EXTERNAL_SHARE_RESULTS_DIR
-
echo $EXTERNAL_SHARE_RESULTS_DIR
-
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
-
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
-
python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
-
python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS
$OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP"
>& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
-
python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g $OAI_TEST_CASE_GROUP >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
-
python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g
"
$OAI_TEST_CASE_GROUP
"
>& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
-
mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log
-
mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log
-
mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log
-
mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log
-
sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
-
sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
...
...
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+
13
−
3
View file @
8ffaca89
...
@@ -63,6 +63,7 @@ sys.path.append('/opt/ssh')
...
@@ -63,6 +63,7 @@ sys.path.append('/opt/ssh')
import
ssh
import
ssh
from
ssh
import
SSHSession
from
ssh
import
SSHSession
import
argparse
# \brief write a string to a file
# \brief write a string to a file
# \param filename name of file
# \param filename name of file
...
@@ -1016,14 +1017,20 @@ locallogdir = openairdir_local + '/cmake_targets/autotests/log'
...
@@ -1016,14 +1017,20 @@ locallogdir = openairdir_local + '/cmake_targets/autotests/log'
MachineList
=
''
MachineList
=
''
MachineListGeneric
=
''
MachineListGeneric
=
''
flag_remove_logdir
=
False
flag_remove_logdir
=
False
i
=
1
flag_start_testcase
=
False
print
"
Number of arguments argc =
"
+
str
(
len
(
sys
.
argv
))
print
"
Number of arguments argc =
"
+
str
(
len
(
sys
.
argv
))
for
index
in
range
(
1
,
len
(
sys
.
argv
)
):
print
"
argv_
"
+
str
(
index
)
+
"
:
"
+
sys
.
argv
[
index
]
i
=
1
while
i
<
len
(
sys
.
argv
):
while
i
<
len
(
sys
.
argv
):
arg
=
sys
.
argv
[
i
]
arg
=
sys
.
argv
[
i
]
if
arg
==
'
-r
'
:
if
arg
==
'
-r
'
:
flag_remove_logdir
=
True
flag_remove_logdir
=
True
elif
arg
==
'
-s
'
:
flag_start_testcase
=
True
elif
arg
==
'
-g
'
:
elif
arg
==
'
-g
'
:
testcasegroup
=
sys
.
argv
[
i
+
1
].
replace
(
"
\"
"
,
""
)
testcasegroup
=
sys
.
argv
[
i
+
1
].
replace
(
"
\"
"
,
""
)
i
=
i
+
1
i
=
i
+
1
...
@@ -1064,6 +1071,7 @@ while i < len (sys.argv):
...
@@ -1064,6 +1071,7 @@ while i < len (sys.argv):
MachineListGeneric
=
MachineListGeneric
.
replace
(
"
\'
"
,
""
)
MachineListGeneric
=
MachineListGeneric
.
replace
(
"
\'
"
,
""
)
i
=
i
+
1
i
=
i
+
1
elif
arg
==
'
-h
'
:
elif
arg
==
'
-h
'
:
print
"
-s: This flag *MUST* be set to start the test cases
"
print
"
-r: Remove the log directory in autotests
"
print
"
-r: Remove the log directory in autotests
"
print
"
-g: Run test cases in a group
"
print
"
-g: Run test cases in a group
"
print
"
-c: Run cleanup scripts on remote machines and exit
"
print
"
-c: Run cleanup scripts on remote machines and exit
"
...
@@ -1102,7 +1110,9 @@ print "Killing zombie ssh sessions from earlier sessions..."
...
@@ -1102,7 +1110,9 @@ print "Killing zombie ssh sessions from earlier sessions..."
cmd
=
'
ps aux |grep
\"
/usr/bin/ssh -q -l guptar
\"
|tr -s
\"
\"
:|cut -f 2 -d :|xargs kill -9
'
cmd
=
'
ps aux |grep
\"
/usr/bin/ssh -q -l guptar
\"
|tr -s
\"
\"
:|cut -f 2 -d :|xargs kill -9
'
os
.
system
(
cmd
)
os
.
system
(
cmd
)
if
flag_start_testcase
==
False
:
print
"
You need to start the testcase by passing option -s. Use -h to see all options. Aborting now...
"
sys
.
exit
(
1
)
# get the oai object
# get the oai object
host
=
os
.
uname
()[
1
]
host
=
os
.
uname
()[
1
]
...
...
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