...
 
Commits (129)
cppcheck.xml
/*
* Copyright OAI Software Alliance - 2018
* Author Raphael Defosseux
* Comments : Proper comments
*/
#include <stdio.h>
typedef unsigned int oai_uint_t;
This diff is collapsed.
#!/bin/groovy
pipeline {
agent {
label 'caracal'
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
}
stages {
stage ('Retrieve latest from branch') {
steps {
script {
checkout([$class: 'GitSCM', branches: [[name: '*/scheduled_pipeline']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.eurecom.fr/oai/openair-ci-sandbox.git']]])
sh "git clean -x -d -ff"
sh "git log -n1"
}
}
}
}
}
#!/bin/groovy
pipeline {
agent {
label 'orion'
}
options {
disableConcurrentBuilds()
timestamps()
}
stages {
stage ("Verify") {
steps {
script {
def allParametersPresent = true
echo params.eNB_IPaddress
if (params.eNB_Repository == null) {
echo "missing git url parameter"
allParametersPresent = false
} else {
echo params.eNB_Repository
}
if (params.eNB_Branch == null) {
echo "missing git branch parameter"
allParametersPresent = false
} else {
echo params.eNB_Branch
}
if (params.eNB_CommitID == null) {
echo "missing git commit parameter"
allParametersPresent = false
} else {
echo params.eNB_CommitID
}
if (params.eNB_manageMergeRequest == null) {
echo "missing gitlab merge request manage boolean parameter"
allParametersPresent = false
} else {
if (params.eNB_manageMergeRequest) {
echo "Slave job manages GitLab merge process"
} else {
echo "Slave job DO NOT manage GitLab merge process"
}
}
if (allParametersPresent) {
echo "All parameters are present"
//deleteDir()
//sh "git clone ${params.eNB_Repository}"
//sh "cd openair-ci-sandbox; git checkout -f ${params.eNB_CommitID}"
} else {
echo "Some parameters are missing"
}
sh "echo ${JOB_NAME} > test-result.txt"
sh "echo ${BUILD_ID} >> test-result.txt"
sh "echo ${NODE_NAME} >> test-result.txt"
if (fileExists('test-result.txt')) {
archiveArtifacts artifacts: 'test-result.txt'
}
//sh "sh scripts/fail.sh"
}
}
}
}
}
# OAI is using a style that is similar to the Google style
--style=google
# long options can be written without the preceding '--'
# Convert tabs to spaces
convert-tabs
# Indentation is 2 spaces
indent=spaces=2
# Indent 'switch' blocks so that the 'case X:' statements are indented in the switch block.
indent-switches
# Indent C++ comments beginning in column one.
indent-col1-comments
# Pad empty lines around header blocks
break-blocks
delete-empty-lines
# Attach a pointer or reference operator (*, &, or ^) to the variable name (right)
align-pointer=name
# The code line length is 200 characters/columns
max-code-length=200
break-after-logical
lineend=linux
#!/bin/bash
if [ $# -eq 0 ]
then
NB_FILES_TO_FORMAT=`astyle --dry-run --options=scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted `
echo "common/utils/itti/assertions.h openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c openair1/SCHED_UE/phy_procedures_lte_ue.c openair1/SIMULATION/LTE_PHY/dlsim.c openair1/SIMULATION/LTE_PHY/ulsim.c openair2/ENB_APP/enb_config.c openair2/ENB_APP/flexran_agent_ran_api.c openair2/LAYER2/MAC/eNB_scheduler_phytest.c openair2/LAYER2/RLC/rlc.c openair2/RRC/LTE/rrc_eNB.c openair2/RRC/LTE/rrc_UE.c" > oai_warning_files_list.txt
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
exit 0
fi
if [ $# -eq 2 ]
then
# Merge request scenario
SOURCE_BRANCH=$1
echo "Source Branch is : $SOURCE_BRANCH"
TARGET_BRANCH=$2
echo "Target Branch is : $TARGET_BRANCH"
MERGE_COMMMIT=`git log -n1 | grep commit | sed -e "s@commit @@"`
echo "Merged Commit is : $MERGE_COMMMIT"
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
echo "Target Init is : $TARGET_INIT_COMMIT"
# Retrieve the list of modified files since the latest develop commit
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
NB_TO_FORMAT=0
for FULLFILE in $MODIFIED_FILES
do
echo $FULLFILE
filename=$(basename -- "$FULLFILE")
EXT="${filename##*.}"
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
then
TO_FORMAT=`astyle --dry-run --options=scripts/astyle-options.txt $FULLFILE | grep -c Formatted `
NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT))
fi
done
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
echo $NB_TO_FORMAT > ./oai_rules_result.txt
echo "common/utils/itti/assertions.h openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c openair1/SCHED_UE/phy_procedures_lte_ue.c openair1/SIMULATION/LTE_PHY/dlsim.c openair1/SIMULATION/LTE_PHY/ulsim.c openair2/ENB_APP/enb_config.c openair2/ENB_APP/flexran_agent_ran_api.c openair2/LAYER2/MAC/eNB_scheduler_phytest.c openair2/LAYER2/RLC/rlc.c openair2/RRC/LTE/rrc_eNB.c openair2/RRC/LTE/rrc_UE.c" > oai_warning_files_list.txt
exit 0
fi
if [ $# -ne 0 ] || [ $# -ne 2 ]
then
echo "Syntax error: $0 without any option will check all files in repository"
echo " or: $0 source-branch target-branch"
echo " will only check files that are pushed for a merge-request"
exit 1
fi
#!/bin/bash
if [ $# -ne 4 ]
then
echo "Syntax Error: $0 src-branch src-commit-id dest-branch dest-commit-id"
exit 1
fi
SOURCE_BRANCH=$1
echo "Source Branch is : $SOURCE_BRANCH"
SOURCE_COMMIT_ID=$2
echo "Source Commit ID is : $SOURCE_COMMIT_ID"
TARGET_BRANCH=$3
echo "Target Branch is : $TARGET_BRANCH"
TARGET_COMMIT_ID=$4
echo "Target Commit ID is : $TARGET_COMMIT_ID"
git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins"
git checkout -f $SOURCE_COMMIT_ID
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
#!/bin/bash
exit -1
<!DOCTYPE html>
<html class="no-js" lang="en-US">
<head>
<title>Test Results for TEMPLATE_JOB_NAME job build #TEMPLATE_BUILD_ID</title>
<base href = "http://www.openairinterface.org/" />
</head>
<body>
<table style="border-collapse: collapse; border: none;">
<tr style="border-collapse: collapse; border: none;">
<td style="border-collapse: collapse; border: none;">
<a href="http://www.openairinterface.org/">
<img src="/wp-content/uploads/2016/03/cropped-oai_final_logo2.png" alt="" border="none" height=50 width=150>
</img>
</a>
</td>
<td style="border-collapse: collapse; border: none; vertical-align: center;">
<b><font size = "6">Job Summary -- Job: TEMPLATE_JOB_NAME -- Build-ID: TEMPLATE_BUILD_ID</font></b>
</td>
</tr>
</table>
<br>
<table border = "1">
<tr>
<td bgcolor = "lightcyan" >GIT Repository</td>
<td><a href="TEMPLATE_GIT_URL">TEMPLATE_GIT_URL</a></td>
</tr>
<tr>
<td bgcolor = "lightcyan" >Branch</td>
<td>TEMPLATE_GIT_BRANCH</td>
</tr>
<tr>
<td bgcolor = "lightcyan" >Commit ID</td>
<td>TEMPLATE_GIT_COMMIT</td>
</tr>
<tr>
<td bgcolor = "lightcyan" >Job Build Time (UTC)</td>
<td>TEMPLATE_JOB_TIMESTAMP</td>
</tr>
</table>
</body>
</html>
/*
* Copyright OAI Software Alliance - 2018
* Author Raphael Defosseux
* Comments : Proper comments
*/
#include <stdio.h>
#include "test1.h"
int main()
{
oai_uint_t testId = 1;
printf ("Merge request\n");
printf ("Test%d\n", testId);
#ifdef _DEBUG
char a[10];
a[10] = 0;
#endif
return 0;
}
/*
* Copyright OAI Software Alliance - 2018
* Author Raphael Defosseux
* Comments : Proper comments
*/
#include <stdio.h>
int main() {
int testId = 2;
/*
* Proper Signed int usage
*/
printf ("Test #%d\n", testId);
return 0;
}
/*
* Copyright OAI Software Alliance - 2018
* Author Raphael Defosseux
* Comments : Proper comments
* another test file
*/
#include <stdio.h>
int main() {
int testId = 3;
/*
* Using proper formatter in printf
*/
printf ("Test #%d\n", testId);
return 0;
}