Commit 556d0045 authored by Mahesh K's avatar Mahesh K

Merge branch 'fork_develop_new' into 'nfapi_nr_merge'

Fork develop new

See merge request Aniq/openairinterface5g!6
parents 87105d77 c391b6b1
...@@ -10,9 +10,3 @@ targets/bin/ ...@@ -10,9 +10,3 @@ targets/bin/
# vscode # vscode
.vscode .vscode
# Tags for vim/global
GPATH
GRTAGS
GTAGS
tags
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
We want to make contributing to this project as easy and transparent as possible. We want to make contributing to this project as easy and transparent as possible.
Please refer to the steps described on our website: [How to contribute to OAI](https://www.openairinterface.org/?page_id=112)
1. Sign and return a Contributor License Agreement to OAI team. 1. Sign and return a Contributor License Agreement to OAI team.
2. We recommend that you provide us with a professional or student email address 2. Create an account on [Eurecom GitLab Server](https://gitlab.eurecom.fr).
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_in) 3. Provide the identifiant of this account to the OAI team (mailto:contact@openairinterface.org) so you have developer rights on this repository.
3. Provide the OAI team with the **username** of this account to (mailto:contact@openairinterface.org) ; we will give you the developer rights on this repository.
4. The policies are described in these wiki pages: [OAI Policies](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home) 4. The policies are described in these wiki pages: [OAI Policies](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home)
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers. - PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers.
- You can fork onto another hosting system. But we will NOT accept a merge request from a forked repository. - You can fork onto another hosting system. But we will NOT accept a merge request from a forked repository.
* This decision was made for the license reasons. * This decision was made for the license reasons.
* The Continuous Integration will reject your merge request. * The Continuous Integration will reject your merge request.
......
...@@ -21,7 +21,3 @@ The Regents of the University of California: BSD 3-Clause Licence. ...@@ -21,7 +21,3 @@ The Regents of the University of California: BSD 3-Clause Licence.
Niels Provos <provos@citi.umich.edu>: BSD 2-Clause Licence. Niels Provos <provos@citi.umich.edu>: BSD 2-Clause Licence.
## Credits for source code openair3/GTPV1-U/nw-gtpv1u: ##
Amit Chawre <http://www.amitchawre.net/contact.html>: BSD 2-Clause Licence.
r*.raw
enb_*.log enb_*.log
ue_*.log ue_*.log
ping_*.* ping_*.*
......
...@@ -30,14 +30,12 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { ...@@ -30,14 +30,12 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
} }
} }
def doRedHatBuild = false
def doFlexranCtrlTest = false def doFlexranCtrlTest = false
// Location of the executor node // Location of the executor node
def nodeExecutor = params.nodeExecutor def nodeExecutor = params.nodeExecutor
// VM Lockable resources
def vmResource = params.vmLockableResource
pipeline { pipeline {
agent { agent {
label nodeExecutor label nodeExecutor
...@@ -68,8 +66,7 @@ pipeline { ...@@ -68,8 +66,7 @@ pipeline {
"Test-IF4p5-TDD-Band38-Multi-RRU", "Test-IF4p5-TDD-Band38-Multi-RRU",
"Test-eNB-OAI-UE-FDD-Band7", "Test-eNB-OAI-UE-FDD-Band7",
"Test-Mono-FDD-Band13-X2-HO", "Test-Mono-FDD-Band13-X2-HO",
"Test-TDD-Band78-gNB-NR-UE", "Test-TDD-Band78-gNB-NR-UE"
"Test-OCP-FDD-Band7"
]) ])
ansiColor('xterm') ansiColor('xterm')
} }
...@@ -87,6 +84,21 @@ pipeline { ...@@ -87,6 +84,21 @@ pipeline {
echo "Platform is ${env.TESTPLATFORM_OWNER}" echo "Platform is ${env.TESTPLATFORM_OWNER}"
} }
if (params.RedHatRemoteServer == null) {
allParametersPresent = false
}
if (params.RedHatRemoteCredentials == null) {
allParametersPresent = false
}
if (params.RedHatWorkingPath == null) {
allParametersPresent = false
}
if (allParametersPresent) {
echo "Performing Red Hat Build"
doRedHatBuild = true
} else {
doRedHatBuild = false
}
if (params.FlexRanRtcGitLabRepository_Credentials != null) { if (params.FlexRanRtcGitLabRepository_Credentials != null) {
doFlexranCtrlTest = true doFlexranCtrlTest = true
} }
...@@ -162,81 +174,65 @@ pipeline { ...@@ -162,81 +174,65 @@ pipeline {
stage ("Start VM -- basic-sim") { stage ("Start VM -- basic-sim") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- gnb-usrp") { stage ("Start VM -- gnb-usrp") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- nr-ue-usrp") { stage ("Start VM -- nr-ue-usrp") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- enb-usrp") { stage ("Start VM -- enb-usrp") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- phy-sim") { stage ("Start VM -- phy-sim") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- enb-ethernet") { stage ("Start VM -- enb-ethernet") {
steps { steps {
lock (vmResource) { timeout (time: 5, unit: 'MINUTES') {
timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- ue-ethernet") { stage ("Start VM -- ue-ethernet") {
steps { steps {
lock (vmResource) { timeout (time: 5, unit: 'MINUTES') {
timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- cppcheck") { stage ("Start VM -- cppcheck") {
steps { steps {
lock (vmResource) { timeout (time: 5, unit: 'MINUTES') {
timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
...@@ -282,7 +278,7 @@ pipeline { ...@@ -282,7 +278,7 @@ pipeline {
steps { steps {
gitlabCommitStatus(name: "Build eNB-USRP") { gitlabCommitStatus(name: "Build eNB-USRP") {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
} }
} }
} }
...@@ -307,14 +303,33 @@ pipeline { ...@@ -307,14 +303,33 @@ pipeline {
} }
stage ("Build UE-ethernet") { stage ("Build UE-ethernet") {
steps { steps {
// This is typically the last one to finish.
lock (vmResource) {
gitlabCommitStatus(name: "Build UE-ethernet") { gitlabCommitStatus(name: "Build UE-ethernet") {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
} }
} }
} }
}
stage ("Build eNB-USRP on Red Hat") {
when {
expression {doRedHatBuild}
}
steps {
gitlabCommitStatus(name: "Build eNB-USRP-RHE") {
script {
try {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.RedHatRemoteCredentials}", usernameVariable: 'RH_Username', passwordVariable: 'RH_Password']
]) {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/buildOnRH.sh --workspace $WORKSPACE --job-name ${JOB_NAME} --build-id ${BUILD_ID} --remote-host ${params.RedHatRemoteServer} --remote-path ${params.RedHatWorkingPath} --remote-user-name ${RH_Username} --remote-password ${RH_Password}"
}
}
} catch (Exception e) {
echo "Red Hat build failed but we could keep running pipeline if all ubuntu-based build passed"
}
}
}
} }
} }
} }
...@@ -376,7 +391,6 @@ pipeline { ...@@ -376,7 +391,6 @@ pipeline {
stages { stages {
stage ("Test physical simulators") { stage ("Test physical simulators") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 90, unit: 'MINUTES') { timeout (time: 90, unit: 'MINUTES') {
try { try {
...@@ -388,7 +402,6 @@ pipeline { ...@@ -388,7 +402,6 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Build Flexran Controller") { stage ("Build Flexran Controller") {
...@@ -396,7 +409,6 @@ pipeline { ...@@ -396,7 +409,6 @@ pipeline {
expression {doFlexranCtrlTest} expression {doFlexranCtrlTest}
} }
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
try { try {
...@@ -406,12 +418,10 @@ pipeline { ...@@ -406,12 +418,10 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test basic simulator") { stage ("Test basic simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
...@@ -423,12 +433,10 @@ pipeline { ...@@ -423,12 +433,10 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test L1 simulator") { stage ("Test L1 simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
...@@ -440,14 +448,12 @@ pipeline { ...@@ -440,14 +448,12 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test RF simulator") { stage ("Test RF simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 40, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
gitlabCommitStatus(name: "Test RF-sim") { gitlabCommitStatus(name: "Test RF-sim") {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant rf-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant rf-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
...@@ -457,12 +463,10 @@ pipeline { ...@@ -457,12 +463,10 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test L2 simulator") { stage ("Test L2 simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
...@@ -474,14 +478,11 @@ pipeline { ...@@ -474,14 +478,11 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Destroy all Virtual Machines") { stage ("Destroy all Virtual Machines") {
steps { steps {
lock (vmResource) {
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
} }
} }
} }
...@@ -682,25 +683,6 @@ pipeline { ...@@ -682,25 +683,6 @@ pipeline {
} }
} }
} }
stage ("Test OAI OCP-eNB - FDD - Band 7 - B210") {
steps {
script {
triggerSlaveJob ('OCPeNB-FDD-Band7-B210', 'Test-OCP-FDD-Band7')
}
}
post {
always {
script {
finalizeSlaveJob('OCPeNB-FDD-Band7-B210')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
} }
post { post {
always { always {
......
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more # * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with # * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership. # * this work for additional information regarding copyright ownership.
......
...@@ -110,7 +110,7 @@ MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-sta ...@@ -110,7 +110,7 @@ MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-sta
NB_WARNINGS_FILES=0 NB_WARNINGS_FILES=0
# Retrieve list of warnings # Retrieve list of warnings
LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq` LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt archives/*/basic_simulator_*txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
echo "" echo ""
echo "List of files that have been modified by the Merge Request AND" echo "List of files that have been modified by the Merge Request AND"
......
...@@ -59,7 +59,7 @@ if [ $# -eq 0 ] ...@@ -59,7 +59,7 @@ if [ $# -eq 0 ]
then then
echo " ---- Checking the whole repository ----" echo " ---- Checking the whole repository ----"
echo "" echo ""
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted || true` NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted `
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT" echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
...@@ -67,17 +67,17 @@ then ...@@ -67,17 +67,17 @@ then
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define.txt awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define.txt
# Testing if explicit GNU GPL license banner # Testing if explicit GNU GPL license banner
egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . | egrep -v "openair3/NAS/COMMON/milenage.h" > files-w-gnu-gpl-license-banner.txt egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . > files-w-gnu-gpl-license-banner.txt
# Looking at exotic/suspect banner # Looking at exotic/suspect banner
LIST_OF_FILES_W_BANNER=`egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .` LIST_OF_FILES_W_BANNER=`egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
if [ -f ./files-w-suspect-banner.txt ]; then rm -f ./files-w-suspect-banner.txt; fi if [ -f ./files-w-suspect-banner.txt ]; then rm -f ./files-w-suspect-banner.txt; fi
for FILE in $LIST_OF_FILES_W_BANNER for FILE in $LIST_OF_FILES_W_BANNER
do do
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true` IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE || true` IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE || true` IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true` IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ] if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
...@@ -178,7 +178,7 @@ do ...@@ -178,7 +178,7 @@ do
EXT="${filename##*.}" EXT="${filename##*.}"
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ] if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
then then
TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted || true` TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted `
NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT)) NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT))
if [ $TO_FORMAT -ne 0 ] if [ $TO_FORMAT -ne 0 ]
then then
...@@ -186,24 +186,20 @@ do ...@@ -186,24 +186,20 @@ do
echo $FULLFILE >> ./oai_rules_result_list.txt echo $FULLFILE >> ./oai_rules_result_list.txt
fi fi
# Testing if explicit GNU GPL license banner # Testing if explicit GNU GPL license banner
GNU_EXCEPTION=`echo $FULLFILE | egrep -c "openair3/NAS/COMMON/milenage.h" || true` egrep -i "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
if [ $GNU_EXCEPTION -eq 0 ]
then
egrep -il "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
fi
# Looking at exotic/suspect banner # Looking at exotic/suspect banner
IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE || true` IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE`
if [ $IS_BANNER -ne 0 ] if [ $IS_BANNER -ne 0 ]
then then
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext" || true` IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE || true` IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE || true` IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE`
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_|openair3/NAS/COMMON/milenage.h" || true` IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ] if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ] if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
then then
echo $FULLFILE >> ./files-w-suspect-banner.txt echo $FILE >> ./files-w-suspect-banner.txt
fi fi
fi fi
fi fi
......
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