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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Worker.N
openairinterface5G
Commits
a92fbe7c
Commit
a92fbe7c
authored
6 years ago
by
Raphael Defosseux
Browse files
Options
Downloads
Patches
Plain Diff
CI: Finalize phy-sim test status
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
6e28bfe6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci-scripts/Jenkinsfile-gitlab
+2
-1
2 additions, 1 deletion
ci-scripts/Jenkinsfile-gitlab
ci-scripts/runTestOnVM.sh
+61
-2
61 additions, 2 deletions
ci-scripts/runTestOnVM.sh
with
63 additions
and
3 deletions
ci-scripts/Jenkinsfile-gitlab
+
2
−
1
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'
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
ci-scripts/runTestOnVM.sh
+
61
−
2
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
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