Commit 4fe15fee authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'develop-ci' into 'develop'

eNb CI Integration Job builds using temporary virtual machines in parallel

See merge request oai/openairinterface5g!327
parents a8f38477 5647150f
......@@ -8,8 +8,7 @@ pipeline {
disableConcurrentBuilds()
timestamps()
gitLabConnection('OAI GitLab')
//gitlabBuilds(builds: ["Build", "Test"])
gitlabBuilds(builds: ["Local Build"])
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Analysis with cppcheck"])
}
stages {
......@@ -22,6 +21,7 @@ pipeline {
// GitLab-Jenkins plugin integration is lacking to perform the merge by itself
// Doing it manually --> it may have merge conflicts
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
sh "zip -r -qq localZip.zip ."
// Running astyle options on the list of modified files by the merge request
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
......@@ -38,6 +38,7 @@ pipeline {
echo "Git Branch is ${GIT_BRANCH}"
echo "Git Commit is ${GIT_COMMIT}"
sh "zip -r -qq localZip.zip ."
// Running astyle options on all C/H files in the repository
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
sh "./ci-scripts/checkCodingFormattingRules.sh"
......@@ -45,17 +46,46 @@ pipeline {
}
}
}
stage ("Local Build") {
steps {
gitlabCommitStatus(name: "Local Build") {
sh "./ci-scripts/buildLocally.sh --workspace $WORKSPACE"
stage ("Variant Builds") {
parallel {
stage ("Analysis with cppcheck") {
steps {
gitlabCommitStatus(name: "Analysis with cppcheck") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck"
}
}
}
stage ("Build eNb-USRP") {
steps {
gitlabCommitStatus(name: "Build eNb-USRP") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-usrp"
}
}
}
stage ("Build basic simulator") {
steps {
gitlabCommitStatus(name: "Build basic-sim") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim"
}
}
}
stage ("Build physical simulators") {
steps {
gitlabCommitStatus(name: "Build phy-sim") {
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim"
}
}
}
}
post {
always {
script {
if(fileExists('archives/local_build_logs.zip')) {
archiveArtifacts artifacts: 'archives/local_build_logs.zip'
dir ('archives') {
sh "zip -r vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck"
}
if(fileExists('archives/vm_build_logs.zip')) {
archiveArtifacts artifacts: 'archives/vm_build_logs.zip'
}
if ("MERGE".equals(env.gitlabActionType)) {
sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
......
#!/bin/bash
function usage {
echo "OAI VM Build Check script"
echo " Original Author: Raphael Defosseux"
echo " Requirements:"
echo " -- uvtool uvtool-libvirt apt-cacher"
echo " -- xenial image already synced"
echo " Default:"
echo " -- eNB with USRP"
echo ""
echo "Usage:"
echo "------"
echo " buildOnVM.sh [OPTIONS]"
echo ""
echo "Options:"
echo "--------"
echo " --workspace #### OR -ws ####"
echo " Specify the workspace."
echo ""
echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo " Specify the variant to build."
echo ""
echo " --keep-vm-alive OR -k"
echo " Keep the VM alive after the build."
echo ""
echo " --help OR -h"
echo " Print this help message."
echo ""
}
function variant_usage {
echo "OAI VM Build Check script"
echo " Original Author: Raphael Defosseux"
echo ""
echo " --variant enb-usrp OR -v1"
echo " --variant basic-sim OR -v2"
echo " --variant phy-sim OR -v3"
echo " --variant cppcheck OR -v4"
echo ""
}
if [ $# -lt 1 ] || [ $# -gt 5 ]
then
echo "Syntax Error: not the correct number of arguments"
echo ""
usage
exit 1
fi
VM_NAME=ci-enb-usrp
ARCHIVES_LOC=enb_usrp
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4
BUILD_OPTIONS="--eNB -w USRP"
KEEP_VM_ALIVE=0
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-h|--help)
shift
usage
exit 0
;;
-ws|--workspace)
JENKINS_WKSP="$2"
shift
shift
;;
-k|--keep-vm-alive)
KEEP_VM_ALIVE=1
shift
;;
-v1)
VM_NAME=ci-enb-usrp
ARCHIVES_LOC=enb_usrp
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4
BUILD_OPTIONS="--eNB -w USRP"
shift
;;
-v2)
VM_NAME=ci-basic-sim
ARCHIVES_LOC=basic_sim
LOG_PATTERN=basic_simulator
NB_PATTERN_FILES=2
BUILD_OPTIONS="--basic-simulator"
shift
;;
-v3)
VM_NAME=ci-phy-sim
ARCHIVES_LOC=phy_sim
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=3
BUILD_OPTIONS="--phy_simulators"
shift
;;
-v4)
VM_NAME=ci-cppcheck
ARCHIVES_LOC=cppcheck
LOG_PATTERN=cppcheck.xml
NB_PATTERN_FILES=1
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
shift
;;
--variant)
variant="$2"
case $variant in
enb-usrp)
VM_NAME=ci-enb-usrp
ARCHIVES_LOC=enb_usrp
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=4
BUILD_OPTIONS="--eNB -w USRP"
;;
basic-sim)
VM_NAME=ci-basic-sim
ARCHIVES_LOC=basic_sim
LOG_PATTERN=basic_simulator
NB_PATTERN_FILES=2
BUILD_OPTIONS="--basic-simulator"
;;
phy-sim)
VM_NAME=ci-phy-sim
ARCHIVES_LOC=phy_sim
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=3
BUILD_OPTIONS="--phy_simulators"
;;
cppcheck)
VM_NAME=ci-cppcheck
ARCHIVES_LOC=cppcheck
LOG_PATTERN=cppcheck.xml
NB_PATTERN_FILES=1
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
;;
*)
echo ""
echo "Syntax Error: Invalid Variant option -> $variant"
echo ""
variant_usage
exit 1
esac
shift
shift
;;
*)
echo "Syntax Error: unknown option: $key"
echo ""
usage
exit 1
esac
done
if [ ! -f $JENKINS_WKSP/localZip.zip ]
then
echo "Missing localZip.zip file!"
exit 1
fi
if [ ! -f /etc/apt/apt.conf.d/01proxy ]
then
echo "Missing /etc/apt/apt.conf.d/01proxy file!"
echo "Is apt-cacher installed and configured?"
exit 1
fi
VM_CMDS=${VM_NAME}_cmds.txt
ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
echo "VM_NAME = $VM_NAME"
echo "VM_CMD_FILE = $VM_CMDS"
echo "JENKINS_WKSP = $JENKINS_WKSP"
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
echo "############################################################"
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
echo "############################################################"
uvt-kvm create $VM_NAME release=xenial --memory 2048 --cpu 4 --unsafe-caching --template ci-scripts/template-host.xml
echo "Waiting for VM to be started"
uvt-kvm wait $VM_NAME --insecure
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
echo "############################################################"
echo "Copying GIT repo into VM ($VM_NAME)"
echo "############################################################"
scp -o StrictHostKeyChecking=no localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu
scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$VM_IP_ADDR:/home/ubuntu
echo "############################################################"
echo "Running install and build script on VM ($VM_NAME)"
echo "############################################################"
echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
if [ "$VM_NAME" == "ci-cppcheck" ]
then
echo "echo \"sudo apt-get --yes --quiet install zip cppcheck \"" >> $VM_CMDS
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
echo "sudo apt-get --yes install zip cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
else
echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS
echo "sudo apt-get --yes install zip subversion libboost-dev > zip-install.txt 2>&1" >> $VM_CMDS
fi
echo "mkdir tmp" >> $VM_CMDS
echo "cd tmp" >> $VM_CMDS
echo "echo \"unzip -qq ../localZip.zip\"" >> $VM_CMDS
echo "unzip -qq ../localZip.zip" >> $VM_CMDS
if [ "$VM_NAME" == "ci-cppcheck" ]
then
echo "mkdir cmake_targets/log" >> $VM_CMDS
echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS
echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS
else
echo "echo \"source oaienv\"" >> $VM_CMDS
echo "source oaienv" >> $VM_CMDS
echo "cd cmake_targets/" >> $VM_CMDS
echo "mkdir log" >> $VM_CMDS
echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS
echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS
echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS
fi
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
echo "############################################################"
echo "Creating a tmp folder to store results and artifacts"
echo "############################################################"
if [ ! -d $JENKINS_WKSP/archives ]
then
mkdir $JENKINS_WKSP/archives
fi
if [ ! -d $ARCHIVES_LOC ]
then
mkdir $ARCHIVES_LOC
fi
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.txt $ARCHIVES_LOC
if [ "$VM_NAME" == "ci-cppcheck" ]
then
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/*.xml $ARCHIVES_LOC
fi
if [ $KEEP_VM_ALIVE -eq 0 ]
then
echo "############################################################"
echo "Destroying VM"
echo "############################################################"
uvt-kvm destroy $VM_NAME
ssh-keygen -R $VM_IP_ADDR
fi
rm -f $VM_CMDS
echo "############################################################"
echo "Checking build status"
echo "############################################################"
LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
STATUS=0
NB_FOUND_FILES=0
for FULLFILE in $LOG_FILES
do
if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
then
filename=$(basename -- "$FULLFILE")
if [ "$LOG_PATTERN" == ".Rel14.txt" ]
then
PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
fi
if [ "$LOG_PATTERN" == "basic_simulator" ]
then
PASS_PATTERN="lte-"
fi
if [ "$LOG_PATTERN" == "cppcheck.xml" ]
then
PASS_PATTERN="results version"
LOCAL_STAT=`egrep -c "$PASS_PATTERN" $FULLFILE`
else
LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
fi
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
fi
done
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
if [ $STATUS -eq 0 ]
then
echo "STATUS seems OK"
else
echo "STATUS failed?"
fi
exit $STATUS
......@@ -68,6 +68,177 @@ function trigger_usage {
echo ""
}
function details_table {
echo " <h4>$1</h4>" >> $3
echo " <table border = \"1\">" >> $3
echo " <tr bgcolor = \"#33CCFF\" >" >> $3
echo " <th>File</th>" >> $3
echo " <th>Line Number</th>" >> $3
echo " <th>Status</th>" >> $3
echo " <th>Message</th>" >> $3
echo " </tr>" >> $3
LIST_MESSAGES=`egrep "error:|warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto"`
COMPLETE_MESSAGE="start"
for MESSAGE in $LIST_MESSAGES
do
if [[ $MESSAGE == *"/home/ubuntu/tmp"* ]]
then
FILENAME=`echo $MESSAGE | sed -e "s#^/home/ubuntu/tmp/##" | awk -F ":" '{print $1}'`
LINENB=`echo $MESSAGE | awk -F ":" '{print $2}'`
if [ "$COMPLETE_MESSAGE" != "start" ]
then
COMPLETE_MESSAGE=`echo $COMPLETE_MESSAGE | sed -e "s#‘#'#g" -e "s#’#'#g"`
echo " <td>$COMPLETE_MESSAGE</td>" >> $3
echo " </tr>" >> $3
fi
echo " <tr>" >> $3
echo " <td>$FILENAME</td>" >> $3
echo " <td>$LINENB</td>" >> $3
else
if [[ $MESSAGE == *"warning:"* ]] || [[ $MESSAGE == *"error:"* ]]
then
MSGTYPE=`echo $MESSAGE | sed -e "s#:##g"`
echo " <td>$MSGTYPE</td>" >> $3
COMPLETE_MESSAGE=""
else
COMPLETE_MESSAGE=$COMPLETE_MESSAGE" "$MESSAGE
fi
fi
done
if [ "$COMPLETE_MESSAGE" != "start" ]
then
COMPLETE_MESSAGE=`echo $COMPLETE_MESSAGE | sed -e "s#‘#'#g" -e "s#’#'#g"`
echo " <td>$COMPLETE_MESSAGE</td>" >> $3
echo " </tr>" >> $3
fi
echo " </table>" >> $3
}
function summary_table_header {
echo " <h3>$1</h3>" >> ./build_results.html
echo " <table border = \"1\">" >> ./build_results.html
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
echo " <th>Element</th>" >> ./build_results.html
echo " <th>Status</th>" >> ./build_results.html
echo " <th>Nb Errors</th>" >> ./build_results.html
echo " <th>Nb Warnings</th>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
}
function summary_table_row {
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >$1</th>" >> ./build_results.html
if [ -f $2 ]
then
STATUS=`egrep -c "$3" $2`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
NB_ERRORS=`egrep -c "error:" $2`
if [ $NB_ERRORS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$NB_ERRORS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$NB_ERRORS</th>" >> ./build_results.html
fi
NB_WARNINGS=`egrep "warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | egrep -c "warning:"`
if [ $NB_WARNINGS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$NB_WARNINGS</th>" >> ./build_results.html
else
if [ $NB_WARNINGS -gt 20 ]
then
echo " <td bgcolor = \"red\" >$NB_WARNINGS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$NB_WARNINGS</th>" >> ./build_results.html
fi
fi
if [ $NB_ERRORS -ne 0 ] || [ $NB_WARNINGS -ne 0 ]
then
details_table "$1" $2 $4
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
}
function summary_table_footer {
echo " </table>" >> ./build_results.html
}
function sca_summary_table_header {
echo " <h3>$1</h3>" >> ./build_results.html
echo " <table border = \"1\">" >> ./build_results.html
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
echo " <th>Error / Warning Type</th>" >> ./build_results.html
echo " <th>Nb Errors</th>" >> ./build_results.html
echo " <th>Nb Warnings</th>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
echo "0" > ccp_error_cnt.txt
}
function sca_summary_table_row {
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >$2</td>" >> ./build_results.html
if [ -f $1 ]
then
NB_ERRORS=`egrep "severity=\"error\"" $1 | egrep -c "id=\"$3\""`
echo " <td>$NB_ERRORS</td>" >> ./build_results.html
echo " <td>N/A</td>" >> ./build_results.html
if [ -f ccp_error_cnt.txt ]
then
TOTAL_ERRORS=`cat ccp_error_cnt.txt`
TOTAL_ERRORS=$((TOTAL_ERRORS + NB_ERRORS))
echo $TOTAL_ERRORS > ccp_error_cnt.txt
fi
else
echo " <td>Unknown</td>" >> ./build_results.html
echo " <td>Unknown</td>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
}
function sca_summary_table_footer {
if [ -f $1 ]
then
NB_ERRORS=`egrep -c "severity=\"error\"" $1`
NB_WARNINGS=`egrep -c "severity=\"warning\"" $1`
if [ -f ccp_error_cnt.txt ]
then
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >Others</td>" >> ./build_results.html
TOTAL_ERRORS=`cat ccp_error_cnt.txt`
TOTAL_ERRORS=$((NB_ERRORS - TOTAL_ERRORS))
echo " <td>$TOTAL_ERRORS</td>" >> ./build_results.html
echo " <td>$NB_WARNINGS</td>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
rm -f ccp_error_cnt.txt
fi
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
echo " <th>Total</th>" >> ./build_results.html
echo " <th>$NB_ERRORS</th>" >> ./build_results.html
echo " <th>$NB_WARNINGS</th>" >> ./build_results.html
else
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
echo " <th>Total</th>" >> ./build_results.html
echo " <th>Unknown</th>" >> ./build_results.html
echo " <th>Unknown</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " </table>" >> ./build_results.html
echo " <p>Full details in zipped artifact (cppcheck/cppcheck.xml) </p>" >> ./build_results.html
echo " <p>Graphical Interface tool : <code>cppcheck-gui -l cppcheck/cppcheck.xml</code> </p>" >> ./build_results.html
}
jb_checker=0
mr_checker=0
pu_checker=0
......@@ -224,9 +395,23 @@ echo "<!DOCTYPE html>" > ./build_results.html
echo "<html class=\"no-js\" lang=\"en-US\">" >> ./build_results.html
echo "<head>" >> ./build_results.html
echo " <title>Build Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./build_results.html
echo " <base href = \"http://www.openairinterface.org/\" />" >> ./build_results.html
echo "</head>" >> ./build_results.html
echo "<body>" >> ./build_results.html
echo " <h1>Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</h1>" >> ./build_results.html
echo " <table style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
echo " <tr style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
echo " <td style=\"border-collapse: collapse; border: none;\">" >> ./build_results.html
echo " <a href=\"http://www.openairinterface.org/\">" >> ./build_results.html
echo " <img src=\"/wp-content/uploads/2016/03/cropped-oai_final_logo2.png\" alt=\"\" border=\"none\" height=50 width=150>" >> ./build_results.html
echo " </img>" >> ./build_results.html
echo " </a>" >> ./build_results.html
echo " </td>" >> ./build_results.html
echo " <td style=\"border-collapse: collapse; border: none; vertical-align: center;\">" >> ./build_results.html
echo " <b><font size = \"6\">Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</font></b>" >> ./build_results.html
echo " </td>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
echo " </table>" >> ./build_results.html
echo " <br>" >> ./build_results.html
echo " <table border = \"1\">" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./build_results.html
......@@ -289,245 +474,52 @@ then
echo " </table>" >> ./build_results.html
fi
echo " <h3>OAI Build eNb -- USRP option</h3>" >> ./build_results.html
echo " <table border = "1">" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <th>Element</th>" >> ./build_results.html
echo " <th>Status</th>" >> ./build_results.html
echo " <th>Nb Errors</th>" >> ./build_results.html
echo " <th>Nb Warnings</th>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >LTE SoftModem - Release 14</th>" >> ./build_results.html
if [ -f ./archives/enb_usrp/lte-softmodem.Rel14.txt ]
then
STATUS=`egrep -c "Built target lte-softmodem" ./archives/enb_usrp/lte-softmodem.Rel14.txt`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
STATUS=`egrep -c "error:" ./archives/enb_usrp/lte-softmodem.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
fi
STATUS=`egrep -c "warning:" ./archives/enb_usrp/lte-softmodem.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >Coding - Release 14</th>" >> ./build_results.html
if [ -f ./archives/enb_usrp/coding.Rel14.txt ]
then
STATUS=`egrep -c "Built target coding" ./archives/enb_usrp/coding.Rel14.txt`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
STATUS=`egrep -c "error:" ./archives/enb_usrp/coding.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
fi
STATUS=`egrep -c "warning:" ./archives/enb_usrp/coding.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >OAI USRP device if - Release 14</th>" >> ./build_results.html
if [ -f ./archives/enb_usrp/oai_usrpdevif.Rel14.txt ]
then
STATUS=`egrep -c "Built target oai_usrpdevif" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
STATUS=`egrep -c "error:" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
fi
STATUS=`egrep -c "warning:" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >Parameters Lib Config - Release 14</th>" >> ./build_results.html
if [ -f ./archives/enb_usrp/params_libconfig.Rel14.txt ]
then
STATUS=`egrep -c "Built target params_libconfig" ./archives/enb_usrp/params_libconfig.Rel14.txt`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
STATUS=`egrep -c "error:" ./archives/enb_usrp/params_libconfig.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
fi
STATUS=`egrep -c "warning:" ./archives/enb_usrp/params_libconfig.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " </table>" >> ./build_results.html
sca_summary_table_header "OAI Static Code Analysis with CPPCHECK"
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized variable" uninitvar
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized struct member" uninitStructMember
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory leak" memleak
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory is freed twice" doubleFree
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Resource leak" resourceLeak
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Possible null pointer dereference" nullPointer
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Array access out of bounds" arrayIndexOutOfBounds
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Buffer is accessed out of bounds" bufferAccessOutOfBounds
sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Expression depends on order of evaluation of side effects" unknownEvaluationOrder
sca_summary_table_footer ./archives/cppcheck/cppcheck.xml
# conf2uedata.Rel14.txt
# archives/basic_sim
summary_table_header "OAI Build eNB -- USRP option"
summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html
summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html
summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html
summary_table_footer
echo " <h3>OAI Build basic simulator option</h3>" >> ./build_results.html
echo " <table border = "1">" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <th>Element</th>" >> ./build_results.html
echo " <th>Status</th>" >> ./build_results.html
echo " <th>Nb Errors</th>" >> ./build_results.html
echo " <th>Nb Warnings</th>" >> ./build_results.html
echo " </tr>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >Basic Simulator eNb - Release 14</th>" >> ./build_results.html
if [ -f ./archives/basic_sim/basic_simulator_enb.txt ]
then
STATUS=`egrep -c "Built target lte-softmodem" ./archives/basic_sim/basic_simulator_enb.txt`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
STATUS=`egrep -c "error:" ./archives/basic_sim/basic_simulator_enb.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
fi
STATUS=`egrep -c "warning:" ./archives/basic_sim/basic_simulator_enb.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >Basic Simulator UE - Release 14</th>" >> ./build_results.html
if [ -f ./archives/basic_sim/basic_simulator_ue.txt ]
then
STATUS=`egrep -c "Built target lte-uesoftmodem" ./archives/basic_sim/basic_simulator_ue.txt`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
STATUS=`egrep -c "error:" ./archives/basic_sim/basic_simulator_ue.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
fi
STATUS=`egrep -c "warning:" ./archives/basic_sim/basic_simulator_ue.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " <tr>" >> ./build_results.html
echo " <td bgcolor = \"lightcyan\" >Conf 2 UE data - Release 14</th>" >> ./build_results.html
if [ -f ./archives/basic_sim/conf2uedata.Rel14.txt ]
then
STATUS=`egrep -c "Built target conf2uedata" ./archives/basic_sim/conf2uedata.Rel14.txt`
if [ $STATUS -eq 1 ]
then
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
fi
STATUS=`egrep -c "error:" ./archives/basic_sim/conf2uedata.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
fi
STATUS=`egrep -c "warning:" ./archives/basic_sim/conf2uedata.Rel14.txt`
if [ $STATUS -eq 0 ]
then
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
else
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
fi
else
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
fi
echo " </tr>" >> ./build_results.html
echo " </table>" >> ./build_results.html
summary_table_header "OAI Build basic simulator option"
summary_table_row "Basic Simulator eNb - Release 14" ./archives/basic_sim/basic_simulator_enb.txt "Built target lte-softmodem" ./basic_sim_row1.html
summary_table_row "Basic Simulator UE - Release 14" ./archives/basic_sim/basic_simulator_ue.txt "Built target lte-uesoftmodem" ./basic_sim_row2.html
summary_table_row "Conf 2 UE data - Release 14" ./archives/basic_sim/conf2uedata.Rel14.txt "Built target conf2uedata" ./basic_sim_row3.html
summary_table_footer
summary_table_header "OAI Build Physical simulators option"
summary_table_row "DL Simulator - Release 14" ./archives/phy_sim/dlsim.Rel14.txt "Built target dlsim" ./phy_sim_row1.html
summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt "Built target ulsim" ./phy_sim_row2.html
summary_table_row "Coding - Release 14" ./archives/phy_sim/coding.Rel14.txt "Built target coding" ./phy_sim_row3.html
summary_table_footer
echo " <h3>Details</h3>" >> ./build_results.html
for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
do
cat $DETAILS_TABLE >> ./build_results.html
done
for DETAILS_TABLE in `ls ./basic_sim_row*.html`
do
cat $DETAILS_TABLE >> ./build_results.html
done
for DETAILS_TABLE in `ls ./phy_sim_row*.html`
do
cat $DETAILS_TABLE >> ./build_results.html
done
rm -f ./enb_usrp_row*.html ./basic_sim_row*.html ./phy_sim_row*.html
echo "</body>" >> ./build_results.html
echo "</html>" >> ./build_results.html
......
<domain type='kvm'>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='host-passthrough'>
</cpu>
<devices>
<interface type='network'>
<source network='default'/>
<model type='virtio'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/3'/>
<target port='0'/>
</serial>
<graphics type='vnc' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video/>
</devices>
</domain>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment