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
常顺宇
OpenXG-RAN
Commits
a92fbe7c
Commit
a92fbe7c
authored
Jun 28, 2018
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: Finalize phy-sim test status
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
6e28bfe6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
3 deletions
+63
-3
ci-scripts/Jenkinsfile-gitlab
ci-scripts/Jenkinsfile-gitlab
+2
-1
ci-scripts/runTestOnVM.sh
ci-scripts/runTestOnVM.sh
+61
-2
No files found.
ci-scripts/Jenkinsfile-gitlab
View file @
a92fbe7c
...
@@ -8,7 +8,7 @@ pipeline {
...
@@ -8,7 +8,7 @@ pipeline {
disableConcurrentBuilds()
disableConcurrentBuilds()
timestamps()
timestamps()
gitLabConnection('OAI GitLab')
gitLabConnection('OAI GitLab')
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck"])
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck"
, "Test phy-sim"
])
}
}
stages {
stages {
...
@@ -175,6 +175,7 @@ pipeline {
...
@@ -175,6 +175,7 @@ pipeline {
}
}
if(fileExists('archives/vm_tests_logs.zip')) {
if(fileExists('archives/vm_tests_logs.zip')) {
archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
archiveArtifacts artifacts: 'archives/*/test/results_autotests*.xml'
}
}
}
}
}
}
...
...
ci-scripts/runTestOnVM.sh
View file @
a92fbe7c
...
@@ -65,6 +65,7 @@ VM_NAME=ci-enb-usrp
...
@@ -65,6 +65,7 @@ VM_NAME=ci-enb-usrp
ARCHIVES_LOC
=
enb_usrp/test
ARCHIVES_LOC
=
enb_usrp/test
KEEP_VM_ALIVE
=
0
KEEP_VM_ALIVE
=
0
RUN_OPTIONS
=
"none"
RUN_OPTIONS
=
"none"
STATUS
=
0
while
[[
$#
-gt
0
]]
while
[[
$#
-gt
0
]]
do
do
...
@@ -205,6 +206,8 @@ else
...
@@ -205,6 +206,8 @@ else
echo
"
$RUN_OPTIONS
"
|
sed
-e
's@"@\\"@g'
-e
's@^@echo "@'
-e
's@$@"@'
>>
$VM_CMDS
echo
"
$RUN_OPTIONS
"
|
sed
-e
's@"@\\"@g'
-e
's@^@echo "@'
-e
's@$@"@'
>>
$VM_CMDS
echo
"
$RUN_OPTIONS
"
>>
$VM_CMDS
echo
"
$RUN_OPTIONS
"
>>
$VM_CMDS
echo
"cp /home/ubuntu/bc-install.txt log"
>>
$VM_CMDS
echo
"cp /home/ubuntu/bc-install.txt log"
>>
$VM_CMDS
echo
"cd log"
>>
$VM_CMDS
echo
"zip -r -qq tmp.zip *.* 0*"
>>
$VM_CMDS
ssh
-o
StrictHostKeyChecking
=
no ubuntu@
$VM_IP_ADDR
<
$VM_CMDS
ssh
-o
StrictHostKeyChecking
=
no ubuntu@
$VM_IP_ADDR
<
$VM_CMDS
...
@@ -216,7 +219,19 @@ else
...
@@ -216,7 +219,19 @@ else
then
then
rm
-Rf
$ARCHIVES_LOC
rm
-Rf
$ARCHIVES_LOC
fi
fi
scp
-rf
-o
StrictHostKeyChecking
=
no ubuntu@
$VM_IP_ADDR
:/home/ubuntu/tmp/cmake_targets/autotests/log
$ARCHIVES_LOC
mkdir
--parents
$ARCHIVES_LOC
scp
-o
StrictHostKeyChecking
=
no ubuntu@
$VM_IP_ADDR
:/home/ubuntu/tmp/cmake_targets/autotests/log/tmp.zip
$ARCHIVES_LOC
pushd
$ARCHIVES_LOC
unzip
-qq
-DD
tmp.zip
rm
tmp.zip
if
[
-f
results_autotests.xml
]
then
FUNCTION
=
`
echo
$VM_NAME
|
sed
-e
"s@
$VM_TEMPLATE
@@"
`
NEW_NAME
=
`
echo
"results_autotests.xml"
|
sed
-e
"s@results_autotests@results_autotests-
$FUNCTION
@"
`
mv
results_autotests.xml
$NEW_NAME
fi
popd
if
[
$KEEP_VM_ALIVE
-eq
0
]
if
[
$KEEP_VM_ALIVE
-eq
0
]
then
then
...
@@ -227,6 +242,50 @@ else
...
@@ -227,6 +242,50 @@ else
ssh-keygen
-R
$VM_IP_ADDR
ssh-keygen
-R
$VM_IP_ADDR
fi
fi
rm
-f
$VM_CMDS
rm
-f
$VM_CMDS
echo
"############################################################"
echo
"Checking build status"
echo
"############################################################"
LOG_FILES
=
`
ls
$ARCHIVES_LOC
/results_autotests
*
.xml
`
NB_FOUND_FILES
=
0
NB_RUNS
=
0
NB_FAILURES
=
0
for
FULLFILE
in
$LOG_FILES
do
TESTSUITES
=
`
egrep
"testsuite errors"
$FULLFILE
`
for
TESTSUITE
in
$TESTSUITES
do
if
[[
"
$TESTSUITE
"
==
*
"tests="
*
]]
then
RUNS
=
`
echo
$TESTSUITE
|
awk
'BEGIN{FS="="}{print $2}END{}'
|
sed
-e
"s@'@@g"
`
NB_RUNS
=
$((
NB_RUNS
+
RUNS
))
fi
if
[[
"
$TESTSUITE
"
==
*
"failures="
*
]]
then
FAILS
=
`
echo
$TESTSUITE
|
awk
'BEGIN{FS="="}{print $2}END{}'
|
sed
-e
"s@'@@g"
`
NB_FAILURES
=
$((
NB_FAILURES
+
FAILS
))
fi
done
NB_FOUND_FILES
=
$((
NB_FOUND_FILES
+
1
))
done
echo
"NB_FOUND_FILES =
$NB_FOUND_FILES
"
echo
"NB_RUNS =
$NB_RUNS
"
echo
"NB_FAILURES =
$NB_FAILURES
"
if
[
$NB_FOUND_FILES
-eq
0
]
;
then
STATUS
=
-1
;
fi
if
[
$NB_RUNS
-eq
0
]
;
then
STATUS
=
-1
;
fi
if
[
$NB_FAILURES
-ne
0
]
;
then
STATUS
=
-1
;
fi
if
[
$STATUS
-eq
0
]
then
echo
"STATUS seems OK"
else
echo
"STATUS failed?"
fi
fi
fi
exit
0
exit
$STATUS
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