mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-16 06:00:28 +00:00
Compare commits
329 Commits
develop-Fe
...
v1.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c495cfdcb | ||
|
|
8fc1a61e6a | ||
|
|
fd5238e478 | ||
|
|
7fd089fe3f | ||
|
|
92076ea8a8 | ||
|
|
c1364f0117 | ||
|
|
03d404a6ef | ||
|
|
28a1fcde2e | ||
|
|
e85bd10307 | ||
|
|
7c63d0d551 | ||
|
|
fcb16521f3 | ||
|
|
f7a2965b96 | ||
|
|
05f395b25b | ||
|
|
f7938a4b24 | ||
|
|
c81820b224 | ||
|
|
f591427e6e | ||
|
|
1b2ea38845 | ||
|
|
c1ed6685ea | ||
|
|
1b14813a76 | ||
|
|
8c388b7c46 | ||
|
|
f031fda986 | ||
|
|
2d7c9734fd | ||
|
|
bb4a1f9a75 | ||
|
|
64144a8442 | ||
|
|
298de921a3 | ||
|
|
5e35d90974 | ||
|
|
5aeb00d33d | ||
|
|
1d86c8a95a | ||
|
|
1cb484f1b6 | ||
|
|
d171e18c1e | ||
|
|
974167b51c | ||
|
|
e329ba787c | ||
|
|
8260607ed6 | ||
|
|
e13b29d38a | ||
|
|
9fbc3e8620 | ||
|
|
9d0c70c9fe | ||
|
|
f43bbe670b | ||
|
|
458a50fb36 | ||
|
|
d0190899d2 | ||
|
|
4075fbc86a | ||
|
|
24bde5d635 | ||
|
|
eb92fa917b | ||
|
|
d62f8f9349 | ||
|
|
c5f17fa7fd | ||
|
|
49b4e4128d | ||
|
|
cbb21c108e | ||
|
|
a2307ebc11 | ||
|
|
161aeebaaa | ||
|
|
bf25aba227 | ||
|
|
c12dfe19db | ||
|
|
6bb7674877 | ||
|
|
d73685933c | ||
|
|
4e4e542f50 | ||
|
|
bddb945889 | ||
|
|
fd97183944 | ||
|
|
7d715cd4bc | ||
|
|
1de4a57e7b | ||
|
|
7308f1da98 | ||
|
|
e179213be0 | ||
|
|
0019707cd1 | ||
|
|
942a5cf2db | ||
|
|
0a7934d1fb | ||
|
|
95746536c0 | ||
|
|
ce7067c7b8 | ||
|
|
655508a686 | ||
|
|
29064e6d49 | ||
|
|
a975014beb | ||
|
|
718f754c07 | ||
|
|
824f98b125 | ||
|
|
1e0d816131 | ||
|
|
4753f92bad | ||
|
|
80ac9ece17 | ||
|
|
b3f1440249 | ||
|
|
001163f63b | ||
|
|
8c2bb9693a | ||
|
|
81e81ab469 | ||
|
|
c76bbd13f1 | ||
|
|
3b915b37ff | ||
|
|
77f2879620 | ||
|
|
37da1d72b7 | ||
|
|
f3488567c3 | ||
|
|
c5a2be4c7e | ||
|
|
70ed71a076 | ||
|
|
ee9f8d8fa7 | ||
|
|
101ed01277 | ||
|
|
6c41b6d77a | ||
|
|
df6cc9efc0 | ||
|
|
d318ed26cd | ||
|
|
a12ccf1db3 | ||
|
|
aacbd7577c | ||
|
|
25b60e0c95 | ||
|
|
70711c3469 | ||
|
|
89229ac59a | ||
|
|
1b659b936c | ||
|
|
5dc5f6bc79 | ||
|
|
5832204fe1 | ||
|
|
b805cfc628 | ||
|
|
5012faa105 | ||
|
|
81a4d5d3be | ||
|
|
a36c1e4c62 | ||
|
|
e6ef20e1f9 | ||
|
|
b474d4a7f3 | ||
|
|
41343e7119 | ||
|
|
1c025c2dfa | ||
|
|
fb5739dcf7 | ||
|
|
84d66914f0 | ||
|
|
f88a43ca60 | ||
|
|
e7f0701aa7 | ||
|
|
5d0fe4cea7 | ||
|
|
0db0249057 | ||
|
|
d109ffa112 | ||
|
|
0d67854ce0 | ||
|
|
f14023ec16 | ||
|
|
b25a592ced | ||
|
|
6aadf8312a | ||
|
|
15314aebff | ||
|
|
c7e611ead1 | ||
|
|
4d934dacfb | ||
|
|
fb5201ba97 | ||
|
|
814b967cce | ||
|
|
131986282a | ||
|
|
5bf45e014a | ||
|
|
f8ccd284a0 | ||
|
|
4f0fd0612a | ||
|
|
55732deb80 | ||
|
|
4fdccd3b4d | ||
|
|
b89f9284dd | ||
|
|
ed61d774f6 | ||
|
|
e77d910398 | ||
|
|
0fb80c0cff | ||
|
|
cf07c4d394 | ||
|
|
d082b50896 | ||
|
|
1094835db1 | ||
|
|
c194956da3 | ||
|
|
df5fe4fffd | ||
|
|
00c230ba47 | ||
|
|
c7dbada527 | ||
|
|
e6cd6ba21f | ||
|
|
117e2a145e | ||
|
|
a86ca81541 | ||
|
|
0f0665e9e7 | ||
|
|
884d4b631d | ||
|
|
3df8f96bba | ||
|
|
682be3e2b4 | ||
|
|
220080741e | ||
|
|
382981b757 | ||
|
|
2f8c3d6eaa | ||
|
|
00f4890b14 | ||
|
|
b09e94542d | ||
|
|
04a3cda0b2 | ||
|
|
bfb65b57f7 | ||
|
|
6a3687fe28 | ||
|
|
700437f184 | ||
|
|
22e44306f8 | ||
|
|
0cf8515882 | ||
|
|
2f11541973 | ||
|
|
af892cc058 | ||
|
|
edeffee62c | ||
|
|
9a080adec5 | ||
|
|
961a70a04e | ||
|
|
a409614185 | ||
|
|
287010f82f | ||
|
|
76e1636258 | ||
|
|
c9ab59fc4d | ||
|
|
17bb5db352 | ||
|
|
c1f7678e5b | ||
|
|
18a099fa76 | ||
|
|
7c71d8306e | ||
|
|
f81cf69985 | ||
|
|
d6ce682b56 | ||
|
|
4931a300ad | ||
|
|
d3f8f9d65b | ||
|
|
d00f80b5dd | ||
|
|
d8cf8104fb | ||
|
|
d48c7eaef1 | ||
|
|
9140839f75 | ||
|
|
e73169a232 | ||
|
|
a803adea2a | ||
|
|
4edc42a4b7 | ||
|
|
9b4d01f48f | ||
|
|
9db199269d | ||
|
|
36612d8c5d | ||
|
|
d49d0b10a6 | ||
|
|
eb6afba809 | ||
|
|
894fc6072c | ||
|
|
91ba760a02 | ||
|
|
6ce4b9ad66 | ||
|
|
83dde26914 | ||
|
|
f08ef335b4 | ||
|
|
337c068d22 | ||
|
|
95dc47cc07 | ||
|
|
d4092a32f9 | ||
|
|
59a690bb4b | ||
|
|
a9de514b7c | ||
|
|
a149d1cbfd | ||
|
|
ef20881664 | ||
|
|
65fd02b1b6 | ||
|
|
736febd064 | ||
|
|
7df76dfbfc | ||
|
|
c570ad63fe | ||
|
|
3515d4316f | ||
|
|
7c6a5ef288 | ||
|
|
03217fbad2 | ||
|
|
3a294a246a | ||
|
|
d2b9f0f4f8 | ||
|
|
bc1abcd86f | ||
|
|
045f2bfd31 | ||
|
|
94bf32b0d4 | ||
|
|
11df1684b7 | ||
|
|
2a48796406 | ||
|
|
74dc481133 | ||
|
|
0a829e3eeb | ||
|
|
b8ce24febb | ||
|
|
7d9898a5bb | ||
|
|
2c5e5c7a0c | ||
|
|
d151ce6feb | ||
|
|
1c196a9eff | ||
|
|
47437903f9 | ||
|
|
df6030540a | ||
|
|
5eb2bd7d47 | ||
|
|
519708b6ec | ||
|
|
8dd62b32e3 | ||
|
|
18ec5d8047 | ||
|
|
2811dc7c0d | ||
|
|
d7e7d00806 | ||
|
|
49f69810e9 | ||
|
|
cf1db86665 | ||
|
|
1bb53286bb | ||
|
|
64b395c64a | ||
|
|
9b8e4e4cbe | ||
|
|
d89bfa72a0 | ||
|
|
e46031fec7 | ||
|
|
e4b0b3a7d6 | ||
|
|
355f47fb1e | ||
|
|
28b0c07df7 | ||
|
|
a7cf0cfa1f | ||
|
|
633534c2f0 | ||
|
|
3ec3a1af34 | ||
|
|
e13c962d24 | ||
|
|
6ae27efac0 | ||
|
|
a46443b2a9 | ||
|
|
bba23c7814 | ||
|
|
12b81a5b77 | ||
|
|
3fa0f5a93f | ||
|
|
49d6f33335 | ||
|
|
c8e686396f | ||
|
|
29c5908731 | ||
|
|
1d24208370 | ||
|
|
265f110691 | ||
|
|
bb7d63e97e | ||
|
|
266645d98d | ||
|
|
78051a314a | ||
|
|
a321e160cf | ||
|
|
dcfe6b32e2 | ||
|
|
b60e861b14 | ||
|
|
342972c2ea | ||
|
|
cfab313905 | ||
|
|
fd1054598d | ||
|
|
9e1f39ffec | ||
|
|
0b55ecab37 | ||
|
|
66dad294a5 | ||
|
|
58c6520218 | ||
|
|
f7bf5905a0 | ||
|
|
f6f6570d6e | ||
|
|
387b4ff215 | ||
|
|
bbacffa7fd | ||
|
|
2966cdf1c0 | ||
|
|
57a383e77c | ||
|
|
9a6d30d716 | ||
|
|
2e5ae1eac6 | ||
|
|
35a7e3a180 | ||
|
|
f39f321d3b | ||
|
|
fdb16fae7d | ||
|
|
6d97a7358b | ||
|
|
35e81d8a66 | ||
|
|
31d6783d60 | ||
|
|
a073e84369 | ||
|
|
6404eddfc1 | ||
|
|
2ed0722544 | ||
|
|
ff312b1b97 | ||
|
|
7b264ac923 | ||
|
|
05fb6c9192 | ||
|
|
20a2e83c39 | ||
|
|
eb0ebc588f | ||
|
|
bf8706d2c0 | ||
|
|
04691fb04c | ||
|
|
da3e4ced9d | ||
|
|
7f826450df | ||
|
|
2b0097a8d4 | ||
|
|
0e0a04fbc1 | ||
|
|
564f2cbfd4 | ||
|
|
d9d204a5d3 | ||
|
|
d43dd64b94 | ||
|
|
f4aa4ee918 | ||
|
|
ac0d6cc1f3 | ||
|
|
2151da7b33 | ||
|
|
50df0f683f | ||
|
|
f0274ed337 | ||
|
|
7a755d8df6 | ||
|
|
d27a0cbb23 | ||
|
|
bab10e2748 | ||
|
|
506edcaec2 | ||
|
|
075a713de9 | ||
|
|
f58ad3c39f | ||
|
|
4249ebbf8b | ||
|
|
33e8577f94 | ||
|
|
53d6f992c9 | ||
|
|
1f4a9f3439 | ||
|
|
1791574de5 | ||
|
|
0d58ed224f | ||
|
|
97ac780972 | ||
|
|
63d3bf148e | ||
|
|
bd1c609ca8 | ||
|
|
7240604115 | ||
|
|
753a664c06 | ||
|
|
80920618e6 | ||
|
|
ec702c88f3 | ||
|
|
c12e3234b0 | ||
|
|
ec367c4b36 | ||
|
|
a8f6accc9a | ||
|
|
7ea7af3ab8 | ||
|
|
ae0494b0bc | ||
|
|
67df8e0e7b | ||
|
|
c0a64ed506 | ||
|
|
4989c0f030 | ||
|
|
55f0fc30bf | ||
|
|
45212d3b2f | ||
|
|
076b2ed2be | ||
|
|
d0e2938baa |
@@ -1,17 +0,0 @@
|
||||
job1:
|
||||
script:
|
||||
- date
|
||||
- pwd
|
||||
- echo $OAI_TEST_CASE_GROUP
|
||||
- echo $MACHINELIST
|
||||
- echo $MACHINELISTGENERIC
|
||||
- echo $RESULT_DIR
|
||||
- echo $NRUNS_LTE_SOFTMODEM
|
||||
- source oaienv
|
||||
- rm -rf cmake_targets/autotests/log
|
||||
- mkdir cmake_targets/autotests/log
|
||||
- cd cmake_targets/autotests/v2
|
||||
- python main.py
|
||||
- date
|
||||
only:
|
||||
- triggers
|
||||
39
README.txt
39
README.txt
@@ -9,26 +9,36 @@ Please see NOTICE.txt for third party software that is included in the sources.
|
||||
The OpenAirInterface (OAI) software is composed of the following parts:
|
||||
|
||||
openairinterface5g
|
||||
├── cmake_targets: build utilities to compile (simulation, emulation and real-time platforms), and generated build files
|
||||
├── common : some common OAI utilities, other tools can be found at openair2/UTILS
|
||||
├── ci-scripts: Meta-scripts used by the OSA CI process. Contains also configuration files used day-to-day by CI.
|
||||
├── cmake_targets: Build utilities to compile (simulation, emulation and real-time platforms), and generated build files
|
||||
├── common : Some common OAI utilities, other tools can be found at openair2/UTILS
|
||||
├── doc : Contains an up-to-date feature set list
|
||||
├── LICENSE
|
||||
├── maketags : script to generate emacs tags
|
||||
├── openair1 : 3GPP LTE Rel-10 PHY layer + PHY RF simulation and a subset of Rel 12 Features.
|
||||
├── openair2 :3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP implementation.
|
||||
├── maketags : Script to generate emacs tags
|
||||
├── nfapi : Contains the NFAPI code. A local Readme file provides more details.
|
||||
├── openair1 : 3GPP LTE Rel-10/12 PHY layer + PHY RF simulation. A local Readme file provides more details.
|
||||
├── openair2 : 3GPP LTE Rel-10 RLC/MAC/PDCP/RRC/X2AP implementation.
|
||||
├── COMMON
|
||||
├── DOCS
|
||||
├── ENB_APP
|
||||
├── LAYER2/RLC/ with the following subdirectories: UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0.
|
||||
├── LAYER2/PDCP/PDCP_v10.1.0.
|
||||
├── RRC/LITE
|
||||
├── LAYER2/PDCP/PDCP_v10.1.0.
|
||||
├── NETWORK_DRIVER
|
||||
├── PHY_INTERFACE
|
||||
├── RRC/LITE
|
||||
├── UTIL
|
||||
├── X2AP
|
||||
├── ENB_APP
|
||||
├── openair3: 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
|
||||
├── COMMON
|
||||
├── DOCS
|
||||
├── GTPV1-U
|
||||
├── NAS
|
||||
├── NAS
|
||||
├── S1AP
|
||||
├── SCTP
|
||||
├── SECU
|
||||
├── UDP
|
||||
└── targets: top level wrapper for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
|
||||
├── UTILS
|
||||
└── targets: Top-level wrappers for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
|
||||
|
||||
|
||||
RELEASE NOTES:
|
||||
@@ -44,3 +54,12 @@ v0.6 -> RRH functionality, UE greatly improved, better TDD support,
|
||||
a lot of bugs fixed. WARNING: oaisim in PHY abstraction mode does not
|
||||
work, you need to use v0.5.2 for that.
|
||||
v0.6.1 -> Mostly bugfixes. This is the last version without NFAPI.
|
||||
v1.0.0 -> January 2019. This version first implements the architectural split described in doc/oai_lte_enb_func_split_arch.png picture.
|
||||
Only FAPI, nFAPI and IF4.5 interfaces are implemented.
|
||||
Repository tree structure prepares future integrations of features such as LTE-M, nbIOT or 5G-NR.
|
||||
Preliminary X2 support has been implemented.
|
||||
S1-flex has been introduced.
|
||||
New tools: config library, telnet server, ...
|
||||
A lot of bugfixes and a proper automated Continuous Integration process validates contributions.
|
||||
v1.0.1 -> February 2019: Bug fix for the UE L1 simulator.
|
||||
v1.0.2 -> February 2019: Full OAI support for 3.13.1 UHD
|
||||
|
||||
@@ -31,6 +31,7 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
|
||||
}
|
||||
|
||||
def doRedHatBuild = false
|
||||
def doFlexranCtrlTest = false
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
@@ -40,7 +41,7 @@ pipeline {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
gitLabConnection('OAI GitLab')
|
||||
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test-FDD-Band7", "Test-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40"])
|
||||
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-FDD-Band7", "Test-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40"])
|
||||
ansiColor('xterm')
|
||||
}
|
||||
|
||||
@@ -69,6 +70,12 @@ pipeline {
|
||||
} else {
|
||||
doRedHatBuild = false
|
||||
}
|
||||
if (params.FlexRanRtcGitLabRepository_Credentials != null) {
|
||||
doFlexranCtrlTest = true
|
||||
}
|
||||
if (fileExists("flexran")) {
|
||||
sh "rm -Rf flexran > /dev/null 2>&1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,6 +110,18 @@ pipeline {
|
||||
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
|
||||
sh "./ci-scripts/checkCodingFormattingRules.sh"
|
||||
}
|
||||
if (doFlexranCtrlTest) {
|
||||
sh "mkdir flexran"
|
||||
dir ('flexran') {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.FlexRanRtcGitLabRepository_Credentials}", usernameVariable: 'git_username', passwordVariable: 'git_password']
|
||||
]) {
|
||||
sh "git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
|
||||
}
|
||||
sh "sed -i -e 's#add-apt-repository.*cleishm.*neo4j#add-apt-repository ppa:cleishm/neo4j -y#' -e 's#libneo4j-client-dev#libneo4j-client-dev -y#' tools/install_dependencies"
|
||||
sh "zip -r -qq flexran.zip ."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
@@ -115,10 +134,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- cppcheck") {
|
||||
stage ("Start VM -- basic-sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,23 +145,7 @@ pipeline {
|
||||
stage ("Start VM -- enb-usrp") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- basic-sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- phy-sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,7 +153,7 @@ pipeline {
|
||||
stage ("Start VM -- enb-ethernet") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,7 +161,31 @@ pipeline {
|
||||
stage ("Start VM -- ue-ethernet") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/createVM.sh --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
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 -- L2-Sim") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- phy-sim") {
|
||||
steps {
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Start VM -- cppcheck") {
|
||||
steps {
|
||||
timeout (time: 5, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,7 +196,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Analysis with cppcheck") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,7 +205,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build eNb-USRP") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,16 +214,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build basic-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build physical simulators") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build phy-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,7 +223,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build eNb-ethernet") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,7 +232,25 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build UE-ethernet") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/buildOnVM.sh --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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build L2-Simulator-eNB") {
|
||||
steps {
|
||||
//gitlabCommitStatus(name: "Build UE-ethernet") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
stage ("Build physical simulators") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Build phy-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -252,7 +288,7 @@ pipeline {
|
||||
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}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --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}"
|
||||
sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
||||
def res=readFile('./oai_warning_files.txt').trim();
|
||||
if ("0".equals(res)) {
|
||||
@@ -263,7 +299,7 @@ pipeline {
|
||||
addGitLabMRComment comment: message
|
||||
}
|
||||
} else {
|
||||
sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
}
|
||||
if(fileExists('build_results.html')) {
|
||||
sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' build_results.html"
|
||||
@@ -280,7 +316,7 @@ pipeline {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Test phy-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -288,206 +324,205 @@ pipeline {
|
||||
stage ("Test basic simulator") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Test basic-sim") {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/runTestOnVM.sh --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
timeout (time: 30, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test on CI bench #1") {
|
||||
stages {
|
||||
stage ("Test FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
stage ("Test L2 simulator") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Test L2-sim") {
|
||||
timeout (time: 30, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Build Flexran Controller") {
|
||||
when {
|
||||
expression {doFlexranCtrlTest}
|
||||
}
|
||||
steps {
|
||||
timeout (time: 20, unit: 'MINUTES') {
|
||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant flexran-rtc --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-FDD-Band7") {
|
||||
build job: 'eNB-CI-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-TDD-Band40") {
|
||||
build job: 'eNB-CI-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - FDD - Band 7 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-FDD-Band7") {
|
||||
build job: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-FDD-Band7-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-FDD-Band7-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-FDD-Band7-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-FDD-Band7-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test IF4p5 - TDD - Band 40 - B210") {
|
||||
steps {
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(env.gitlabSourceBranch)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(env.gitlabMergeRequestLastCommit)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: true)
|
||||
]
|
||||
}
|
||||
} else {
|
||||
gitlabCommitStatus(name: "Test-IF4p5-TDD-Band40") {
|
||||
build job: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
parameters: [
|
||||
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
|
||||
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
|
||||
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
|
||||
booleanParam(name: 'eNB_mergeRequest', value: false)
|
||||
]
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
// In case of any non-success, we are retrieving the HTML report of the last completed
|
||||
// slave job.
|
||||
// The only drop-back is that we may retrieve the HTML report of a previous build
|
||||
always {
|
||||
script {
|
||||
if (!fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
copyArtifacts(projectName: 'eNB-CI-IF4p5-TDD-Band40-B210',
|
||||
filter: 'test_results*.html',
|
||||
selector: lastCompleted())
|
||||
if (fileExists('test_results-eNB-CI-IF4p5-TDD-Band40-B210.html')) {
|
||||
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-eNB-CI-IF4p5-TDD-Band40-B210.html"
|
||||
archiveArtifacts artifacts: 'test_results-eNB-CI-IF4p5-TDD-Band40-B210.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -499,14 +534,14 @@ pipeline {
|
||||
always {
|
||||
script {
|
||||
dir ('archives') {
|
||||
sh "if [ -d basic_sim/test ] || [ -d phy_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi"
|
||||
sh "if [ -d basic_sim/test ] || [ -d phy_sim/test ] || [ -d l2_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi"
|
||||
}
|
||||
if(fileExists('archives/vm_tests_logs.zip')) {
|
||||
archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
sh "./ci-scripts/reportTestLocally.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}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-test --workspace $WORKSPACE --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}"
|
||||
} else {
|
||||
sh "./ci-scripts/reportTestLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool report-test --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
}
|
||||
if(fileExists('test_simulator_results.html')) {
|
||||
sh "sed -i -e 's#Build-ID: ${BUILD_ID}#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_simulator_results.html"
|
||||
@@ -519,7 +554,7 @@ pipeline {
|
||||
}
|
||||
stage ("Destroy all Virtual Machines") {
|
||||
steps {
|
||||
sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -527,7 +562,7 @@ pipeline {
|
||||
always {
|
||||
script {
|
||||
// Stage destroy may not be run if error in previous stage
|
||||
sh "./ci-scripts/destroyAllRunningVM.sh --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||
emailext attachmentsPattern: '*results*.html',
|
||||
body: '''Hi,
|
||||
Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
|
||||
|
||||
@@ -27,6 +27,8 @@ def pythonExecutor = params.pythonExecutor
|
||||
|
||||
// Location of the test XML file to be run
|
||||
def testXMLFile = params.pythonTestXmlFile
|
||||
def mainPythonAllXmlFiles = ""
|
||||
def buildStageStatus = true
|
||||
|
||||
// Name of the test stage
|
||||
def testStageName = params.pipelineTestStageName
|
||||
@@ -53,6 +55,7 @@ def eNB_Repository
|
||||
def eNB_Branch
|
||||
def eNB_CommitID
|
||||
def eNB_AllowMergeRequestProcess = false
|
||||
def eNB_TargetBranch
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
@@ -61,6 +64,7 @@ pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock (ciSmartPhoneResource)
|
||||
}
|
||||
// the following parameter options are commented out so it shows the ones
|
||||
// that you SHALL have to run the job.
|
||||
@@ -106,8 +110,14 @@ pipeline {
|
||||
if (params.pythonTestXmlFile == null) {
|
||||
// picking default
|
||||
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
||||
echo "Test XML file(default): ${testXMLFile}"
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||
} else {
|
||||
echo "Test XML file : ${testXMLFile}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||
echo "Test XML file : ${xmlFile}"
|
||||
}
|
||||
}
|
||||
// If not present picking a default Stage Name
|
||||
if (params.pipelineTestStageName == null) {
|
||||
@@ -149,6 +159,14 @@ pipeline {
|
||||
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||
if (params.eNB_mergeRequest != null) {
|
||||
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||
if (eNB_AllowMergeRequestProcess) {
|
||||
if (params.eNB_TargetBranch != null) {
|
||||
eNB_TargetBranch = params.eNB_TargetBranch
|
||||
} else {
|
||||
eNB_TargetBranch = 'develop'
|
||||
}
|
||||
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||
}
|
||||
}
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
@@ -184,20 +202,24 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
dir ('ci-scripts') {
|
||||
lock (ciSmartPhoneResource) {
|
||||
try {
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${testXMLFile}"
|
||||
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||
]) {
|
||||
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||
for (xmlFile in myXmlTestSuite) {
|
||||
try {
|
||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
buildStageStatus = false
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -328,7 +350,7 @@ pipeline {
|
||||
}
|
||||
if(fileExists("ci-scripts/test_results.html")) {
|
||||
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' test_results-${JOB_NAME}.html"
|
||||
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||
archiveArtifacts "test_results-${JOB_NAME}.html"
|
||||
}
|
||||
}
|
||||
|
||||
21
ci-scripts/active_net_interfaces.awk
Normal file
21
ci-scripts/active_net_interfaces.awk
Normal file
@@ -0,0 +1,21 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
/inet.*brd/{print "interfaceToUse="$NF"done"}
|
||||
@@ -198,12 +198,18 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
|
||||
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]
|
||||
then
|
||||
echo "Expecting $NB_PATTERN_FILES log files and found $NB_FOUND_FILES"
|
||||
STATUS=-1
|
||||
fi
|
||||
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log
|
||||
echo "STATUS seems OK"
|
||||
else
|
||||
echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log
|
||||
echo "STATUS failed?"
|
||||
fi
|
||||
exit $STATUS
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI VM Build Check script"
|
||||
function build_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
@@ -31,9 +31,9 @@ function usage {
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " buildOnVM.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool build [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
@@ -44,356 +44,175 @@ function usage {
|
||||
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 " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
variant_usage
|
||||
echo " Specify the variant to build."
|
||||
echo ""
|
||||
echo " --keep-vm-alive OR -k"
|
||||
echo " Keep the VM alive after the build."
|
||||
echo ""
|
||||
echo " --daemon OR -D"
|
||||
echo " Run as daemon"
|
||||
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 " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ] || [ $# -gt 9 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
VM_NAME=ci-enb-usrp
|
||||
VM_MEMORY=2048
|
||||
VM_CPU=4
|
||||
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
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-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 --mu"
|
||||
shift
|
||||
;;
|
||||
-v2)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
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
|
||||
VM_MEMORY=4096
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
shift
|
||||
;;
|
||||
-v7)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
shift
|
||||
;;
|
||||
-v8)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
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 --mu"
|
||||
;;
|
||||
basic-sim)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
;;
|
||||
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
|
||||
VM_MEMORY=4096
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
;;
|
||||
enb-ethernet)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
;;
|
||||
ue-ethernet)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
;;
|
||||
*)
|
||||
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
|
||||
|
||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
|
||||
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"
|
||||
|
||||
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
|
||||
|
||||
if [ $IS_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||
fi
|
||||
|
||||
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
|
||||
echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-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 update > zip-install.txt 2>&1" >> $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 -DD ../localZip.zip\"" >> $VM_CMDS
|
||||
echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-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" == *"-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"* ]]
|
||||
function build_on_vm {
|
||||
if [ ! -f $JENKINS_WKSP/localZip.zip ]
|
||||
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))
|
||||
echo "Missing localZip.zip file!"
|
||||
STATUS=1
|
||||
return
|
||||
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?"
|
||||
STATUS=1
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo "STATUS seems OK"
|
||||
else
|
||||
echo "STATUS failed?"
|
||||
fi
|
||||
exit $STATUS
|
||||
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"
|
||||
|
||||
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
|
||||
|
||||
if [ $IS_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "VM_MEMORY = $VM_MEMORY MBytes"
|
||||
echo "VM_CPU = $VM_CPU"
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
acquire_vm_create_lock
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --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"
|
||||
release_vm_create_lock
|
||||
else
|
||||
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"
|
||||
fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "Copying GIT repo into VM ($VM_NAME)"
|
||||
echo "############################################################"
|
||||
if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
|
||||
then
|
||||
scp -o StrictHostKeyChecking=no $JENKINS_WKSP/flexran/flexran.zip ubuntu@$VM_IP_ADDR:/home/ubuntu/localZip.zip
|
||||
else
|
||||
scp -o StrictHostKeyChecking=no $JENKINS_WKSP/localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu
|
||||
fi
|
||||
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
|
||||
echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
if [ $DAEMON -eq 0 ]
|
||||
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 daemon cppcheck \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip daemon cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
fi
|
||||
if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
|
||||
then
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip curl jq \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip curl jq >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip daemon curl jq \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip daemon curl jq >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
fi
|
||||
if [[ "$VM_NAME" != *"-cppcheck"* ]] && [[ "$VM_NAME" != *"-flexran-rtc"* ]]
|
||||
then
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip daemon subversion libboost-dev \"" >> $VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
|
||||
echo "sudo apt-get --yes install zip daemon subversion libboost-dev >> zip-install.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
fi
|
||||
echo "mkdir tmp" >> $VM_CMDS
|
||||
echo "cd tmp" >> $VM_CMDS
|
||||
echo "echo \"unzip -qq -DD ../localZip.zip\"" >> $VM_CMDS
|
||||
echo "unzip -qq -DD ../localZip.zip" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
echo "mkdir cmake_targets/log" >> $VM_CMDS
|
||||
echo "chmod 777 cmake_targets/log" >> $VM_CMDS
|
||||
echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
|
||||
echo "echo \"cppcheck $BUILD_OPTIONS . \"" >> $VM_CMDS
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "cppcheck $BUILD_OPTIONS . 2> cmake_targets/log/cppcheck.xml 1> cmake_targets/log/cppcheck_build.txt" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"cppcheck $BUILD_OPTIONS .\" > ./my-vm-build.sh" >> $VM_CMDS
|
||||
echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
|
||||
echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp -O /home/ubuntu/tmp/cmake_targets/log/cppcheck_build.txt -E /home/ubuntu/tmp/cmake_targets/log/cppcheck.xml ./my-vm-build.sh" >> $VM_CMDS
|
||||
fi
|
||||
fi
|
||||
if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
|
||||
then
|
||||
echo "mkdir -p cmake_targets/log" >> $VM_CMDS
|
||||
echo "chmod 777 cmake_targets/log" >> $VM_CMDS
|
||||
echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
|
||||
echo "echo \"./tools/install_dependencies \"" >> $VM_CMDS
|
||||
echo "./tools/install_dependencies > cmake_targets/log/install-build.txt 2>&1" >> $VM_CMDS
|
||||
echo "echo \"$BUILD_OPTIONS \"" >> $VM_CMDS
|
||||
echo "$BUILD_OPTIONS > cmake_targets/log/rt_controller.Rel14.txt 2>&1" >> $VM_CMDS
|
||||
fi
|
||||
if [[ "$VM_NAME" != *"-cppcheck"* ]] && [[ "$VM_NAME" != *"-flexran-rtc"* ]]
|
||||
then
|
||||
echo "echo \"source oaienv\"" >> $VM_CMDS
|
||||
echo "source oaienv" >> $VM_CMDS
|
||||
echo "cd cmake_targets/" >> $VM_CMDS
|
||||
echo "mkdir log" >> $VM_CMDS
|
||||
echo "chmod 777 log" >> $VM_CMDS
|
||||
echo "cp /home/ubuntu/zip-install.txt log" >> $VM_CMDS
|
||||
if [ $DAEMON -eq 0 ]
|
||||
then
|
||||
echo "echo \"./build_oai -I $BUILD_OPTIONS \"" >> $VM_CMDS
|
||||
echo "./build_oai -I $BUILD_OPTIONS > log/install-build.txt 2>&1" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"./build_oai -I $BUILD_OPTIONS\" > ./my-vm-build.sh" >> $VM_CMDS
|
||||
echo "chmod 775 ./my-vm-build.sh " >> $VM_CMDS
|
||||
echo "echo \"sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh\"" >> $VM_CMDS
|
||||
echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS
|
||||
fi
|
||||
fi
|
||||
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
|
||||
rm -f $VM_CMDS
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -144,13 +144,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -144,13 +144,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -144,13 +144,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -181,12 +181,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
@@ -198,8 +197,8 @@ MACRLCs = (
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
puSch10xSnr = 160;
|
||||
puCch10xSnr = 160;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -228,7 +227,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -181,12 +181,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
@@ -198,8 +197,8 @@ MACRLCs = (
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
puSch10xSnr = 160;
|
||||
puCch10xSnr = 160;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -219,7 +218,7 @@ RUs = (
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 115;
|
||||
max_rxgain = 125;
|
||||
eNB_instances = [0];
|
||||
|
||||
}
|
||||
@@ -228,7 +227,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -181,12 +181,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
@@ -198,8 +197,8 @@ MACRLCs = (
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
puSch10xSnr = 160;
|
||||
puCch10xSnr = 160;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -219,7 +218,7 @@ RUs = (
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 115;
|
||||
max_rxgain = 120;
|
||||
eNB_instances = [0];
|
||||
|
||||
}
|
||||
@@ -228,7 +227,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
|
||||
265
ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf
Normal file
265
ci-scripts/conf_files/enb.band7.tm2.25PRB.usrpb210.conf
Normal file
@@ -0,0 +1,265 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 2;
|
||||
nb_antennas_tx = 2;
|
||||
nb_antennas_rx = 2;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -25;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/*
|
||||
srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;
|
||||
*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 2;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/*
|
||||
rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
}
|
||||
);
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 2
|
||||
nb_rx = 2
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 115;
|
||||
eNB_instances = [0];
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "lo";
|
||||
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
@@ -186,7 +186,6 @@ eNBs =
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
@@ -238,8 +237,8 @@ THREAD_STRUCT = (
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "lo";
|
||||
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||
FLEXRAN_INTERFACE_NAME = "ens3";
|
||||
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
|
||||
@@ -145,11 +145,9 @@ eNBs =
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
@@ -219,8 +217,8 @@ THREAD_STRUCT = (
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "lo";
|
||||
FLEXRAN_IPV4_ADDRESS = "127.0.0.1";
|
||||
FLEXRAN_INTERFACE_NAME = "ens3";
|
||||
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
|
||||
@@ -137,7 +137,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -147,13 +147,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -147,13 +147,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "10.0.0.2";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -147,13 +147,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.0.1/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.0.1/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -184,12 +184,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
@@ -201,8 +200,8 @@ MACRLCs = (
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
puSch10xSnr = 160;
|
||||
puCch10xSnr = 160;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -235,7 +234,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -184,12 +184,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
@@ -201,8 +200,8 @@ MACRLCs = (
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
puSch10xSnr = 160;
|
||||
puCch10xSnr = 160;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -235,7 +234,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -184,12 +184,11 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
}
|
||||
@@ -201,8 +200,8 @@ MACRLCs = (
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
phy_test_mode = 0;
|
||||
puSch10xSnr = 200;
|
||||
puCch10xSnr = 200;
|
||||
puSch10xSnr = 160;
|
||||
puCch10xSnr = 160;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -235,7 +234,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
|
||||
236
ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
Normal file
236
ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
Normal file
@@ -0,0 +1,236 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
|
||||
plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } );
|
||||
|
||||
tr_s_preference = "local_mac"
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "3GPP_eNODEB";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -27;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "ens3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "ens3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
local_s_if_name = "lo:";
|
||||
remote_s_address = "127.0.0.1";
|
||||
local_s_address = "127.0.0.2";
|
||||
local_s_portc = 50001;
|
||||
remote_s_portc = 50000;
|
||||
local_s_portd = 50011;
|
||||
remote_s_portd = 50010;
|
||||
tr_s_preference = "nfapi";
|
||||
tr_n_preference = "local_RRC";
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
log_config =
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
@@ -20,7 +20,7 @@ RUs = (
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_RU_L1_TRX_SPLIT";
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
|
||||
44
ci-scripts/conf_files/ue.nfapi.conf
Normal file
44
ci-scripts/conf_files/ue.nfapi.conf
Normal file
@@ -0,0 +1,44 @@
|
||||
log_config = {
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="medium";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="full";
|
||||
};
|
||||
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
local_n_if_name = "lo";
|
||||
remote_n_address = "127.0.0.2";
|
||||
local_n_address = "127.0.0.1";
|
||||
local_n_portc = 50000;
|
||||
remote_n_portc = 50001;
|
||||
local_n_portd = 50010;
|
||||
remote_n_portd = 50011;
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 90
|
||||
att_rx = 0;
|
||||
bands = [7,38,42,43];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 125;
|
||||
}
|
||||
);
|
||||
@@ -20,8 +20,8 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI VM Creation script"
|
||||
function create_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
@@ -31,9 +31,9 @@ function usage {
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " createVM.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool create [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
@@ -41,12 +41,7 @@ function usage {
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
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 " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
variant_usage
|
||||
echo " Specify the variant to build."
|
||||
echo ""
|
||||
echo " --help OR -h"
|
||||
@@ -54,144 +49,52 @@ function usage {
|
||||
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 " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
echo ""
|
||||
function acquire_vm_create_lock {
|
||||
local FlockFile="/tmp/vmclone.lck"
|
||||
local unlocked="0"
|
||||
touch ${FlockFile} 2>/dev/null
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
echo "Cannot access lock file ${FlockFile}"
|
||||
exit 2
|
||||
fi
|
||||
while [ $unlocked -eq 0 ]
|
||||
do
|
||||
exec 5>${FlockFile}
|
||||
flock -nx 5
|
||||
if [[ $? -ne 0 ]]
|
||||
then
|
||||
echo "Another instance of VM creation is running"
|
||||
sleep 10
|
||||
else
|
||||
unlocked="1"
|
||||
fi
|
||||
done
|
||||
chmod 666 ${FlockFile} 2>/dev/null
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ] || [ $# -gt 6 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
function release_vm_create_lock {
|
||||
local FlockFile="/tmp/vmclone.lck"
|
||||
rm -Rf ${FlockFile}
|
||||
}
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
VM_NAME=ci-enb-usrp
|
||||
VM_MEMORY=2048
|
||||
VM_CPU=4
|
||||
function create_vm {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
echo "VM_NAME = $VM_NAME"
|
||||
echo "VM_MEMORY = $VM_MEMORY MBytes"
|
||||
echo "VM_CPU = $VM_CPU"
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
acquire_vm_create_lock
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --unsafe-caching --template ci-scripts/template-host.xml
|
||||
echo "Waiting for VM to be started"
|
||||
uvt-kvm wait $VM_NAME --insecure
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-v1)
|
||||
VM_NAME=ci-enb-usrp
|
||||
shift
|
||||
;;
|
||||
-v2)
|
||||
VM_NAME=ci-basic-sim
|
||||
VM_MEMORY=8192
|
||||
shift
|
||||
;;
|
||||
-v3)
|
||||
VM_NAME=ci-phy-sim
|
||||
shift
|
||||
;;
|
||||
-v4)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
VM_CPU=4
|
||||
shift
|
||||
;;
|
||||
-v7)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
shift
|
||||
;;
|
||||
-v8)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
shift
|
||||
;;
|
||||
--variant)
|
||||
variant="$2"
|
||||
case $variant in
|
||||
enb-usrp)
|
||||
VM_NAME=ci-enb-usrp
|
||||
;;
|
||||
basic-sim)
|
||||
VM_NAME=ci-basic-sim
|
||||
VM_MEMORY=8192
|
||||
;;
|
||||
phy-sim)
|
||||
VM_NAME=ci-phy-sim
|
||||
;;
|
||||
cppcheck)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
VM_CPU=4
|
||||
;;
|
||||
enb-ethernet)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
;;
|
||||
ue-ethernet)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
;;
|
||||
*)
|
||||
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 [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
|
||||
VM_CMDS=${VM_NAME}_cmds.txt
|
||||
|
||||
echo "VM_NAME = $VM_NAME"
|
||||
echo "VM_MEMORY = $VM_MEMORY MBytes"
|
||||
echo "VM_CPU = $VM_CPU"
|
||||
|
||||
echo "############################################################"
|
||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||
echo "############################################################"
|
||||
uvt-kvm create $VM_NAME release=xenial --memory $VM_MEMORY --cpu $VM_CPU --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"
|
||||
exit 0
|
||||
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||
release_vm_create_lock
|
||||
}
|
||||
|
||||
@@ -20,15 +20,17 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI VM Destroy script"
|
||||
function destroy_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " destroyAllRunningVM.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool destroy [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
@@ -36,66 +38,26 @@ function usage {
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# -gt 4 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
function destroy_vm {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
echo "VM_TEMPLATE = $VM_TEMPLATE"
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
|
||||
|
||||
for CI_VM in $LIST_CI_VM
|
||||
do
|
||||
VM_IP_ADDR=`uvt-kvm ip $CI_VM`
|
||||
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
|
||||
uvt-kvm destroy $CI_VM
|
||||
ssh-keygen -R $VM_IP_ADDR
|
||||
done
|
||||
|
||||
exit 0
|
||||
LIST_CI_VM=`uvt-kvm list | grep $VM_TEMPLATE`
|
||||
|
||||
for CI_VM in $LIST_CI_VM
|
||||
do
|
||||
VM_IP_ADDR=`uvt-kvm ip $CI_VM`
|
||||
echo "VM to destroy: $CI_VM -- IP $VM_IP_ADDR"
|
||||
uvt-kvm destroy $CI_VM
|
||||
ssh-keygen -R $VM_IP_ADDR
|
||||
done
|
||||
}
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI GitLab merge request applying script"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
579
ci-scripts/oai-ci-vm-tool
Executable file
579
ci-scripts/oai-ci-vm-tool
Executable file
@@ -0,0 +1,579 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function top_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo " Requirements:"
|
||||
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||
echo " -- xenial image already synced"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " oai-ci-vm-tool (-h|--help) {create,destroy,build,wait,test,report-build,report-test} ..."
|
||||
echo ""
|
||||
}
|
||||
|
||||
function variant_usage {
|
||||
echo " --variant enb-usrp OR -v1"
|
||||
echo " --variant basic-sim OR -v2"
|
||||
echo " --variant phy-sim OR -v3"
|
||||
echo " --variant cppcheck OR -v4"
|
||||
echo " --variant enb-ethernet OR -v7"
|
||||
echo " --variant ue-ethernet OR -v8"
|
||||
echo " --variant l2-sim OR -v9"
|
||||
echo " --variant flexran-rtc OR -v10"
|
||||
}
|
||||
|
||||
MY_DIR=$(dirname $(readlink -f $0))
|
||||
. $MY_DIR/createVM.sh
|
||||
. $MY_DIR/buildOnVM.sh
|
||||
. $MY_DIR/waitBuildOnVM.sh
|
||||
. $MY_DIR/destroyAllRunningVM.sh
|
||||
. $MY_DIR/runTestOnVM.sh
|
||||
. $MY_DIR/reportBuildLocally.sh
|
||||
. $MY_DIR/reportTestLocally.sh
|
||||
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
echo "Syntax Error: too few arguments"
|
||||
echo ""
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VM_TEMPLATE=ci-
|
||||
JOB_NAME=XX
|
||||
BUILD_ID=XX
|
||||
VM_NAME=ci-enb-usrp
|
||||
VM_MEMORY=2048
|
||||
VM_CPU=4
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP"
|
||||
KEEP_VM_ALIVE=0
|
||||
RUN_OPTIONS="none"
|
||||
DAEMON=0
|
||||
MR_TRIG=0
|
||||
PU_TRIG=0
|
||||
|
||||
HELP_CMD=0
|
||||
CREATE_CMD=0
|
||||
BUILD_CMD=0
|
||||
WAIT_CMD=0
|
||||
DESTROY_CMD=0
|
||||
TEST_CMD=0
|
||||
REPORT_BUILD_CMD=0
|
||||
REPORT_TEST_CMD=0
|
||||
NBARGS=0
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
HELP_CMD=1
|
||||
shift
|
||||
;;
|
||||
create)
|
||||
CREATE_CMD=1
|
||||
# It is implied to keep the VM when creating it
|
||||
KEEP_VM_ALIVE=1
|
||||
shift
|
||||
;;
|
||||
build)
|
||||
BUILD_CMD=1
|
||||
shift
|
||||
;;
|
||||
wait)
|
||||
WAIT_CMD=1
|
||||
shift
|
||||
;;
|
||||
test)
|
||||
TEST_CMD=1
|
||||
shift
|
||||
;;
|
||||
destroy)
|
||||
DESTROY_CMD=1
|
||||
shift
|
||||
;;
|
||||
report-build)
|
||||
REPORT_BUILD_CMD=1
|
||||
shift
|
||||
;;
|
||||
report-test)
|
||||
REPORT_TEST_CMD=1
|
||||
shift
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
NBARGS=$[$NBARGS+1]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
NBARGS=$[$NBARGS+2]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-ws|--workspace)
|
||||
JENKINS_WKSP="$2"
|
||||
NBARGS=$[$NBARGS+4]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-k|--keep-vm-alive)
|
||||
KEEP_VM_ALIVE=1
|
||||
NBARGS=$[$NBARGS+8]
|
||||
shift
|
||||
;;
|
||||
-D|--daemon)
|
||||
DAEMON=1
|
||||
NBARGS=$[$NBARGS+16]
|
||||
shift
|
||||
;;
|
||||
-gu|--git-url)
|
||||
GIT_URL="$2"
|
||||
NBARGS=$[$NBARGS+32]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--trigger)
|
||||
TRIG="$2"
|
||||
case $TRIG in
|
||||
merge-request)
|
||||
MR_TRIG=1
|
||||
;;
|
||||
push)
|
||||
PU_TRIG=1
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Trigger option -> $TRIG"
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
NBARGS=$[$NBARGS+64]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-mr)
|
||||
MR_TRIG=1
|
||||
NBARGS=$[$NBARGS+64]
|
||||
shift
|
||||
;;
|
||||
-pu)
|
||||
PU_TRIG=1
|
||||
NBARGS=$[$NBARGS+64]
|
||||
shift
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
NBARGS=$[$NBARGS+1024]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-sc|--src-commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
NBARGS=$[$NBARGS+2048]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
NBARGS=$[$NBARGS+4096]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tc|--target-commit)
|
||||
TARGET_COMMIT_ID="$2"
|
||||
NBARGS=$[$NBARGS+8192]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-br|--branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
NBARGS=$[$NBARGS+16384]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-co|--commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
NBARGS=$[$NBARGS+32768]
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-v1)
|
||||
VM_NAME=ci-enb-usrp
|
||||
ARCHIVES_LOC=enb_usrp
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -w USRP --mu"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v2)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
RUN_OPTIONS="complex"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v3)
|
||||
VM_NAME=ci-phy-sim
|
||||
ARCHIVES_LOC=phy_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=3
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v4)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=4096
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v7)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v8)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v9)
|
||||
VM_NAME=ci-l2-sim
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=8
|
||||
ARCHIVES_LOC=l2_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET"
|
||||
RUN_OPTIONS="complex"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
shift
|
||||
;;
|
||||
-v10)
|
||||
VM_NAME=ci-flexran-rtc
|
||||
ARCHIVES_LOC=flexran
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="cmake . && make -j2"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
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 --mu"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
basic-sim)
|
||||
VM_NAME=ci-basic-sim
|
||||
ARCHIVES_LOC=basic_sim
|
||||
LOG_PATTERN=basic_simulator
|
||||
NB_PATTERN_FILES=2
|
||||
BUILD_OPTIONS="--basic-simulator"
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=4
|
||||
RUN_OPTIONS="complex"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
phy-sim)
|
||||
VM_NAME=ci-phy-sim
|
||||
ARCHIVES_LOC=phy_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=3
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510*\" -q -np -b"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
cppcheck)
|
||||
VM_NAME=ci-cppcheck
|
||||
VM_MEMORY=8192
|
||||
ARCHIVES_LOC=cppcheck
|
||||
LOG_PATTERN=cppcheck.xml
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="--enable=warning --force --xml --xml-version=2"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
enb-ethernet)
|
||||
VM_NAME=ci-enb-ethernet
|
||||
ARCHIVES_LOC=enb_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
ue-ethernet)
|
||||
VM_NAME=ci-ue-ethernet
|
||||
ARCHIVES_LOC=ue_eth
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=6
|
||||
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
l2-sim)
|
||||
VM_NAME=ci-l2-sim
|
||||
VM_MEMORY=8192
|
||||
VM_CPU=8
|
||||
ARCHIVES_LOC=l2_sim
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=4
|
||||
BUILD_OPTIONS="--eNB -t ETHERNET"
|
||||
RUN_OPTIONS="complex"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
flexran-rtc)
|
||||
VM_NAME=ci-flexran-rtc
|
||||
ARCHIVES_LOC=flexran
|
||||
LOG_PATTERN=.Rel14.txt
|
||||
NB_PATTERN_FILES=1
|
||||
BUILD_OPTIONS="cmake . && make -j2"
|
||||
NBARGS=$[$NBARGS+256]
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Variant option -> $variant"
|
||||
echo ""
|
||||
variant_usage
|
||||
exit 1
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
top_usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
MANY_CMDS=$[$CREATE_CMD+$BUILD_CMD+$WAIT_CMD+$DESTROY_CMD+$TEST_CMD+$REPORT_BUILD_CMD+$REPORT_TEST_CMD]
|
||||
if [ $MANY_CMDS -gt 1 ]
|
||||
then
|
||||
echo "Syntax Error: too many commands"
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $HELP_CMD -eq 1 ]
|
||||
then
|
||||
if [ $MANY_CMDS -eq 0 ]
|
||||
then
|
||||
top_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $CREATE_CMD -eq 1 ]
|
||||
then
|
||||
create_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $BUILD_CMD -eq 1 ]
|
||||
then
|
||||
build_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $WAIT_CMD -eq 1 ]
|
||||
then
|
||||
wait_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $TEST_CMD -eq 1 ]
|
||||
then
|
||||
run_test_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $DESTROY_CMD -eq 1 ]
|
||||
then
|
||||
destroy_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $REPORT_BUILD_CMD -eq 1 ]
|
||||
then
|
||||
report_build_usage
|
||||
exit 0
|
||||
fi
|
||||
if [ $REPORT_TEST_CMD -eq 1 ]
|
||||
then
|
||||
report_test_usage
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
if [ $MANY_CMDS -eq 0 ]
|
||||
then
|
||||
echo "Syntax Error: no command"
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
# For create, mandatory options: jn, id. Optional: variant
|
||||
if [ $CREATE_CMD -eq 1 ] && [ $NBARGS -ne 3 ] && [ $NBARGS -ne 259 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for create command"
|
||||
create_usage
|
||||
exit 1
|
||||
fi
|
||||
# For build, mandatory options: jn, id, ws. Optional: variant, k, D
|
||||
if [ $BUILD_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ] && [ $NBARGS -ne 23 ] && [ $NBARGS -ne 279 ] && [ $NBARGS -ne 31 ] && [ $NBARGS -ne 287 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for build command"
|
||||
build_usage
|
||||
exit 1
|
||||
fi
|
||||
# For wait, mandatory options: jn, id, ws. Optional: variant, k
|
||||
if [ $WAIT_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for wait command"
|
||||
wait_usage
|
||||
exit 1
|
||||
fi
|
||||
# For test, mandatory options: jn, id, ws. Optional: variant, k
|
||||
if [ $TEST_CMD -eq 1 ] && [ $NBARGS -ne 7 ] && [ $NBARGS -ne 263 ] && [ $NBARGS -ne 15 ] && [ $NBARGS -ne 271 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for test command"
|
||||
run_test_usage
|
||||
exit 1
|
||||
fi
|
||||
# For destroy, mandatory options: jn, id.
|
||||
if [ $DESTROY_CMD -eq 1 ] && [ $NBARGS -ne 3 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for destroy command"
|
||||
destroy_usage
|
||||
exit 1
|
||||
fi
|
||||
# For report-build, mandatory options: jn, id, ws, gu, pu, br,co.
|
||||
# or: jn, id, ws, gu, mr, sb, sc, tb, tc.
|
||||
if [ $REPORT_BUILD_CMD -eq 1 ] && [ $NBARGS -ne 15463 ] && [ $NBARGS -ne 49255 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for report-build command"
|
||||
report_build_usage
|
||||
exit 1
|
||||
fi
|
||||
# For report-test, mandatory options: jn, id, ws, gu, pu, br,co.
|
||||
# or: jn, id, ws, gu, mr, sb, sc, tb, tc.
|
||||
if [ $REPORT_TEST_CMD -eq 1 ] && [ $NBARGS -ne 15463 ] && [ $NBARGS -ne 49255 ]
|
||||
then
|
||||
echo "Syntax Error: unsupported option(s) for report-test command"
|
||||
report_test_usage
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checking uvt-kvm is installed
|
||||
UVT_KVM_PATH=`which uvt-kvm | grep -c uvt-kvm`
|
||||
if [ $UVT_KVM_PATH -eq 0 ]
|
||||
then
|
||||
echo "Error: uvt-kvm is not installed"
|
||||
top_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||
then
|
||||
VM_TEMPLATE=ci-
|
||||
else
|
||||
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||
fi
|
||||
|
||||
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
|
||||
VM_CMDS=${VM_NAME}_cmds.txt
|
||||
ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
|
||||
|
||||
STATUS=0
|
||||
if [ $CREATE_CMD -eq 1 ]
|
||||
then
|
||||
create_vm
|
||||
fi
|
||||
if [ $BUILD_CMD -eq 1 ]
|
||||
then
|
||||
build_on_vm
|
||||
if [ $DAEMON -eq 0 ] && [ $STATUS -eq 0 ]
|
||||
then
|
||||
check_on_vm_build
|
||||
fi
|
||||
fi
|
||||
if [ $WAIT_CMD -eq 1 ]
|
||||
then
|
||||
wait_on_vm_build
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
check_on_vm_build
|
||||
fi
|
||||
fi
|
||||
if [ $TEST_CMD -eq 1 ]
|
||||
then
|
||||
ARCHIVES_LOC=${ARCHIVES_LOC}/test
|
||||
run_test_on_vm
|
||||
fi
|
||||
if [ $DESTROY_CMD -eq 1 ]
|
||||
then
|
||||
destroy_vm
|
||||
fi
|
||||
if [ $REPORT_BUILD_CMD -eq 1 ]
|
||||
then
|
||||
report_build
|
||||
fi
|
||||
if [ $REPORT_TEST_CMD -eq 1 ]
|
||||
then
|
||||
report_test
|
||||
fi
|
||||
|
||||
# Did command pass or fail?
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo "STATUS seems OK"
|
||||
else
|
||||
echo "STATUS failed?"
|
||||
fi
|
||||
exit $STATUS
|
||||
@@ -20,14 +20,13 @@
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function usage {
|
||||
echo "OAI Local Build Report script"
|
||||
function report_build_usage {
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo ""
|
||||
echo " reportBuildLocally.sh [OPTIONS]"
|
||||
echo " oai-ci-vm-tool report-build [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
@@ -47,6 +46,9 @@ function usage {
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo " --workspace #### OR -ws ####"
|
||||
echo " Specify the workspace."
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
echo " --trigger push OR -pu"
|
||||
echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
|
||||
@@ -79,7 +81,7 @@ function usage {
|
||||
}
|
||||
|
||||
function trigger_usage {
|
||||
echo "OAI Local Build Report script"
|
||||
echo "OAI CI VM script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
@@ -103,7 +105,7 @@ function details_table {
|
||||
COMPLETE_MESSAGE="start"
|
||||
for MESSAGE in $LIST_MESSAGES
|
||||
do
|
||||
if [[ $MESSAGE == *"/home/ubuntu/tmp"* ]]
|
||||
if [[ $MESSAGE == *"/home/ubuntu/tmp"* ]] || [[ $MESSAGE == *"/tmp/CI-eNB"* ]]
|
||||
then
|
||||
FILENAME=`echo $MESSAGE | sed -e "s#^/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" | awk -F ":" '{print $1}'`
|
||||
LINENB=`echo $MESSAGE | awk -F ":" '{print $2}'`
|
||||
@@ -139,6 +141,23 @@ function details_table {
|
||||
|
||||
function summary_table_header {
|
||||
echo " <h3>$1</h3>" >> ./build_results.html
|
||||
if [ -f $2/build_final_status.log ]
|
||||
then
|
||||
if [ `grep -c BUILD_OK $2/build_final_status.log` -eq 1 ]
|
||||
then
|
||||
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
||||
echo " <strong>BUILD was SUCCESSFUL <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
else
|
||||
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
||||
echo " <strong>BUILD was a FAILURE! <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
||||
echo " <strong>COULD NOT DETERMINE BUILD FINAL STATUS! <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
fi
|
||||
echo " <table border = \"1\">" >> ./build_results.html
|
||||
echo " <tr bgcolor = \"#33CCFF\" >" >> ./build_results.html
|
||||
echo " <th>Element</th>" >> ./build_results.html
|
||||
@@ -153,8 +172,8 @@ function summary_table_row {
|
||||
echo " <td bgcolor = \"lightcyan\" >$1</th>" >> ./build_results.html
|
||||
if [ -f $2 ]
|
||||
then
|
||||
STATUS=`egrep -c "$3" $2`
|
||||
if [ $STATUS -eq 1 ]
|
||||
BUILD_STATUS=`egrep -c "$3" $2`
|
||||
if [ $BUILD_STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
@@ -196,7 +215,28 @@ function summary_table_footer {
|
||||
}
|
||||
|
||||
function sca_summary_table_header {
|
||||
echo " <h3>$1</h3>" >> ./build_results.html
|
||||
echo " <h3>$2</h3>" >> ./build_results.html
|
||||
NB_ERRORS=`egrep -c "severity=\"error\"" $1`
|
||||
NB_WARNINGS=`egrep -c "severity=\"warning\"" $1`
|
||||
if [ $NB_ERRORS -eq 0 ] && [ $NB_WARNINGS -eq 0 ]
|
||||
then
|
||||
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
||||
echo " <strong>CPPCHECK found NO error and NO warning <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
else
|
||||
if [ $NB_ERRORS -eq 0 ]
|
||||
then
|
||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
||||
echo " <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
else
|
||||
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
||||
echo " <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-cppcheck-details\">More details on CPPCHECK results</button>" >> ./build_results.html
|
||||
echo " <div id=\"oai-cppcheck-details\" class=\"collapse\">" >> ./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
|
||||
@@ -261,344 +301,252 @@ function sca_summary_table_footer {
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <p>Full details in zipped artifact (cppcheck/cppcheck.xml) </p>" >> ./build_results.html
|
||||
echo " <p style=\"margin-left: 30px\">Graphical Interface tool : <strong><code>cppcheck-gui -l cppcheck/cppcheck.xml</code></strong></p>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
}
|
||||
|
||||
jb_checker=0
|
||||
mr_checker=0
|
||||
pu_checker=0
|
||||
MR_TRIG=0
|
||||
PU_TRIG=0
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
function report_build {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-gu|--git-url)
|
||||
GIT_URL="$2"
|
||||
let "jb_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
let "jb_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
let "jb_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--trigger)
|
||||
TRIG="$2"
|
||||
case $TRIG in
|
||||
merge-request)
|
||||
MR_TRIG=1
|
||||
;;
|
||||
push)
|
||||
PU_TRIG=1
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Trigger option -> $TRIG"
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-mr)
|
||||
MR_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-pu)
|
||||
PU_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "mr_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-sc|--src-commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
let "mr_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tc|--target-commit)
|
||||
TARGET_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-br|--branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "pu_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-co|--commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "pu_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
echo "JENKINS_WKSP = $JENKINS_WKSP"
|
||||
echo "GIT_URL = $GIT_URL"
|
||||
|
||||
done
|
||||
|
||||
if [ $jb_checker -ne 15 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing job information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ] && [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: trigger action incoherent."
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $pu_checker -ne 3 ]
|
||||
cd ${JENKINS_WKSP}
|
||||
echo "<!DOCTYPE html>" > ./build_results.html
|
||||
echo "<html class=\"no-js\" lang=\"en-US\">" >> ./build_results.html
|
||||
echo "<head>" >> ./build_results.html
|
||||
echo " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">" >> ./build_results.html
|
||||
echo " <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">" >> ./build_results.html
|
||||
echo " <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js\"></script>" >> ./build_results.html
|
||||
echo " <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\"></script>" >> ./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><div class=\"container\">" >> ./build_results.html
|
||||
echo " <br>" >> ./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\" > <span class=\"glyphicon glyphicon-time\"></span> Build Start Time (UTC)</td>" >> ./build_results.html
|
||||
echo " <td>TEMPLATE_BUILD_TIME</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-cloud-upload\"></span> GIT Repository</td>" >> ./build_results.html
|
||||
echo " <td><a href=\"$GIT_URL\">$GIT_URL</a></td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-wrench\"></span> Job Trigger</td>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td>Push Event</td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td>Merge-Request</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing push information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tree-deciduous\"></span> Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $mr_checker -ne 15 ]
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing merge-request information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-log-out\"></span> Source Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Source Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-log-in\"></span> Target Branch</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" > <span class=\"glyphicon glyphicon-tag\"></span> Target Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <h2>Build Summary</h2>" >> ./build_results.html
|
||||
|
||||
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 " <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\" >Build Start Time (UTC)</td>" >> ./build_results.html
|
||||
echo " <td>TEMPLATE_BUILD_TIME</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./build_results.html
|
||||
echo " <td>$GIT_URL</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td>Push Event</td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td>Merge-Request</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <h2>Build Summary</h2>" >> ./build_results.html
|
||||
|
||||
if [ -f ./oai_rules_result.txt ]
|
||||
then
|
||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
||||
echo " <table border = "1">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Result:</td>" >> ./build_results.html
|
||||
NB_FILES=`cat ./oai_rules_result.txt`
|
||||
if [ $NB_FILES = "0" ]
|
||||
then
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
else
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ -f ./oai_rules_result.txt ]
|
||||
then
|
||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
||||
NB_FILES=`cat ./oai_rules_result.txt`
|
||||
if [ $NB_FILES = "0" ]
|
||||
then
|
||||
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <strong>All files in repository follow OAI rules. <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>All modified files in Merge-Request follow OAI rules. <span class=\"glyphicon glyphicon-ok-circle\"></span></strong>" >> ./build_results.html; fi
|
||||
echo " </div>" >> ./build_results.html
|
||||
else
|
||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <strong>$NB_FILES files in repository DO NOT follow OAI rules. <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>$NB_FILES modified files in Merge-Request DO NOT follow OAI rules. <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html; fi
|
||||
echo " </div>" >> ./build_results.html
|
||||
fi
|
||||
if [ -f ./oai_rules_result_list.txt ]
|
||||
then
|
||||
awk '{print " <tr><td></td><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
|
||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-formatting-details\">More details on formatting check</button>" >> ./build_results.html
|
||||
echo " <div id=\"oai-formatting-details\" class=\"collapse\">" >> ./build_results.html
|
||||
echo " <p>Please apply the following command to this(ese) file(s): </p>" >> ./build_results.html
|
||||
echo " <p style=\"margin-left: 30px\"><strong><code>astyle --options=ci-scripts/astyle-options.txt filename(s)</code></strong></p>" >> ./build_results.html
|
||||
echo " <table border = 1>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
awk '{print " <tr><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
fi
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <p>Please apply the following command to this(ese) file(s): </p>" >> ./build_results.html
|
||||
echo " <p style=\"margin-left: 30px\"><strong><code>astyle --options=ci-scripts/astyle-options.txt filename(s)</code></strong></p>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./build_results.html
|
||||
echo " <h2>Ubuntu 16.04 LTS -- Summary</h2>" >> ./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
|
||||
sca_summary_table_header ./archives/cppcheck/cppcheck.xml "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
|
||||
|
||||
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
|
||||
summary_table_header "OAI Build eNB -- USRP option" ./archives/enb_usrp
|
||||
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
|
||||
|
||||
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 basic simulator option" ./archives/basic_sim
|
||||
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
|
||||
summary_table_header "OAI Build Physical simulators option" ./archives/phy_sim
|
||||
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
|
||||
|
||||
summary_table_header "OAI Build eNB -- ETHERNET transport option"
|
||||
summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
|
||||
summary_table_footer
|
||||
|
||||
summary_table_header "OAI Build UE -- ETHERNET transport option"
|
||||
summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
|
||||
summary_table_footer
|
||||
if [ -f archives/gnb_usrp/nr-softmodem.Rel14.txt ]
|
||||
then
|
||||
summary_table_header "OAI Build gNB -- USRP option" ./archives/gnb_usrp
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/gnb_usrp/nr-softmodem.Rel14.txt "Built target nr-softmodem" ./gnb_usrp_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/gnb_usrp/coding.Rel14.txt "Built target coding" ./gnb_usrp_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/gnb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./gnb_usrp_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/gnb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./gnb_usrp_row4.html
|
||||
summary_table_footer
|
||||
fi
|
||||
|
||||
echo " <h2>Red Hat (CentOS Linux release 7.4.1708) -- Summary</h2>" >> ./build_results.html
|
||||
if [ -f archives/nrue_usrp/nr-uesoftmodem.Rel14.txt ]
|
||||
then
|
||||
summary_table_header "OAI Build 5G NR UE -- USRP option" ./archives/nrue_usrp
|
||||
summary_table_row "UE SoftModem - Release 14" ./archives/nrue_usrp/nr-uesoftmodem.Rel14.txt "Built target nr-uesoftmodem" ./nrue_usrp_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/nrue_usrp/coding.Rel14.txt "Built target coding" ./nrue_usrp_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/nrue_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./nrue_usrp_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/nrue_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./nrue_usrp_row4.html
|
||||
summary_table_footer
|
||||
fi
|
||||
|
||||
summary_table_header "Red Hat -- OAI Build eNB -- USRP option"
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html
|
||||
summary_table_footer
|
||||
summary_table_header "OAI Build eNB -- ETHERNET transport option" ./archives/enb_eth
|
||||
summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
|
||||
summary_table_footer
|
||||
|
||||
echo " <h3>Details</h3>" >> ./build_results.html
|
||||
summary_table_header "OAI Build UE -- ETHERNET transport option" ./archives/ue_eth
|
||||
summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html
|
||||
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
|
||||
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
|
||||
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
|
||||
summary_table_footer
|
||||
|
||||
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
|
||||
for DETAILS_TABLE in `ls ./enb_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
rm -f ./enb_usrp_row*.html ./basic_sim_row*.html ./phy_sim_row*.html ./enb_eth_row*.html ./ue_eth_row*.html ./enb_usrp_rh_row*.html
|
||||
if [ -e ./archives/red_hat ]
|
||||
then
|
||||
echo " <h2>Red Hat (CentOS Linux release 7.4.1708) -- Summary</h2>" >> ./build_results.html
|
||||
|
||||
echo "</body>" >> ./build_results.html
|
||||
echo "</html>" >> ./build_results.html
|
||||
summary_table_header "Red Hat -- OAI Build eNB -- USRP option" ./archives/red_hat
|
||||
summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html
|
||||
summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html
|
||||
summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html
|
||||
summary_table_row "Parameters Lib Config - Release 14" ./archives/red_hat/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_rh_row4.html
|
||||
summary_table_footer
|
||||
fi
|
||||
|
||||
exit 0
|
||||
echo " <h3>Details</h3>" >> ./build_results.html
|
||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-compilation-details\">Details for Compilation Errors and Warnings </button>" >> ./build_results.html
|
||||
echo " <div id=\"oai-compilation-details\" class=\"collapse\">" >> ./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
|
||||
|
||||
for DETAILS_TABLE in `ls ./gnb_usrp_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./nrue_usrp_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./enb_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
if [ -e ./archives/red_hat ]
|
||||
then
|
||||
for DETAILS_TABLE in `ls ./enb_usrp_rh_row*.html`
|
||||
do
|
||||
cat $DETAILS_TABLE >> ./build_results.html
|
||||
done
|
||||
fi
|
||||
rm -f ./*_row*.html
|
||||
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <p></p>" >> ./build_results.html
|
||||
echo " <div class=\"well well-lg\">End of Build Report -- Copyright <span class=\"glyphicon glyphicon-copyright-mark\"></span> 2018 <a href=\"http://www.openairinterface.org/\">OpenAirInterface</a>. All Rights Reserved.</div>" >> ./build_results.html
|
||||
echo "</div></body>" >> ./build_results.html
|
||||
echo "</html>" >> ./build_results.html
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,23 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
BEGIN{max=0;min=10000}
|
||||
{
|
||||
if ($0 ~/Mbits/) {
|
||||
|
||||
194
ci-scripts/waitBuildOnVM.sh
Executable file
194
ci-scripts/waitBuildOnVM.sh
Executable file
@@ -0,0 +1,194 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
function wait_usage {
|
||||
echo "OAI CI VM 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 " oai-ci-vm-tool wait [OPTIONS]"
|
||||
echo ""
|
||||
echo "Mandatory Options:"
|
||||
echo "--------"
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
echo ""
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo " --workspace #### OR -ws ####"
|
||||
echo " Specify the workspace."
|
||||
echo ""
|
||||
variant_usage
|
||||
echo " Specify the variant to build."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
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 wait_on_vm_build {
|
||||
echo "############################################################"
|
||||
echo "OAI CI VM script"
|
||||
echo "############################################################"
|
||||
|
||||
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"
|
||||
|
||||
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
|
||||
|
||||
if [ $IS_VM_ALIVE -eq 0 ]
|
||||
then
|
||||
echo "############################################################"
|
||||
echo "You should have created the VM before doing anything"
|
||||
echo "############################################################"
|
||||
STATUS=1
|
||||
return
|
||||
fi
|
||||
|
||||
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 "Waiting build process to end on VM ($VM_NAME)"
|
||||
echo "############################################################"
|
||||
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
echo "echo \"ps -aux | grep cppcheck \"" >> $VM_CMDS
|
||||
echo "while [ \$(ps -aux | grep --color=never cppcheck | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
|
||||
else
|
||||
echo "echo \"ps -aux | grep build \"" >> $VM_CMDS
|
||||
echo "while [ \$(ps -aux | grep --color=never build_oai | grep -v grep | wc -l) -gt 0 ]; do sleep 3; done" >> $VM_CMDS
|
||||
fi
|
||||
|
||||
ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
|
||||
rm -f $VM_CMDS
|
||||
}
|
||||
|
||||
function check_on_vm_build {
|
||||
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" == *"-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 "############################################################"
|
||||
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
LOG_FILES=`ls $ARCHIVES_LOC/*.txt $ARCHIVES_LOC/*.xml`
|
||||
else
|
||||
LOG_FILES=`ls $ARCHIVES_LOC/*.txt`
|
||||
fi
|
||||
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
|
||||
echo "Expecting $NB_PATTERN_FILES log files and found $NB_FOUND_FILES"
|
||||
STATUS=-1
|
||||
fi
|
||||
|
||||
# If we were building the FlexRan Controller, flag-touch for basic-simulator to continue
|
||||
if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
|
||||
then
|
||||
if [[ $STATUS -eq 0 ]]
|
||||
then
|
||||
touch $JENKINS_WKSP/flexran/flexran_build_complete.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $STATUS -eq 0 ]]
|
||||
then
|
||||
echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log
|
||||
else
|
||||
echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log
|
||||
fi
|
||||
}
|
||||
54
ci-scripts/xml_files/enb_usrp210_band40_build.xml
Normal file
54
ci-scripts/xml_files/enb_usrp210_band40_build.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>build-tab</htmlTabRef>
|
||||
<htmlTabName>Build</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP)</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
47
ci-scripts/xml_files/enb_usrp210_band40_epc_closure.xml
Normal file
47
ci-scripts/xml_files/enb_usrp210_band40_epc_closure.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-closure</htmlTabRef>
|
||||
<htmlTabName>EPC-Closure</htmlTabName>
|
||||
<htmlTabIcon>log-out</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
119
ci-scripts/xml_files/enb_usrp210_band40_test_05mhz_tm1.xml
Normal file
119
ci-scripts/xml_files/enb_usrp210_band40_test_05mhz_tm1.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-05-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030104 040301 040501 040602 040601 040603 040642 040641 040643 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030104">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040601">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040602">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040603">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040641">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040643">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -21,43 +21,21 @@
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-10-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101 040101
|
||||
030104 040301 040501 040602 040601 040603 040642 040641 040643 040401 040201 030201
|
||||
040101
|
||||
030114 040301 040511 040612 040611 040613 040652 040651 040653 040401 040201 030201
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<!-- 20MHz is not stable enough to be run -->
|
||||
<!--
|
||||
030124 040301 040521 040622 040621 040623 040662 040661 040663 040401 040201 030201
|
||||
-->
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP)</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030104">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030114">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/10MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.50PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030106">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/20MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
@@ -83,13 +61,6 @@
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
@@ -97,30 +68,6 @@
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040601">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040602">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040603">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040611">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
@@ -145,30 +92,6 @@
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040641">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040643">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040651">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/2Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
@@ -193,34 +116,4 @@
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
119
ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
Normal file
119
ci-scripts/xml_files/enb_usrp210_band40_test_20mhz_tm1.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-20-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-20MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030124 040301 040521 040622 040621 040623 040662 040661 040663 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030124">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/20MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040521">
|
||||
<class>Ping</class>
|
||||
<desc>ping (20MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040621">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/13.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040622">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040623">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/13.5Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040661">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/2Mbps/UDP)(30 sec)(balanced)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040662">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040663">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/2Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
65
ci-scripts/xml_files/enb_usrp210_band40_tracer.xml
Normal file
65
ci-scripts/xml_files/enb_usrp210_band40_tracer.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>tracer-test</htmlTabRef>
|
||||
<htmlTabName>T-Tracer</htmlTabName>
|
||||
<htmlTabIcon>duplicate</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030100 040300 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030100">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (TDD/Band40/5MHz) with T Tracer on</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.25PRB.FairScheduler.usrpb210.conf --T_stdout 0</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040300">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach single UE</desc>
|
||||
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -1,350 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101 040101
|
||||
030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
|
||||
030111 040301 040511 040613 040614 040615 040616 040617 040651 040652 040653 040654 040401 040201 030201
|
||||
030121 040301 040521 040623 040624 040625 040626 040627 040662 040661 040663 040664 040401 040201 030201
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP)</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030111">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/10MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030121">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/20MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040521">
|
||||
<class>Ping</class>
|
||||
<desc>ping (20MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040603">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040604">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040605">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040606">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040607">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040641">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040643">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040644">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040613">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040614">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040615">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(unbalanced profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040616">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040617">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040651">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040652">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040653">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040654">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040623">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040624">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040625">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(unbalanced profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040626">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040627">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040661">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040662">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040663">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040664">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
54
ci-scripts/xml_files/enb_usrp210_band7_build.xml
Normal file
54
ci-scripts/xml_files/enb_usrp210_band7_build.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>build-tab</htmlTabRef>
|
||||
<htmlTabName>Build</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP)</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
47
ci-scripts/xml_files/enb_usrp210_band7_epc_closure.xml
Normal file
47
ci-scripts/xml_files/enb_usrp210_band7_epc_closure.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-closure</htmlTabRef>
|
||||
<htmlTabName>EPC-Closure</htmlTabName>
|
||||
<htmlTabIcon>log-out</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
143
ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
Normal file
143
ci-scripts/xml_files/enb_usrp210_band7_test_05mhz_tm1.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-05-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040603">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040604">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040605">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040606">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040607">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040641">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040643">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040644">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
143
ci-scripts/xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Normal file
143
ci-scripts/xml_files/enb_usrp210_band7_test_10mhz_tm1.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-10-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030111 040301 040511 040613 040614 040615 040616 040617 040651 040652 040653 040654 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030111">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/10MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.50PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040613">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040614">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040615">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/30Mbps/UDP)(30 sec)(unbalanced profile)</desc>
|
||||
<iperf_args>-u -b 30M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040616">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040617">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040651">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040652">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040653">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040654">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
143
ci-scripts/xml_files/enb_usrp210_band7_test_20mhz_tm1.xml
Normal file
143
ci-scripts/xml_files/enb_usrp210_band7_test_20mhz_tm1.xml
Normal file
@@ -0,0 +1,143 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-20-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-20MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030121 040301 040521 040623 040624 040625 040662 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>040626 040627 040661 040663 040664</TestCaseExclusionList>
|
||||
|
||||
<testCase id="030121">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/20MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.100PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040521">
|
||||
<class>Ping</class>
|
||||
<desc>ping (20MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040623">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040624">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040625">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(unbalanced profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>unbalanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040626">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040627">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040661">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/12Mbps/UDP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-u -b 12M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040662">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/17Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 17M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040663">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040664">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/TCP)(30 sec)(balanced profile)</desc>
|
||||
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>balanced</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
65
ci-scripts/xml_files/enb_usrp210_band7_tracer.xml
Normal file
65
ci-scripts/xml_files/enb_usrp210_band7_tracer.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>tracer-test</htmlTabRef>
|
||||
<htmlTabName>T-Tracer</htmlTabName>
|
||||
<htmlTabIcon>duplicate</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030100 040300 040401 040201 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="030100">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz) with T Tracer on</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --T_stdout 0</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040300">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach single UE</desc>
|
||||
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -1,219 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<!-- Only 5MHz is tested since neither 10MHz nor 20MHz work in this configuration -->
|
||||
<!-- Also no UL iperf in 5MHz (040642) -->
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101 040101
|
||||
030104 030105 040301 040501 040602 040401 040201 030201 030202
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<!--
|
||||
030104 030105 040301 040501 040602 040642 040401 040201 030201 030202
|
||||
030114 030115 040301 040511 040612 040652 040401 040201 030201 030202
|
||||
030124 030125 040301 040521 040622 040662 040401 040201 030201 030202
|
||||
-->
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP -- Ethernet Fronthaul)</desc>
|
||||
<Build_eNB_args>-t ETHERNET -w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030104">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030105">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030114">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030115">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/10MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030124">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030125">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/20MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040521">
|
||||
<class>Ping</class>
|
||||
<desc>ping (20MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040602">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040612">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040622">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040652">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040662">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
55
ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
Normal file
55
ci-scripts/xml_files/if4p5_usrp210_band40_build.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>build-tab</htmlTabRef>
|
||||
<htmlTabName>Build</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP -- Ethernet Fronthaul)</desc>
|
||||
<Build_eNB_args>-t ETHERNET -w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
48
ci-scripts/xml_files/if4p5_usrp210_band40_epc_closure.xml
Normal file
48
ci-scripts/xml_files/if4p5_usrp210_band40_epc_closure.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-closure</htmlTabRef>
|
||||
<htmlTabName>EPC-Closure</htmlTabName>
|
||||
<htmlTabIcon>log-out</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
103
ci-scripts/xml_files/if4p5_usrp210_band40_test_05mhz.xml
Normal file
103
ci-scripts/xml_files/if4p5_usrp210_band40_test_05mhz.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-05</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030104 030105 040301 040501 040602 040642 040401 040201 030201 030202
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="030104">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030105">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.25PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040602">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/6.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 6.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
103
ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml
Normal file
103
ci-scripts/xml_files/if4p5_usrp210_band40_test_10mhz.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-10</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030114 030115 040301 040511 040612 040652 040401 040201 030201 030202
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="030114">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030115">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/10MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.50PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040612">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040652">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
103
ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml
Normal file
103
ci-scripts/xml_files/if4p5_usrp210_band40_test_20mhz.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-20</htmlTabRef>
|
||||
<htmlTabName>Test-20MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030124 030125 040301 040521 040622 040662 040401 040201 030201 030202
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="030124">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (TDD/Band40)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.tdd.band40.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030125">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (TDD/Band40/20MHz/info)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040521">
|
||||
<class>Ping</class>
|
||||
<desc>ping (20MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040622">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/13.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 13.5M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040662">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/2Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||
<iperf_args>-u -b 2M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -1,217 +0,0 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<!-- Only 5MHz is tested since neither 10MHz nor 20MHz work in this configuration -->
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101 040101
|
||||
030101 030102 040301 040501 040604 040642 040401 040201 030201 030202
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<!--
|
||||
030111 030112 040301 040511 040614 040652 040401 040201 030201 030202
|
||||
030121 030122 040301 040521 040624 040662 040401 040201 030201 030202
|
||||
-->
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP -- Ethernet Fronthaul)</desc>
|
||||
<Build_eNB_args>-t ETHERNET -w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030102">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030111">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030112">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/10MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030121">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030122">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/20MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf --codingw --fepw</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040604">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040614">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/32Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 32M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040652">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040521">
|
||||
<class>Ping</class>
|
||||
<desc>ping (20MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040624">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/70Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 70M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040662">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/20Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 20M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
55
ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
Normal file
55
ci-scripts/xml_files/if4p5_usrp210_band7_build.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>build-tab</htmlTabRef>
|
||||
<htmlTabName>Build</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
050101 060101 070101 040101
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP -- Ethernet Fronthaul)</desc>
|
||||
<Build_eNB_args>-t ETHERNET -w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060101">
|
||||
<class>Initialize_MME</class>
|
||||
<desc>Initialize MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070101">
|
||||
<class>Initialize_SPGW</class>
|
||||
<desc>Initialize SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
48
ci-scripts/xml_files/if4p5_usrp210_band7_epc_closure.xml
Normal file
48
ci-scripts/xml_files/if4p5_usrp210_band7_epc_closure.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>epc-closure</htmlTabRef>
|
||||
<htmlTabName>EPC-Closure</htmlTabName>
|
||||
<htmlTabIcon>log-out</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
050201 060201 070201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="050201">
|
||||
<class>Terminate_HSS</class>
|
||||
<desc>Terminate HSS</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="060201">
|
||||
<class>Terminate_MME</class>
|
||||
<desc>Terminate MME</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="070201">
|
||||
<class>Terminate_SPGW</class>
|
||||
<desc>Terminate SPGW</desc>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
103
ci-scripts/xml_files/if4p5_usrp210_band7_test_05mhz.xml
Normal file
103
ci-scripts/xml_files/if4p5_usrp210_band7_test_05mhz.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-05</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030101 030102 040301 040501 040604 040642 040401 040201 030201 030202
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030102">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.25PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040501">
|
||||
<class>Ping</class>
|
||||
<desc>ping (5MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040604">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040642">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
103
ci-scripts/xml_files/if4p5_usrp210_band7_test_10mhz.xml
Normal file
103
ci-scripts/xml_files/if4p5_usrp210_band7_test_10mhz.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-10</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030111 030112 040301 040511 040614 040652 040401 040201 030201 030202
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="030111">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030112">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/10MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.50PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040511">
|
||||
<class>Ping</class>
|
||||
<desc>ping (10MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040614">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - DL/32Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 32M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040652">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (10MHz - UL/5Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 5M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>60</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
103
ci-scripts/xml_files/if4p5_usrp210_band7_test_20mhz.xml
Normal file
103
ci-scripts/xml_files/if4p5_usrp210_band7_test_20mhz.xml
Normal file
@@ -0,0 +1,103 @@
|
||||
<!--
|
||||
|
||||
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The OpenAirInterface Software Alliance licenses this file to You under
|
||||
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.openairinterface.org/?page_id=698
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
contact@openairinterface.org
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-20</htmlTabRef>
|
||||
<htmlTabName>Test-20MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
040101
|
||||
030121 030122 040301 040521 040624 040662 040401 040201 030201 030202
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList>
|
||||
</TestCaseExclusionList>
|
||||
|
||||
<testCase id="030121">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RRU (FDD/Band7)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.fdd.band7.conf</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030122">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize RCC (FDD/Band7/20MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band7.tm1.if4p5.lo.100PRB.usrpb210.conf</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RCC</desc>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030202">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate RRU</desc>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040101">
|
||||
<class>Initialize_UE</class>
|
||||
<desc>Initialize UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040201">
|
||||
<class>Terminate_UE</class>
|
||||
<desc>Terminate UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040301">
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040401">
|
||||
<class>Detach_UE</class>
|
||||
<desc>Detach UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040521">
|
||||
<class>Ping</class>
|
||||
<desc>ping (20MHz - 20 sec)</desc>
|
||||
<ping_args>-c 20</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040624">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - DL/50Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 50M -t 30 -i 1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040662">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (20MHz - UL/10Mbps/UDP)(30 sec)(single-ue profile)</desc>
|
||||
<iperf_args>-u -b 10M -t 30 -i 1 -R</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_profile>single-ue</iperf_profile>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -107,6 +107,28 @@
|
||||
<desc>Reboot UE</desc>
|
||||
</testCase>
|
||||
|
||||
<!-- CAT-M UE class command references -->
|
||||
|
||||
<testCase id="040102">
|
||||
<class>Initialize_CatM_module</class>
|
||||
<desc>Initialize CAT-M Module</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040202">
|
||||
<class>Terminate_CatM_module</class>
|
||||
<desc>Terminate CAT-M Module</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040302">
|
||||
<class>Attach_CatM_module</class>
|
||||
<desc>Attach CAT-M Module</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040402">
|
||||
<class>Detach_CatM_module</class>
|
||||
<desc>Detach CAT-M Module</desc>
|
||||
</testCase>
|
||||
|
||||
<!-- EPC class command references -->
|
||||
|
||||
<testCase id="050101">
|
||||
|
||||
@@ -183,7 +183,6 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
|
||||
#########################
|
||||
# set a flag for changes in the source code
|
||||
# these changes are related to hardcoded path to include .h files
|
||||
add_definitions(-DCMAKER)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
|
||||
|
||||
@@ -232,7 +231,7 @@ add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
|
||||
# Debug related options
|
||||
#########################################
|
||||
add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug")
|
||||
add_boolean_option(EMIT_ASN_DEBUG False "ASN1 coder/decoder Debug")
|
||||
add_boolean_option(ASN_EMIT_DEBUG False "ASN1 coder/decoder Debug")
|
||||
add_boolean_option(MSG_PRINT False "print debug messages")
|
||||
add_boolean_option(DISABLE_XER_PRINT False "print XER Format")
|
||||
add_boolean_option(XER_PRINT False "print XER Format")
|
||||
@@ -260,17 +259,17 @@ add_boolean_option(ENABLE_ITTI True "ITTI is internal messaging, should remain e
|
||||
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
||||
if (${ENABLE_ITTI})
|
||||
add_library(ITTI
|
||||
# add .h files if depend on (this one is generated)
|
||||
${OCP_ITTI}/intertask_interface.cpp
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/memory_pools.c
|
||||
)
|
||||
add_dependencies(ITTI rrc_flag)
|
||||
set(ITTI_LIB ITTI)
|
||||
set(GTPU_need_ITTI ${OPENAIR3_DIR}/GTPV1-U/gtpv1u_eNB.c)
|
||||
endif (${ENABLE_ITTI})
|
||||
|
||||
#############################
|
||||
# ASN.1 grammar C code generation & dependancies
|
||||
# ASN.1 grammar C code generation & dependencies
|
||||
################################
|
||||
# A difficulty: asn1c generates C code of a un-predictable list of files
|
||||
# so, generate the c from asn1c once at cmake run time
|
||||
@@ -278,8 +277,6 @@ endif (${ENABLE_ITTI})
|
||||
# (so creating new asn.1 objects instead of modifying the object attributes)
|
||||
# New C code source file, cmake must be re-run (instead of re-running make only)
|
||||
#############
|
||||
# set(asn1c_call "${OPENAIR_CMAKE}/tools/generate_asn1")
|
||||
# set(fix_asn1c_call "${OPENAIR_CMAKE}/tools/fix_asn1")
|
||||
set(asn1_generated_dir ${OPENAIR_BIN_DIR})
|
||||
|
||||
set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf")
|
||||
@@ -290,59 +287,54 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
|
||||
add_list2_option(RRC_ASN1_VERSION "Rel14" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
|
||||
|
||||
if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
|
||||
make_version(RRC_VERSION 8 6 0)
|
||||
make_version(LTE_RRC_VERSION 8 6 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
|
||||
make_version(RRC_VERSION 10 2 0)
|
||||
make_version(LTE_RRC_VERSION 10 2 0)
|
||||
add_definitions(-DCBA)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
|
||||
make_version(RRC_VERSION 10 2 0)
|
||||
make_version(LTE_RRC_VERSION 10 2 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel11")
|
||||
make_version(RRC_VERSION 11 18 0)
|
||||
make_version(LTE_RRC_VERSION 11 18 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-11.18.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel12")
|
||||
make_version(RRC_VERSION 12 16 0)
|
||||
make_version(LTE_RRC_VERSION 12 16 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-12.16.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel13")
|
||||
make_version(RRC_VERSION 13 9 1)
|
||||
make_version(LTE_RRC_VERSION 13 9 1)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-13.9.1.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel14")
|
||||
make_version(RRC_VERSION 14 7 0)
|
||||
make_version(LTE_RRC_VERSION 14 7 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel15")
|
||||
make_version(RRC_VERSION 15 2 2)
|
||||
make_version(LTE_RRC_VERSION 15 2 2)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.2.2.asn1)
|
||||
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
|
||||
add_definitions(-DRRC_VERSION=${RRC_VERSION})
|
||||
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
|
||||
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
|
||||
message("calling asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
|
||||
execute_process(COMMAND mkdir -p ${RRC_FULL_DIR}
|
||||
COMMAND env asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_"
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
|
||||
file(GLOB rrc_source ${RRC_FULL_DIR}/*.c)
|
||||
file(GLOB rrc_h ${RRC_FULL_DIR}/*.h)
|
||||
set(rrc_h ${rrc_h} ${RRC_FULL_DIR}/asn_constant.h)
|
||||
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
|
||||
add_library(RRC_LIB ${rrc_h} ${rrc_source}
|
||||
${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg.c
|
||||
${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c)
|
||||
include_directories ("${RRC_FULL_DIR}")
|
||||
|
||||
# add the command to generate the source code
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
add_custom_command (
|
||||
OUTPUT ${RRC_FULL_DIR}/asn_constant.h
|
||||
COMMAND mkdir -p ${RRC_FULL_DIR}
|
||||
COMMAND env asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}
|
||||
add_custom_target (
|
||||
rrc_flag ALL
|
||||
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${RRC_FULL_DIR}" "${RRC_GRAMMAR}" "LTE_"
|
||||
DEPENDS ${RRC_GRAMMAR}
|
||||
)
|
||||
|
||||
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
|
||||
add_library(RRC_LIB ${rrc_source}
|
||||
${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg.c
|
||||
${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1_msg_NB_IoT.c)
|
||||
add_dependencies(RRC_LIB rrc_flag)
|
||||
include_directories ("${RRC_FULL_DIR}")
|
||||
|
||||
# S1AP
|
||||
# Same limitation as described in RRC: unknown generated file list
|
||||
# so we generate it at cmake time
|
||||
@@ -378,28 +370,26 @@ endif(${S1AP_RELEASE} STREQUAL "R8")
|
||||
add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
|
||||
set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE})
|
||||
set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
|
||||
message("calling ASN1C_PREFIX=S1AP_ asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${S1AP_C_DIR} ${S1AP_ASN_DIR}/${S1AP_ASN_FILES}")
|
||||
execute_process(COMMAND mkdir -p ${S1AP_C_DIR}
|
||||
COMMAND env "ASN1C_PREFIX=S1AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${S1AP_C_DIR} ${S1AP_ASN_DIR}/${S1AP_ASN_FILES}
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
file(GLOB S1AP_source ${S1AP_C_DIR}/*.c)
|
||||
|
||||
file(GLOB s1ap_h ${S1AP_C_DIR}/*.h)
|
||||
set(s1ap_h ${s1ap_h})
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT ${S1AP_C_DIR}/S1AP_asn_constant.h
|
||||
COMMAND mkdir -p ${S1AP_C_DIR}
|
||||
COMMAND env "ASN1C_PREFIX=S1AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${S1AP_C_DIR} ${S1AP_ASN_DIR}/${S1AP_ASN_FILES}
|
||||
DEPENDS ${S1AP_ASN_DIR}/${S1AP_ASN_FILES}
|
||||
add_custom_target (
|
||||
s1ap_flag ALL
|
||||
${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${S1AP_C_DIR}" "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}" "S1AP_" -fno-include-deps
|
||||
DEPENDS "${S1AP_ASN_DIR}/${S1AP_ASN_FILES}"
|
||||
)
|
||||
|
||||
add_library(S1AP_LIB
|
||||
${S1AP_source}
|
||||
${S1AP_DIR}/s1ap_common.c
|
||||
)
|
||||
add_dependencies(S1AP_LIB rrc_flag s1ap_flag)
|
||||
|
||||
include_directories ("${S1AP_C_DIR}")
|
||||
include_directories ("${S1AP_DIR}")
|
||||
@@ -418,6 +408,7 @@ add_library(S1AP_ENB
|
||||
${S1AP_DIR}/s1ap_eNB_trace.c
|
||||
${S1AP_DIR}/s1ap_eNB_ue_context.c
|
||||
)
|
||||
add_dependencies(S1AP_ENB rrc_flag s1ap_flag)
|
||||
|
||||
#X2AP
|
||||
# Same limitation as described in RRC/S1AP: unknown generated file list
|
||||
@@ -445,22 +436,19 @@ endif(${X2AP_RELEASE} STREQUAL "R8")
|
||||
add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
|
||||
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
|
||||
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
|
||||
message("calling ASN1C_PREFIX=X2AP_ asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}")
|
||||
execute_process(COMMAND mkdir -p ${X2AP_C_DIR}
|
||||
COMMAND env "ASN1C_PREFIX=X2AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
|
||||
|
||||
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
|
||||
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps
|
||||
RESULT_VARIABLE ret)
|
||||
if (NOT ${ret} STREQUAL 0)
|
||||
message(FATAL_ERROR "${ret}: error")
|
||||
endif (NOT ${ret} STREQUAL 0)
|
||||
|
||||
file(GLOB X2AP_source ${X2AP_C_DIR}/*.c)
|
||||
|
||||
file(GLOB x2ap_h ${X2AP_C_DIR}/*.h)
|
||||
set(x2ap_h ${x2ap_h})
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT ${X2AP_C_DIR}/X2AP_asn_constant.h
|
||||
COMMAND mkdir -p ${X2AP_C_DIR}
|
||||
COMMAND env "ASN1C_PREFIX=X2AP_" asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
|
||||
add_custom_target (
|
||||
x2_flag ALL
|
||||
COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${X2AP_C_DIR}" "${X2AP_ASN_DIR}/${X2AP_ASN_FILES}" "X2AP_" -fno-include-deps
|
||||
DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
|
||||
)
|
||||
|
||||
@@ -468,6 +456,7 @@ add_library(X2AP_LIB
|
||||
${X2AP_source}
|
||||
${X2AP_DIR}/x2ap_common.c
|
||||
)
|
||||
add_dependencies(X2AP_LIB rrc_flag x2_flag)
|
||||
|
||||
include_directories ("${X2AP_C_DIR}")
|
||||
include_directories ("${X2AP_DIR}")
|
||||
@@ -481,6 +470,7 @@ add_library(X2AP_ENB
|
||||
${X2AP_DIR}/x2ap_eNB_management_procedures.c
|
||||
${X2AP_DIR}/x2ap_eNB_generate_messages.c
|
||||
)
|
||||
add_dependencies(X2AP_ENB rrc_flag x2_flag)
|
||||
|
||||
# Hardware dependant options
|
||||
###################################
|
||||
@@ -551,6 +541,15 @@ set(TPLIB_ETHERNET_SOURCE
|
||||
)
|
||||
add_library(oai_eth_transpro MODULE ${TPLIB_ETHERNET_SOURCE} )
|
||||
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||
set(option_HWIRISLIB_lib "-l SoapySDR")
|
||||
set(HWLIB_IRIS_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
|
||||
)
|
||||
add_library(oai_irisdevif MODULE ${HWLIB_IRIS_SOURCE})
|
||||
target_include_directories(oai_irisdevif PRIVATE /usr/local/lib/SoapySDR/modules0.7/)
|
||||
target_link_libraries(oai_irisdevif SoapySDR)
|
||||
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/mobipass/")
|
||||
set(TPLIB_MOBIPASS_SOURCE
|
||||
${OPENAIR_TARGETS}/ARCH/mobipass/interface.c
|
||||
@@ -616,6 +615,7 @@ add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchang
|
||||
add_boolean_option(UE_EXPANSION False "enable UE_EXPANSION with max 256 UE")
|
||||
add_boolean_option(PHY_TX_THREAD False "enable UE_EXPANSION with max 256 UE")
|
||||
add_boolean_option(PRE_SCD_THREAD False "enable UE_EXPANSION with max 256 UE")
|
||||
add_boolean_option(UESIM_EXPANSION False "enable UESIM_EXPANSION with max 256 UE")
|
||||
|
||||
########################
|
||||
# Include order
|
||||
@@ -630,7 +630,6 @@ add_boolean_option(ENABLE_VCD True "always true now, time measurem
|
||||
add_boolean_option(ENABLE_VCD_FIFO True "time measurements of proc calls and var displays sent to FIFO (one more thread)")
|
||||
add_boolean_option(LINUX False "used in weird memcpy() in pdcp.c ???")
|
||||
add_boolean_option(LINUX_LIST False "used only in lists.c: either use OAI implementation of lists or Linux one (should be True, but it is False")
|
||||
add_boolean_option(LOG_NO_THREAD True "Disable thread for log, seems always set to true")
|
||||
add_boolean_option(OPENAIR_LTE True "Seems legacy: keep it to true")
|
||||
|
||||
##########################
|
||||
@@ -873,6 +872,7 @@ add_library(FLEXRAN_AGENT
|
||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
|
||||
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c
|
||||
)
|
||||
add_dependencies(FLEXRAN_AGENT rrc_flag)
|
||||
set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT)
|
||||
#include_directories(${OPENAIR2_DIR}/ENB_APP)
|
||||
|
||||
@@ -938,6 +938,7 @@ set(UTIL_SRC
|
||||
# ${OPENAIR2_DIR}/UTIL/OTG/otg_rx.c
|
||||
)
|
||||
add_library(UTIL ${UTIL_SRC})
|
||||
add_dependencies(UTIL rrc_flag)
|
||||
|
||||
#set(OMG_SUMO_SRC
|
||||
# ${OPENAIR2_DIR}/UTIL/OMG/client_traci_OMG.c
|
||||
@@ -977,12 +978,14 @@ set(SCHED_SRC
|
||||
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
|
||||
)
|
||||
add_library(SCHED_LIB ${SCHED_SRC})
|
||||
add_dependencies(SCHED_LIB rrc_flag)
|
||||
|
||||
set(SCHED_SRC_RU
|
||||
${OPENAIR1_DIR}/SCHED/ru_procedures.c
|
||||
${OPENAIR1_DIR}/SCHED/prach_procedures.c
|
||||
)
|
||||
add_library(SCHED_RU_LIB ${SCHED_SRC_RU})
|
||||
add_dependencies(SCHED_RU_LIB rrc_flag)
|
||||
|
||||
set(SCHED_SRC_UE
|
||||
${OPENAIR1_DIR}/SCHED_UE/phy_procedures_lte_ue.c
|
||||
@@ -992,6 +995,7 @@ set(SCHED_SRC_UE
|
||||
${OPENAIR1_DIR}/SCHED_UE/srs_pc.c
|
||||
)
|
||||
add_library(SCHED_UE_LIB ${SCHED_SRC_UE})
|
||||
add_dependencies(SCHED_UE_LIB rrc_flag)
|
||||
|
||||
# nFAPI
|
||||
#################################
|
||||
@@ -1043,6 +1047,7 @@ set(NFAPI_USER_SRC
|
||||
${NFAPI_USER_DIR}/nfapi_vnf.c
|
||||
)
|
||||
add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC})
|
||||
add_dependencies(NFAPI_USER_LIB rrc_flag)
|
||||
include_directories(${NFAPI_USER_DIR})
|
||||
|
||||
# Layer 1
|
||||
@@ -1061,9 +1066,6 @@ set(PHY_TURBOIF
|
||||
|
||||
add_library(coding MODULE ${PHY_TURBOSRC} )
|
||||
set(PHY_SRC_COMMON
|
||||
# depend on code generation from asn1c
|
||||
${RRC_FULL_DIR}/asn_constant.h
|
||||
# actual source
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
|
||||
# ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slss.c
|
||||
@@ -1114,7 +1116,6 @@ set(PHY_SRC_COMMON
|
||||
)
|
||||
|
||||
set(PHY_SRC
|
||||
# actual source
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pss.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c
|
||||
@@ -1142,7 +1143,6 @@ set(PHY_SRC
|
||||
)
|
||||
|
||||
set(PHY_SRC_RU
|
||||
# actual source
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
|
||||
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
|
||||
@@ -1156,7 +1156,6 @@ set(PHY_SRC_RU
|
||||
)
|
||||
|
||||
set(PHY_SRC_UE
|
||||
# actual source
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/sss_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
|
||||
@@ -1205,9 +1204,13 @@ if (${COMPILATION_AVX2} STREQUAL "True")
|
||||
endif ()
|
||||
|
||||
add_library(PHY_COMMON ${PHY_SRC_COMMON})
|
||||
add_dependencies(PHY_COMMON rrc_flag)
|
||||
add_library(PHY ${PHY_SRC})
|
||||
add_dependencies(PHY rrc_flag)
|
||||
add_library(PHY_UE ${PHY_SRC_UE})
|
||||
add_dependencies(PHY_UE rrc_flag)
|
||||
add_library(PHY_RU ${PHY_SRC_RU})
|
||||
add_dependencies(PHY_RU rrc_flag)
|
||||
|
||||
#Library for mex functions
|
||||
#########################3
|
||||
@@ -1377,11 +1380,13 @@ add_library(L2
|
||||
${MAC_SRC}
|
||||
${ENB_APP_SRC})
|
||||
# ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c)
|
||||
add_dependencies(L2 rrc_flag s1ap_flag x2_flag)
|
||||
|
||||
add_library(L2_UE
|
||||
${L2_SRC_UE}
|
||||
${MAC_SRC_UE}
|
||||
)
|
||||
add_dependencies(L2_UE rrc_flag s1ap_flag x2_flag)
|
||||
|
||||
include_directories(${NFAPI_USER_DIR})
|
||||
|
||||
@@ -1407,6 +1412,7 @@ set (GTPV1U_SRC
|
||||
${GTPV1U_DIR}/gtpv1u_teid_pool.c
|
||||
)
|
||||
add_library(GTPV1U ${GTPV1U_SRC})
|
||||
add_dependencies(GTPV1U rrc_flag)
|
||||
|
||||
set(SCTP_SRC
|
||||
${OPENAIR3_DIR}/SCTP/sctp_common.c
|
||||
@@ -1414,8 +1420,10 @@ set(SCTP_SRC
|
||||
${OPENAIR3_DIR}/SCTP/sctp_eNB_itti_messaging.c
|
||||
)
|
||||
add_library(SCTP_CLIENT ${SCTP_SRC})
|
||||
add_dependencies(SCTP_CLIENT rrc_flag)
|
||||
|
||||
add_library(UDP ${OPENAIR3_DIR}/UDP/udp_eNB_task.c)
|
||||
add_dependencies(UDP rrc_flag)
|
||||
|
||||
|
||||
set(NAS_SRC ${OPENAIR3_DIR}/NAS/)
|
||||
@@ -1664,6 +1672,7 @@ if(NAS_UE)
|
||||
${libnas_ue_esm_OBJS}
|
||||
${libnas_ue_esm_sap_OBJS}
|
||||
)
|
||||
add_dependencies(LIB_NAS_UE rrc_flag)
|
||||
set(NAS_UE_LIB LIB_NAS_UE)
|
||||
|
||||
include_directories(${NAS_SRC}UE)
|
||||
@@ -1787,6 +1796,15 @@ include_directories(${CRYPTO_INCLUDE_DIRS})
|
||||
if (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
find_package(Boost REQUIRED)
|
||||
include_directories(${LIBBOOST_INCLUDE_DIR})
|
||||
|
||||
elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
|
||||
include_directories("${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/")
|
||||
include_directories("/usr/local/include/")
|
||||
set(HW_SOURCE ${HW_SOURCE}
|
||||
${OPENAIR_TARGETS}/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp)
|
||||
LINK_DIRECTORIES("/usr/local/lib")
|
||||
set(option_HW_lib "-lSoapySDR -rdynamic -ldl")
|
||||
|
||||
endif (${RF_BOARD} STREQUAL "OAI_USRP")
|
||||
|
||||
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
|
||||
@@ -1921,12 +1939,11 @@ add_definitions(-DASN1_MINIMUM_VERSION=924)
|
||||
###################################################
|
||||
|
||||
add_executable(lte-softmodem
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-common.c
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks.c
|
||||
@@ -1944,6 +1961,7 @@ add_executable(lte-softmodem
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag)
|
||||
|
||||
target_link_libraries (lte-softmodem
|
||||
-Wl,--start-group
|
||||
@@ -1960,12 +1978,11 @@ target_link_libraries (lte-softmodem ${T_LIB})
|
||||
# lte-softmodem-nos1 is both eNB and UE implementation
|
||||
###################################################
|
||||
add_executable(lte-softmodem-nos1
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-common.c
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks.c
|
||||
@@ -1982,6 +1999,7 @@ add_executable(lte-softmodem-nos1
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
add_dependencies(lte-softmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
||||
target_link_libraries (lte-softmodem-nos1
|
||||
-Wl,--start-group
|
||||
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${RAL_LIB} ${ITTI_LIB}
|
||||
@@ -1998,11 +2016,10 @@ target_link_libraries (lte-softmodem-nos1 ${T_LIB})
|
||||
#######################################
|
||||
|
||||
add_executable(lte-uesoftmodem
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-common.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
${OPENAIR_TARGETS}/RT/USER/rfsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
@@ -2021,6 +2038,7 @@ add_executable(lte-uesoftmodem
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
add_dependencies(lte-uesoftmodem rrc_flag s1ap_flag x2_flag)
|
||||
target_link_libraries (lte-uesoftmodem
|
||||
-Wl,--start-group
|
||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
|
||||
@@ -2036,11 +2054,10 @@ target_link_libraries (lte-uesoftmodem ${T_LIB})
|
||||
# lte-uesoftmodem-nos1 is UE implementation
|
||||
###################################################
|
||||
add_executable(lte-uesoftmodem-nos1
|
||||
${rrc_h}
|
||||
${s1ap_h}
|
||||
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem-common.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
${OPENAIR_TARGETS}/RT/USER/rfsim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
@@ -2060,6 +2077,7 @@ add_executable(lte-uesoftmodem-nos1
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
add_dependencies(lte-uesoftmodem-nos1 rrc_flag s1ap_flag x2_flag)
|
||||
target_link_libraries (lte-uesoftmodem-nos1
|
||||
-Wl,--start-group
|
||||
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU ${RAL_LIB} ${ITTI_LIB}
|
||||
@@ -2136,7 +2154,6 @@ add_executable(test_epc_generate_scenario
|
||||
${OPENAIR2_DIR}/ENB_APP/enb_config.h
|
||||
${OPENAIR2_DIR}/COMMON/commonDef.h
|
||||
${OPENAIR2_DIR}/COMMON/messages_def.h
|
||||
${OPENAIR2_DIR}/COMMON/messages_types.h
|
||||
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
|
||||
)
|
||||
target_link_libraries (test_epc_generate_scenario
|
||||
@@ -2156,7 +2173,6 @@ add_executable(test_epc_play_scenario
|
||||
${OPENAIR3_DIR}/TEST/EPC_TEST/play_scenario.h
|
||||
${OPENAIR2_DIR}/COMMON/commonDef.h
|
||||
${OPENAIR2_DIR}/COMMON/messages_def.h
|
||||
${OPENAIR2_DIR}/COMMON/messages_types.h
|
||||
)
|
||||
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
|
||||
target_link_libraries (test_epc_play_scenario
|
||||
|
||||
@@ -76,7 +76,6 @@ macro(add_boolean_option name val helpstr)
|
||||
endmacro(add_boolean_option)
|
||||
|
||||
# compilation flags
|
||||
# added CMAKER conditional compilation to not bother legacy building system
|
||||
#############################################
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
@@ -84,7 +83,7 @@ endif()
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel)
|
||||
|
||||
#
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -DCMAKER")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat ")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ggdb -DMALLOC_CHECK_=3 -O2")
|
||||
|
||||
|
||||
@@ -956,20 +956,20 @@
|
||||
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
|
||||
<pre_exec_args></pre_exec_args>
|
||||
<main_exec> $OPENAIR_DIR/targets/bin/dlsim.Rel14</main_exec>
|
||||
<main_exec_args> -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
||||
-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O60
|
||||
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
||||
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O60
|
||||
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O25
|
||||
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O25
|
||||
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O60
|
||||
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O60
|
||||
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
||||
-m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O60
|
||||
-m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O60
|
||||
-m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O60
|
||||
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O60
|
||||
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O60</main_exec_args>
|
||||
<main_exec_args> -m=5 -g=F -s=-1= -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
|
||||
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60
|
||||
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25
|
||||
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25
|
||||
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60
|
||||
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60
|
||||
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||
-m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60
|
||||
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60
|
||||
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60
|
||||
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60
|
||||
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60</main_exec_args>
|
||||
<tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b</tags>
|
||||
<search_expr_true>"passed"</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
|
||||
@@ -43,6 +43,7 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
|
||||
MSC_GEN=0
|
||||
XFORMS="True"
|
||||
UE_EXPANSION="False"
|
||||
UESIM_EXPANSION="False"
|
||||
PRINT_STATS="False"
|
||||
VCD_TIMING="False"
|
||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||
@@ -107,7 +108,7 @@ Options
|
||||
Rel8 limits the implementation to 3GPP Release 8 version
|
||||
Rel10 limits the implementation to 3GPP Release 10 version
|
||||
-w | --hardware
|
||||
EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, None (Default)
|
||||
EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, IRIS, None (Default)
|
||||
Adds this RF board support (in external packages installation and in compilation)
|
||||
-t | --transport protocol
|
||||
ETHERNET , None
|
||||
@@ -218,6 +219,10 @@ function main() {
|
||||
UE_EXPANSION="True"
|
||||
echo_info "Will compile with UE_EXPANSION"
|
||||
shift;;
|
||||
--musim)
|
||||
UESIM_EXPANSION="True"
|
||||
echo_info "Will compile with UESIM_EXPANSION"
|
||||
shift;;
|
||||
--UE-conf-nvram)
|
||||
conf_nvram_path=$(readlink -f $2)
|
||||
shift 2;;
|
||||
@@ -231,7 +236,7 @@ function main() {
|
||||
-w | --hardware)
|
||||
HW="$2" #"${i#*=}"
|
||||
# Use OAI_USRP as the key word USRP is used inside UHD driver
|
||||
if [ "$HW" != "BLADERF" -a "$HW" != "USRP" -a "$HW" != "LMSSDR" -a "$HW" != "None" -a "$HW" != "EXMIMO" ] ; then
|
||||
if [ "$HW" != "BLADERF" -a "$HW" != "USRP" -a "$HW" != "LMSSDR" -a "$HW" != "None" -a "$HW" != "EXMIMO" -a "$HW" != "IRIS" ] ; then
|
||||
echo_fatal "Unknown HW type $HW will exit..."
|
||||
else
|
||||
if [ "$HW" == "USRP" ] ; then
|
||||
@@ -243,6 +248,9 @@ function main() {
|
||||
if [ "$HW" == "LMSSDR" ] ; then
|
||||
HW="OAI_LMSSDR"
|
||||
fi
|
||||
if [ "$HW" == "IRIS" ] ; then
|
||||
HW="OAI_IRIS"
|
||||
fi
|
||||
echo_info "Setting hardware to: $HW"
|
||||
fi
|
||||
shift 2;;
|
||||
@@ -414,7 +422,9 @@ function main() {
|
||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||
elif [ "$HW" = "OAI_BLADERF" ] ; then
|
||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||
elif [ "$HW" = "OAI_LMSSDR" ] ; then
|
||||
elif [ "$HW" = "OAI_LMSSDR" ] ; then
|
||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||
elif [ "$HW" = "OAI_IRIS" ] ; then
|
||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||
elif [ "$HW" = "None" ] ; then
|
||||
DEADLINE_SCHEDULER_FLAG_USER="False"
|
||||
@@ -484,6 +494,13 @@ function main() {
|
||||
flash_firmware_bladerf
|
||||
fi
|
||||
fi
|
||||
if [ "$HW" == "OAI_IRIS" ] ; then
|
||||
echo_info "installing packages for IRIS support"
|
||||
check_install_soapy
|
||||
#if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
||||
# flash_firmware_iris
|
||||
#fi
|
||||
fi
|
||||
echo_info "installing protobuf/protobuf-c for flexran agent support"
|
||||
install_protobuf_from_source
|
||||
install_protobuf_c_from_source
|
||||
@@ -539,6 +556,7 @@ function main() {
|
||||
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
|
||||
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( UESIM_EXPANSION $UESIM_EXPANSION )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
@@ -651,6 +669,9 @@ function main() {
|
||||
compilations \
|
||||
lte-simulators coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
# compilations \
|
||||
# lte-simulators $config_libconfig_shlib \
|
||||
# lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||
fi
|
||||
|
||||
# Core simulators
|
||||
@@ -756,6 +777,14 @@ function main() {
|
||||
ln -sf liboai_lmssdrdevif.so liboai_device.so
|
||||
ln -sf $dbin/liboai_lmssdrdevif.so.$REL $dbin/liboai_device.so
|
||||
echo_info "liboai_device.so is linked to LMSSDR device library"
|
||||
elif [ "$HW" == "OAI_IRIS" ] ; then
|
||||
compilations \
|
||||
$build_dir oai_irisdevif \
|
||||
liboai_irisdevif.so $dbin/liboai_irisdevif.so.$REL
|
||||
|
||||
ln -s liboai_irisdevif.so liboai_device.so
|
||||
ln -s $dbin/liboai_irisdevif.so.$REL $dbin/liboai_device.so
|
||||
echo_info "liboai_device.so is linked to IRIS device library"
|
||||
else
|
||||
echo_info "liboai_device.so is not linked to any device library"
|
||||
fi
|
||||
|
||||
@@ -9,4 +9,5 @@ set(MU_RECIEVER False)
|
||||
set(NAS_UE False)
|
||||
set(MESSAGE_CHART_GENERATOR False)
|
||||
set(RRC_ASN1_VERSION "Rel14")
|
||||
set (UE_TIMING_TRACE True)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
|
||||
@@ -32,8 +32,8 @@ OS_DISTRO=$(grep "^ID=" /etc/os-release | sed "s/ID=//" | sed "s/\"//g")
|
||||
OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "s/\"//g")
|
||||
case "$OS_DISTRO" in
|
||||
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
|
||||
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
|
||||
centos) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
|
||||
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum --skip-broken"; CMAKE="cmake3" ;;
|
||||
centos) OS_BASEDISTRO="fedora"; INSTALLER="yum --skip-broken"; CMAKE="cmake3" ;;
|
||||
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
|
||||
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
|
||||
esac
|
||||
@@ -252,7 +252,7 @@ install_usrp_uhd_driver_from_source(){
|
||||
rm -rf /tmp/uhd
|
||||
git clone https://github.com/EttusResearch/uhd.git
|
||||
cd uhd
|
||||
git checkout tags/release_003_010_001_001
|
||||
git checkout tags/v3.13.0.2
|
||||
mkdir -p host/build
|
||||
cd host/build
|
||||
$CMAKE ../
|
||||
@@ -372,13 +372,81 @@ check_install_lmssdr_driver(){
|
||||
else
|
||||
echo_error "lmssdr support implies installing lmssdr drivers and tools" \
|
||||
" from sources. check:"
|
||||
echo_info "https://open-cells.com/index.php/2017/05/10/limesdr-installation/"
|
||||
echo_info "https://wiki.myriadrf.org/Lime_Suite"
|
||||
echo_fatal "Cannot compile lmssdr device"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
install_soapy_from_source(){
|
||||
soapy_install_log=$OPENAIR_DIR/cmake_targets/log/soapy_install_log.txt
|
||||
echo_info "\nInstalling Soapy EcoSystem from source. The log file for Soapy installation is here: $soapy_install_log "
|
||||
(
|
||||
cd /tmp
|
||||
echo "Downloading SoapySDR"
|
||||
rm -rf /tmp/soapysdr
|
||||
git clone -b soapy-sdr-0.7.0 --single-branch https://github.com/pothosware/SoapySDR.git
|
||||
cd SoapySDR
|
||||
#git checkout tags/release_003_010_001_001
|
||||
mkdir -p build
|
||||
cd build
|
||||
$CMAKE ../
|
||||
echo "Compiling SoapySDR"
|
||||
make -j`nproc`
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
cd /tmp
|
||||
echo "Downloading SoapyRemote"
|
||||
rm -rf /tmp/soapyremote
|
||||
git clone -b soapy-remote-0.5.0 --single-branch https://github.com/pothosware/SoapyRemote.git
|
||||
cd SoapyRemote
|
||||
#git checkout tags/release_003_010_001_001
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ../
|
||||
echo "Compiling SoapyRemote"
|
||||
make -j`nproc`
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
) >& $soapy_install_log
|
||||
}
|
||||
|
||||
install_soapy_iris_from_source(){
|
||||
iris_install_log=$OPENAIR_DIR/cmake_targets/log/iris_install_log.txt
|
||||
echo_info "\nInstalling Iris driver from source. The log file for Iris driver installation is here: $iris_install_log "
|
||||
(
|
||||
cd /tmp
|
||||
echo "Downloading SoapyIris"
|
||||
rm -rf /tmp/sklk-soapyiris
|
||||
git clone -b soapy-iris-2018.08.0.1 --single-branch https://github.com/skylarkwireless/sklk-soapyiris.git
|
||||
cd sklk-soapyiris
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ../
|
||||
echo "Compiling SoapyIris"
|
||||
make -j`nproc`
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
) >& $iris_install_log
|
||||
}
|
||||
|
||||
check_install_soapy () {
|
||||
#if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
#first we remove old installation
|
||||
$SUDO apt-get remove -y soapysdr soapysdr-server libsoapysdr-dev python-soapysdr python3-soapysdr soapysdr-module-remote || true
|
||||
#$SUDO add-apt-repository -y ppa:myriadrf/drivers
|
||||
#$SUDO apt-get update
|
||||
#$SUDO apt-get install -y soapysdr soapysdr-server libsoapysdr-dev python-soapysdr python3-soapysdr soapysdr-module-remote
|
||||
|
||||
#elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||
# $SUDO $INSTALLER -y install software-properties-common python3-software-properties python-software-properties subversion git python3 python-numpy python3-numpy cmake swig python-dev
|
||||
install_soapy_from_source
|
||||
#fi
|
||||
install_soapy_iris_from_source
|
||||
|
||||
}
|
||||
|
||||
check_install_additional_tools (){
|
||||
$SUDO $INSTALLER update -y
|
||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
@@ -683,7 +751,7 @@ install_asn1c_from_source(){
|
||||
# better to use a given commit than a branch in case the branch
|
||||
# is updated and requires modifications in the source of OAI
|
||||
#git checkout velichkov_s1ap_plus_option_group
|
||||
git checkout d3aed06bb2bec7df1b5c6d0333f8c7dfc5993372
|
||||
git checkout 0a7524184f16e7093990a31d8d4db487a16e5782
|
||||
autoreconf -iv
|
||||
./configure
|
||||
make -j`nproc`
|
||||
|
||||
@@ -52,20 +52,20 @@ load_module ../../targets/bin/ue_ip.ko
|
||||
|
||||
if [ "$1" = "UE" ]; then
|
||||
echo "bring up $LTEIF interface for UE"
|
||||
ifconfig $LTEIF up
|
||||
sudo ifconfig $LTEIF up
|
||||
fi
|
||||
|
||||
ip route flush cache
|
||||
sudo ip route flush cache
|
||||
sleep 1
|
||||
sysctl -w net.ipv4.conf.all.log_martians=1
|
||||
sudo sysctl -w net.ipv4.conf.all.log_martians=1
|
||||
echo "Disabling reverse path filtering"
|
||||
sysctl -w net.ipv4.conf.all.rp_filter=0
|
||||
ip route flush cache
|
||||
sudo sysctl -w net.ipv4.conf.all.rp_filter=0
|
||||
sudo ip route flush cache
|
||||
|
||||
# Check table 200 lte in /etc/iproute2/rt_tables
|
||||
fgrep lte /etc/iproute2/rt_tables > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "200 lte " >> /etc/iproute2/rt_tables
|
||||
fi
|
||||
ip rule add fwmark 1 table lte
|
||||
ip route add default dev $LTEIF table lte
|
||||
sudo ip rule add fwmark 1 table lte
|
||||
sudo ip route add default dev $LTEIF table lte
|
||||
|
||||
15
cmake_targets/tools/make_asn1c_includes.sh
Executable file
15
cmake_targets/tools/make_asn1c_includes.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
GENERATED_FULL_DIR=$1
|
||||
shift
|
||||
ASN1_SOURCE_DIR=$1
|
||||
shift
|
||||
export ASN1C_PREFIX=$1
|
||||
shift
|
||||
options=$*
|
||||
done_flag="$GENERATED_FULL_DIR"/done
|
||||
if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then
|
||||
rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h
|
||||
mkdir -p "$GENERATED_FULL_DIR"
|
||||
asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example $options -D $GENERATED_FULL_DIR $ASN1_SOURCE_DIR |& egrep -v "^Copied|^Compiled" | sort -u
|
||||
fi
|
||||
touch $done_flag
|
||||
11
common/config/DOC/config.md
Normal file
11
common/config/DOC/config.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# OAI configuration module
|
||||
|
||||
The configuration module provides an api that other oai components can use to get parameters at init time. It defines a parameter structure, used to describe parameters attributes (for example name and type). The same structure includes a pointer to the variable where the configuration module writes the parameter value, at run time, when calling config_get or config_getlist functions. For each parameter a function to check the value can be specified and pre-defined functions are provided for some common parameter validations (integer in a range or in a list, string in a list). The module also include an api to check that no unknown options have been entered on the command line and a a mechanism to display a help text for suppoted parameters.
|
||||
|
||||
## Documentation
|
||||
|
||||
* [runtime usage](config/rtusage.md)
|
||||
* [developer usage](config/devusage.md)
|
||||
* [module architecture](config/arch.md)
|
||||
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
7
common/config/DOC/config/arch.md
Normal file
7
common/config/DOC/config/arch.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# config module source files
|
||||

|
||||
# config module components
|
||||

|
||||
|
||||
|
||||
[Configuration module home](../config.md)
|
||||
20
common/config/DOC/config/devusage.md
Normal file
20
common/config/DOC/config/devusage.md
Normal file
@@ -0,0 +1,20 @@
|
||||
The configuration module objectives are
|
||||
1. Allow easy parameters management in oai, helping the development of a flexible, modularized and fully configurable softmodem.
|
||||
1. Use a common configuration API in all oai modules
|
||||
1. Allow development of alternative configuration sources without modifying the oai code. Today the only delivered configuration source is the libconfig format configuration file.
|
||||
|
||||
As a developer you may need to look at these sections:
|
||||
|
||||
* [add parameters in an existing section](devusage/addaparam.md)
|
||||
* [add a parameter set, in a new section](devusage/addparamset.md)
|
||||
* [configuration module API](devusage/api.md)
|
||||
* [configuration module public structures](devusage/struct.md)
|
||||
|
||||
Whatever your need is, configuration module usage examples can be found in oai sources:
|
||||
* complex example, using all the configuration module functionalities, including parameter checking:
|
||||
[NB-IoT configuration code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_config.c) and [NB-IoT configuration include file](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/ENB_APP/NB_IoT_paramdef.h)
|
||||
* very simple example, just reading a parameter set corresponding to a dedicated section: the telnetsrv_autoinit function in [common/utils/telnetsrv/telnetsrv.c, around line 726](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/telnetsrv/telnetsrv.c#L726)
|
||||
* an example with run-time definition of parameters, in the logging sub-system: the log_getconfig function at the top of [openair2/UTIL/LOG/log.c](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/UTIL/LOG/log.c)
|
||||
|
||||
|
||||
[Configuration module home](../config.md)
|
||||
86
common/config/DOC/config/devusage/addaparam.md
Normal file
86
common/config/DOC/config/devusage/addaparam.md
Normal file
@@ -0,0 +1,86 @@
|
||||
To add a new parameter in an existing section you insert an item in a `paramdef_t` array, which describes the parameters to be read in the existing `config_get` call. You also need to increment the numparams argument.
|
||||
|
||||
existing code:
|
||||
```c
|
||||
unsigned int varopt1;
|
||||
paramdef_t someoptions[] = {
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* configuration parameters for some module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
{"opt1", "<help opt1>", 0, uptr:&varopt1, defuintval:0, TYPE_UINT, 0 },
|
||||
};
|
||||
|
||||
config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection");
|
||||
|
||||
```
|
||||
new code:
|
||||
```c
|
||||
unsigned int varopt1;
|
||||
|
||||
|
||||
/* varopt2 will be allocated by the config module and free at end_configmodule call
|
||||
except if PARAMFLAG_NOFREE bit is set in paramflags field*/
|
||||
char *varopt2;
|
||||
paramdef_t someoptions[] = {
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* configuration parameters for some module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
{"opt1", "<help opt1>", 0, uptr:&varopt1, defuintval:0,TYPE_UINT, 0 },
|
||||
{"opt2", "<help opt2>", 0, strptr:&varopt2,defstrval:"",TYPE_STRING,0 },
|
||||
};
|
||||
|
||||
config_get( someoptions,sizeof(someoptions)/sizeof(paramdef_t),"somesection");
|
||||
|
||||
```
|
||||
|
||||
The corresponding configuration file may now include opt2 parameter in the somesection section:
|
||||
|
||||
```c
|
||||
somesection =
|
||||
{
|
||||
opt1 = 3;
|
||||
opt2 = "abcd";
|
||||
};
|
||||
```
|
||||
|
||||
In these examples the variables used to retrieve the parameters values are pointed by the `uptr` or `strptr` fields of the `paramdef_t` structure. After the `config_get` call `varopt1` and `varopt2` have been set to the value specified in the config file. It is also possible to specify a `NULL` value to the `< XXX >ptr` fields, which are then allocated by the config module and possibly free when calling `config_end()`, if the `PARAMFLAG_NOFREE` bit has not been set in the `paramflags` field.
|
||||
|
||||
The configuration module provides a mechanism to check the parameter value read from the configuration source. The following functions are implemented:
|
||||
1. Check an integer parameter against a list of authorized values
|
||||
1. Check an integer parameter against a list of authorized values and set the parameter to a new value
|
||||
1. Check an integer parameter against a range
|
||||
1. Check a C string parameter against a list of authorized values
|
||||
1. Check a C string parameter against a list of authorized values and set the parameter to a new integer value
|
||||
|
||||
A `checkedparam_t` structure array provides the parameter verification procedures:
|
||||
|
||||
```c
|
||||
/*
|
||||
definition of the verification to be done on param opt1 and opt2.
|
||||
opt1 is an integer option we must be set to 0,2,3,4 or 7 in the
|
||||
config source.
|
||||
if opt1 is set to 0 in the config file, it will be set to 1, etc
|
||||
opt2 is C string option with the authorize values "zero","oneThird","twoThird","one"
|
||||
*/
|
||||
#define OPT1_OKVALUES {0,2,3,4,7}
|
||||
#define OPT1_NEWVALUES {1,1,0,6,9}
|
||||
#define OPT2_OKVALUES {"zero","oneThird","twoThird","one"}
|
||||
|
||||
#define OPT_CHECK_DESC { \
|
||||
{ .s1a= { config_check_modify_integer, OPT1_OKVALUE, OPT1_NEWVALUES ,5 }}, \
|
||||
{ .s3= { config_check_strval, OPT2_OKVALUES,4 }}, \
|
||||
}
|
||||
checkedparam_t checkopt[] = OPT_CHECK_DESC;
|
||||
.....
|
||||
/* assign the verification procedures to the parameters definitions */
|
||||
for(int i=0 ; i < sizeof(someoptions)/sizeof(paramdesc_t) ; i ++) {
|
||||
someoptions[i].chkPptr = &(checkopt[i]);
|
||||
}
|
||||
....
|
||||
```
|
||||
When you need a specific verification algorithm, you can provide your own verification function and use it in place of the available ones, in the `checkedparam_t` union. If no existing structure definition match your need, you can enhance the configuration module. You then have to add a new verification function in https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_userapi.c and add a new structure definition in the `checkedparam_t` type defined in https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
131
common/config/DOC/config/devusage/addparamset.md
Normal file
131
common/config/DOC/config/devusage/addparamset.md
Normal file
@@ -0,0 +1,131 @@
|
||||
The configuration module maps a configuration file section to a `paramdef_t` structure array. One `config_get` call can be used to return the values of all the parameters described in the `paramdef_t` array.
|
||||
Retrieving a single occurence of a parameter set ( a group in the libconfig terminology) is just a two steps task:
|
||||
1. describe the parameters in a `paramdef_t` array
|
||||
1. call the `config_get` function
|
||||
|
||||
|
||||
[config_get example](../../config/devusage/addaparam.md)
|
||||
|
||||
|
||||
In oai some parameters set may be instantiated a variable number of occurrences. In a configuration file this is mapped to lists of group of parameters, with this syntax:
|
||||
```c
|
||||
NB-IoT_MACRLCs =
|
||||
/* start list element 1 */
|
||||
(
|
||||
/* start a group of parameters */
|
||||
{
|
||||
num_cc = 2;
|
||||
.....
|
||||
remote_s_portd = 55001;
|
||||
}
|
||||
),
|
||||
/* start list element 2 */
|
||||
(
|
||||
/* start a group of parameters */
|
||||
{
|
||||
num_cc = 1;
|
||||
......
|
||||
remote_s_portd = 65001;
|
||||
}
|
||||
);
|
||||
|
||||
```
|
||||
The configuration module provides the `config_getlist` call to support lists of group of parameters. Below is a commented code example, using the config_getlist call.
|
||||
|
||||
```c
|
||||
/* name of section containing the list */
|
||||
#define NBIOT_MACRLCLIST_CONFIG_STRING "NB-IoT_MACRLCs"
|
||||
|
||||
/*
|
||||
The following macro define the parameters names, as used in the
|
||||
configuration file
|
||||
*/
|
||||
#define CONFIG_STRING_MACRLC_CC "num_cc"
|
||||
.....
|
||||
#define CONFIG_MACRLC_S_PORTD "remote_s_portd"
|
||||
|
||||
/*
|
||||
now define a macro which will be used to initialize the NbIoT_MacRLC_Params
|
||||
variable. NbIoT_MacRLC_Params is an array of paramdef_t structure, each item
|
||||
describing a parameter. When using the config_getlist call you must let the config
|
||||
module allocate the memory for the parameters values.
|
||||
*/
|
||||
/*------------------------------------------------------------------------------------------------------------*/
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define MACRLCPARAMS_DESC { \
|
||||
{CONFIG_STRING_MACRLC_CC, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \
|
||||
............. \
|
||||
{CONFIG_MACRLC_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
/*
|
||||
the following macros define the indexes used to access the NbIoT_MacRLC_Params array
|
||||
items. They must be maintained consistent with the previous MACRLCPARAMS_DESC macro
|
||||
which is used to initialize the NbIoT_MacRLC_Params variable
|
||||
*/
|
||||
#define MACRLC_CC_IDX 0
|
||||
.........
|
||||
#define MACRLC_REMOTE_S_PORTD_IDX 16
|
||||
|
||||
|
||||
|
||||
void RCconfig_NbIoTmacrlc(void) {
|
||||
|
||||
|
||||
/*
|
||||
define and initialize the array of paramdef_t structures describing the groups of
|
||||
parameters we want to read. It will be passed as the second argument of the
|
||||
config_getlist call, which will use it as an input only argument.
|
||||
*/
|
||||
paramdef_t NbIoT_MacRLC_Params[] = MACRLCPARAMS_DESC;
|
||||
|
||||
/*
|
||||
now define and initialize a paramlist_def_t structure which will be passed
|
||||
to the config_getlist call. The first field is the only one to be initialized
|
||||
it contains the name of the section to be read.
|
||||
that section contains the list of group of parameters.
|
||||
The two other fields are output parameters used to return respectively
|
||||
a pointer to a two dimensional array of paramdef_t structures pointers, and the
|
||||
number of items in the list of groups (size of first dimension, the second one
|
||||
being the number of parameters in each group.
|
||||
*/
|
||||
paramlist_def_t NbIoT_MacRLC_ParamList = {NBIOT_MACRLCLIST_CONFIG_STRING,NULL,0};
|
||||
|
||||
|
||||
/*
|
||||
the config_getlist will allocate the second field of the paramlist_def_t structure, a
|
||||
two dimensional array of paramdef_t pointers. In each param_def item it will allocate
|
||||
the value pointer and set the value to what it will get from the config source. The
|
||||
numelt field of the paramlist_def_t structure will be set to the number of groups of
|
||||
parameters in the list.
|
||||
in this example the last argument of config_getlist is unused, it may contain a
|
||||
character string, used as a prefix for the section name. It has to be specified when the
|
||||
list to be read is under another section.
|
||||
*/
|
||||
config_getlist( &NbIoT_MacRLC_ParamList,NbIoT_MacRLC_Params,
|
||||
sizeof(NbIoT_MacRLC_Params)/sizeof(paramdef_t),
|
||||
NULL);
|
||||
|
||||
/*
|
||||
start a loop in the nuber of groups in the list, the numelt field of the
|
||||
paramlist_def_t structure has been set in the config_getlist call
|
||||
*/
|
||||
for (j=0 ; j<NbIoT_MacRLC_ParamList.numelt ; j++) {
|
||||
|
||||
..........
|
||||
|
||||
/* access the MACRLC_REMOTE_S_PORTD parameter in the j ieme group of the list */
|
||||
RC.nb_iot_mac[j]->eth_params_s.remote_portd =
|
||||
*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
|
||||
............
|
||||
|
||||
} // MacRLC_ParamList.numelt > 0
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
49
common/config/DOC/config/devusage/api.md
Normal file
49
common/config/DOC/config/devusage/api.md
Normal file
@@ -0,0 +1,49 @@
|
||||
```c
|
||||
configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags)
|
||||
```
|
||||
* Parses the command line options, looking for the –O argument
|
||||
* Loads the `libparams_<configsource>.so` (today `libparams_libconfig.so`) shared library
|
||||
* Looks for `config_<config source>_init` symbol and calls it , passing it an array of string corresponding to the « : » separated strings used in the –O option
|
||||
* Looks for `config_<config source>_get`, `config_<config source>_getlist` and `config_<config source>_end` symbols which are the three functions a configuration library should implement. Get and getlist are mandatory, end is optional.
|
||||
* Stores all the necessary information in a `configmodule_interface_t structure`, which is of no use for caller as long as we only use one configuration source.
|
||||
* if the bit CONFIG_ENABLECMDLINEONLY is set in `initflags` then the module allows parameters to be set only via the command line. This is used for the oai UE.
|
||||
|
||||
```c
|
||||
void End_configmodule(void)
|
||||
```
|
||||
* Free memory which has been allocated by the configuration module since its initialization.
|
||||
* Possibly calls the `config_<config source>_end` function
|
||||
|
||||
```c
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix)
|
||||
```
|
||||
* Reads as many parameters as described in params, they must all be in the same configuration file section
|
||||
* Calls the `config_<config source>_get` function
|
||||
* Calls the `config_process_cmdline` function
|
||||
* `params` points to an array of `paramdef_t` structures which describes the parameters to be read, possibly including a pointer to a checking function. The following bits can possibly be set in the `paramflags` mask before calling
|
||||
- `PARAMFLAG_MANDATORY`: -1 is returned if the parameter is not explicitly defined in the config source.
|
||||
- `PARAMFLAG_DISABLECMDLINE`: parameter cannot be modified via the command line
|
||||
- `PARAMFLAG_DONOTREAD`: ignore the parameter, can be used at run-time, to alter a pre-defined `paramdef_t` array which is used in several `config_get` or/and `config_getlist` calls.
|
||||
- `PARAMFLAG_NOFREE`: do not free the memory possibly allocated by the config module to store the value of the parameter. Default behavior is for the config module to free the memory it has allocated when the `config_end` function is called.
|
||||
- `PARAMFLAG_BOOL`: Only relevant for integer types. tell the config module that when processing the command line, the corresponding option can be specified without any arggument and that in this case it must set the value to 1.
|
||||
|
||||
* `params` is also used as an output parameter, `< XXX >ptr >` field is used by the config module to store the value it has read. The following bits can possibly be set in the `paramflags` mask after the call:
|
||||
- `PARAMFLAG_MALLOCINCONFIG`: memory has been allocated for the ` < XXX >ptr > ` field
|
||||
- `PARAMFLAG_PARAMSET`: parameter has been found in the config source, it is not set to default value.
|
||||
- `PARAMFLAG_PARAMSET`: parameter has been set to its default value
|
||||
* `numparams` is the number of entries in the params array
|
||||
* `prefix` is a character string to be appended to the parameters name, it defines the parameters position in the configuration file hierarchy (the section name in libconfig terminology).
|
||||
* The returned value is the number of parameters which have been assigned a value or -1 if a severe error occured
|
||||
|
||||
```c
|
||||
int config_libconfig_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix)
|
||||
```
|
||||
* Reads multiple occurrences of a parameters array
|
||||
* Calls the `config_<config source>_get` function for each list occurrence
|
||||
* `params` points to an array of `paramdef_t` structures which describes the parameters in each occurrence of the list
|
||||
* `ParamList` points to a structure, where `paramarray` field points to an array of `paramdef_t` structure, allocated by the function. It is used to return the values of the parameters.
|
||||
* The returned value is the number of occurrences in the list or -1 in case of severe error
|
||||
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
85
common/config/DOC/config/devusage/struct.md
Normal file
85
common/config/DOC/config/devusage/struct.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# `paramdef_t`structure
|
||||
It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L103). This structure is used by developers to describe parameters and by the configuration module to return parameters value. A pointer to a `paramdef_t` array is passed to `config_get` and `config_getlist` calls to instruct the configuration module what parameters it should read.
|
||||
|
||||
| Fields | Description | I/O |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `optname` | parameter name, as used when looking for it in the config source, 63 bytes max (64 with trailing \0) | I |
|
||||
| `helstr` | pointer to a C string printed when using --help on the command line | I |
|
||||
| `strptr` `strlistptr` `u8ptr` `i8ptr` `u16ptr` `i16ptr` `uptr` `iptr` `u64ptr` `i64ptr` `dblptr` `voidptr` | a pointer to a variable where the parameter value(s) will be returned. This field is an anonymous union, the supported pointer types have been built to avoid type mismatch warnings at compile time. | O |
|
||||
| `defstrval` `defstrlistval` `defuintval` `defintval` `defint64val` `defintarrayval` `defdblval` | this field is an anonymous union, it can be used to define the default value for the parameter. It is ignored if `PARAMFLAG_MANDATORY` is set in the `paramflags` field.| I |
|
||||
| `type` | Supported parameter types are defined as integer macros. Supported simple types are `TYPE_STRING`, parameter value is returned in `strptr` field, `TYPE_INT8` `TYPE_UINT8` `TYPE_INT16` `TYPE_UINT16` `TYPE_INT32` `TYPE_UINT32` `TYPE_INT64` `TYPE_UINT64`, parameter value is returned in the corresponding uXptr or iXptr, `TYPE_MASK`, value is returned in `u32ptr`, `TYPE_DOUBLE` value is returned in `dblptr`, `TYPE_IPV4ADDR` value is returned in binary, network bytes order in `u32ptr` field. `TYPE_STRINGLIST`, `TYPE_INTARRAY` and `TYPE_UINTARRAY` are multiple values types. Multiple values are returned in respectively, `strlistptr`, `iptr` and `uptr` fields which then point to arrays. The `numelt` field gives the number of item in the array. | I |
|
||||
| `numelt` | For `TYPE_STRING` where `strptr` points to a preallocated string, this field must contain the size in bytes of the available memory. For all multiple values types, this field contains the number of values in the value field.| I/O |
|
||||
| `chkPptr` | possible pointer to the structure containing the info used to check parameter values | I |
|
||||
| `processedvalue` | When `chkPptr` is not `ǸULL`, is used to return a value, computed from the original parameter, as read from the configuration source. | O |
|
||||
|
||||
# `paramlist_def_t`structure
|
||||
It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L160).
|
||||
It is used as an argument to `config_getlist` calls, to get values of multiple occurrences of group of parameters.
|
||||
|
||||
| Fields | Description | I/O |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `listname` | Name of the section containing the list, 63 bytes max (64 with trailing \0). It is used to prefix each paramater name when looking for its value. In the libconfig syntax, the parameter name full path build by the configuration module is: listname.[occurence index].optname. | I |
|
||||
| `paramarray` | Pointer to an array of `ǹumelt` `paramdef_t` pointers. It is allocated by the configuration module and is used to return the parameters values. All input fields of each `paramdef_t` occurence are a copy of the `paramdef_t` argument passed to the `config_getlist` call. | O |
|
||||
| `numelt` | Number of items in the `paramarray` field | O |
|
||||
|
||||
# `checkedparam_t` union
|
||||
It is defined in include file [ common/config/config_paramdesc.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/config/config_paramdesc.h#L62).
|
||||
This union of structures is used to provide a parameter checking mechanism. Each `paramdef_t` instance may include a pointer to a `checkedparam_t`structure which is then used by the configuration module to check the value it got from the config source.
|
||||
Each structure in the union provides one parameter verification method, which returns `-1` when the verification fails. Currently the following structures are defined in the `checkedparam_t` union:
|
||||
|
||||
| structure name | Description |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `s1` | check an integer against a list of authorized values |
|
||||
| `s1a` | check an integer against a list of authorized values and set the parameter value to another integer depending on the read value|
|
||||
| `s2` | check an integer against an authorized range, defined by its min and max value|
|
||||
| `s3` | check a string against a list of authorized values |
|
||||
| `s3a` | check a string against a list of authorized values and set the parameter value to an integer depending on the read value|
|
||||
| `s4` | generic structure, to be used to provide a specific, not defined in the configuration module, verification algorithm |
|
||||
|
||||
each of these structures provide the required fields to perform the specified parameter check. The first field is a pointer to a function, taking one argument, the `paramdef_t` structure describing the parameter to be checked. This function is called by the configuration module, in the `config_get` call , after the parameter value has been set, it then uses the other fields of the structure to perform the check.
|
||||
The configuration module provides an implementation of the functions to be used to check parameters, qs described below.
|
||||
|
||||
## `s1` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f1` | pointer to the checking function. Initialize to `config_check_intval` to use the config module implementation |
|
||||
| `okintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the authorized values |
|
||||
| `num_okintval` | number of used values in `okintval` |
|
||||
|
||||
## `s1a` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f1a` | pointer to the checking function. Initialize to `config_check_modify_integer` to use the config module implementation |
|
||||
| `okintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the authorized values |
|
||||
| `setintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the values to be used for the parameter. The configuration module implementation set the parameter value to `setintval[i]` when the configured value is `okintval[i]` |
|
||||
| `num_okintval` | number of used values in `okintval` and `setintval` |
|
||||
|
||||
## `s2` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f2` | pointer to the checking function. Initialize to `config_check_intrange` to use the config module implementation |
|
||||
| `okintrange` | array of 2 integers containing the min and max values for the parameter |
|
||||
|
||||
## `s3` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f3` | pointer to the checking function. Initialize to `config_check_strval` to use the config module implementation |
|
||||
| `okstrval` | array of `CONFIG_MAX_NUMCHECKVAL` C string pointers containing the authorized values |
|
||||
| `num_okstrval` | number of used values in `okstrtval` |
|
||||
|
||||
|
||||
## `s3a` structure
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f3a` | pointer to the checking function. Initialize to `config_checkstr_assign_integer` to use the config module implementation |
|
||||
| `okstrval` | array of `CONFIG_MAX_NUMCHECKVAL` C string pointers containing the authorized values |
|
||||
| `setintval` | array of `CONFIG_MAX_NUMCHECKVAL` integers containing the values to be used for the parameter. The configuration module implementation set the parameter value to `setintval[i]` when the configured value is `okstrval[i]` |
|
||||
| `num_okstrval` | number of used values in `okintval` and `setintval` |
|
||||
|
||||
## `s4` and `s5` structures
|
||||
| field | Description |
|
||||
|:-----------|:------------------------------------------------------------------|
|
||||
| `f4` or `f5` | pointer to the checking function. they are generic structures to be used when no existing structure provides the required parameter verification. `f4` takes one argument, the `paramdef_t` structure corresponding to the parameter to be checked (`int (*f4)(paramdef_t *param)`), `f5` taxes no argument (`void (*checkfunc)(void)`) |
|
||||
|
||||
[Configuration module developer main page](../../config/devusage.md)
|
||||
[Configuration module home](../../config.md)
|
||||
109
common/config/DOC/config/rtusage.md
Normal file
109
common/config/DOC/config/rtusage.md
Normal file
@@ -0,0 +1,109 @@
|
||||
|
||||
-O is the only mandatory command line option to start the eNodeb softmodem (lte-softmodem executable), it is used to specify the configuration source with the associated parameters:
|
||||
```bash
|
||||
$ ./lte-softmodem -O <configsource>:<parameter1>:<parameter2>:...
|
||||
```
|
||||
The configuration module can also be used without a configuration source, ie to only parse the command line. In this case the -O switch is optional. This mode is used in the ue-softmodem executable and by the phy_simulators executables (ulsim, dlsim)
|
||||
|
||||
Currently the available config sources are:
|
||||
|
||||
- **libconfig**: libconfig file. [libconfig file format](http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files) Parameter1 is the file path and parameter 2 can be used to specify the level of console messages printed by the configuration module.
|
||||
```bash
|
||||
$ ./lte-softmodem -O libconfig:<config>:dbgl<debuglevel>
|
||||
```
|
||||
- **cmdlineonly**: command line only, the default mode for lte-uesoftmodem and the phy simiulators. In this case -O may be used to specify the config module debug level.
|
||||
|
||||
The debug level is a mask:
|
||||
* bit 1: print parameters values
|
||||
* bit 2: print memory allocation/free performed by the config module
|
||||
* bit 3: print command line processing messages
|
||||
* bit 4: disable execution abort when parameters checking fails
|
||||
|
||||
As a oai user, you may have to use bit 1 (dbgl1) , to check your configuration and get the full name of a parameter you would like to modify on the command line. Other bits are for developers usage, (dbgl7 will print all debug messages).
|
||||
|
||||
```bash
|
||||
$ ./lte-softmodem -O libconfig:<config>:dbgl1
|
||||
```
|
||||
```bash
|
||||
$ ./lte-uesoftmodem -O cmdlineonly:dbgl1
|
||||
```
|
||||
To get help on supported parameters you can use specific options:
|
||||
* ---help: print help for command line only parameters and for parameters not defined in a specific section
|
||||
* ---help_< prefix > : print help for parameters defined under the section < prefix >
|
||||
|
||||
```
|
||||
./lte-softmodem -O libconfig:/usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf --help
|
||||
[CONFIG] get parameters from libconfig /usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf , debug flags: 0x00000000
|
||||
.............................................
|
||||
[LIBCONFIG] (root): 19/19 parameters successfully set, (16 to default value)
|
||||
|
||||
-----Help for section (root section) : 019 entries------
|
||||
--rf-config-file: Configuration file for front-end (e.g. LMS7002M)
|
||||
--ulsch-max-errors: set the eNodeB max ULSCH erros
|
||||
--phy-test: test UE phy layer, mac disabled
|
||||
--usim-test: use XOR autentication algo in case of test usim mode
|
||||
--emulate-rf: Emulated RF enabled(disable by defult)
|
||||
--clock: tells hardware to use a clock reference (0:internal, 1:external, 2:gpsdo)
|
||||
--wait-for-sync: Help string not specified
|
||||
--single-thread-enable: Disables single-thread mode in lte-softmodem
|
||||
-C: Set the downlink frequency for all component carriers
|
||||
-a: Channel id offset
|
||||
-d: Enable soft scope and L1 and L2 stats (Xforms)
|
||||
-q: Enable processing timing measurement of lte softmodem on per subframe basis
|
||||
-S: Skip the missed slots/subframes
|
||||
--numerology: adding numerology for 5G
|
||||
--parallel-config: three config for level of parallelism 'PARALLEL_SINGLE_THREAD', 'PARALLEL_RU_L1_SPLIT', or 'PARALLEL_RU_L1_TRX_SPLIT'
|
||||
--worker-config: two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'
|
||||
--nbiot-disable: disable nb-iot, even if defined in config
|
||||
--noS1: Disable s1 interface
|
||||
--nokrnmod: (noS1 only): Use tun instead of namesh module
|
||||
--------------------------------------------------------------------
|
||||
|
||||
[LIBCONFIG] (root): 4/4 parameters successfully set, (4 to default value)
|
||||
|
||||
-----Help for section (root section) : 004 entries------
|
||||
-R: Enable online log
|
||||
-g: Set the global log level, valide options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))
|
||||
--telnetsrv: Start embedded telnet server
|
||||
--msc: Enable the MSC tracing utility
|
||||
--------------------------------------------------------------------
|
||||
|
||||
[LIBCONFIG] loader: 2/2 parameters successfully set, (2 to default value)
|
||||
[LIBCONFIG] loader.telnetsrv: 2/2 parameters successfully set, (1 to default value)
|
||||
[LOADER] library libtelnetsrv.so is not loaded: libtelnetsrv.so: cannot open shared object file: No such file or directory
|
||||
Getting ENBSParams
|
||||
[LIBCONFIG] (root): 3/3 parameters successfully set, (1 to default value)
|
||||
|
||||
-----Help for section (root section) : 003 entries------
|
||||
--Asn1_verbosity: Help string not specified
|
||||
--Active_eNBs: Help string not specified
|
||||
--noS1: Help string not specified
|
||||
--------------------------------------------------------------------
|
||||
|
||||
/usr/local/oai/issue390_configmodule_cmdlinebug/openairinterface5g/common/config/config_cmdline.c:224 config_process_cmdline() Exiting OAI softmodem: [CONFIG] Exiting after displaying help
|
||||
|
||||
```
|
||||
|
||||
For the lte-softmodem (the eNodeB) The config source parameter defaults to libconfig, preserving the initial -O option format. In this case you cannot specify the debug level.
|
||||
|
||||
```bash
|
||||
$ ./lte-softmodem -O <config>
|
||||
```
|
||||
|
||||
Configuration file parameters, except for the configuration file path, can be specified in a **config** section in the configuration file:
|
||||
|
||||
```
|
||||
config:
|
||||
{
|
||||
debugflags = 1;
|
||||
}
|
||||
```
|
||||
Configuration files examples can be found in the targets/PROJECTS/GENERIC-LTE-EPC/CONF sub-directory of the oai source tree. To minimize the number of configuration file to maintain, any parameter can also be specified on the command line. For example to modify the lte bandwidth to 20 MHz where the configuration file specifies 10MHz you can enter:
|
||||
|
||||
```bash
|
||||
$ ./lte-softmodem -O <config> --eNBs.[0].component_carriers.[0].N_RB_DL 100
|
||||
```
|
||||
|
||||
As specified earlier, use the dbgl1 debug level to get the full name of a parameter you would like to modify on the command line.
|
||||
|
||||
[Configuration module home](../config.md)
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file common/config/cmdline/config_libconfig.c
|
||||
* \brief configuration module, command line parsing implementation
|
||||
* \brief configuration module, command line parsing implementation
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
@@ -37,183 +37,259 @@
|
||||
#include <errno.h>
|
||||
#include <platform_types.h>
|
||||
#include "config_userapi.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
|
||||
int parse_stringlist(paramdef_t *cfgoptions, char *val) {
|
||||
char *atoken;
|
||||
char *tokctx;
|
||||
char *tmpval=strdup(val);
|
||||
int numelt=0;
|
||||
cfgoptions->numelt=0;
|
||||
atoken=strtok_r(tmpval, ",",&tokctx);
|
||||
|
||||
int parse_stringlist(paramdef_t *cfgoptions, char *val)
|
||||
{
|
||||
char *atoken;
|
||||
char *tokctx;
|
||||
char *tmpval=strdup(val);
|
||||
int numelt=0;
|
||||
while(atoken != NULL) {
|
||||
numelt++ ;
|
||||
atoken=strtok_r(NULL, ",",&tokctx);
|
||||
}
|
||||
|
||||
cfgoptions->numelt=0;
|
||||
free(tmpval);
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
|
||||
cfgoptions->numelt=numelt;
|
||||
atoken=strtok_r(val, ",",&tokctx);
|
||||
|
||||
atoken=strtok_r(tmpval, ",",&tokctx);
|
||||
while(atoken != NULL) {
|
||||
numelt++ ;
|
||||
atoken=strtok_r(NULL, ",",&tokctx);
|
||||
}
|
||||
free(tmpval);
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
|
||||
cfgoptions->numelt=numelt;
|
||||
for( int i=0; i<cfgoptions->numelt && atoken != NULL ; i++) {
|
||||
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(atoken)+1);
|
||||
sprintf(cfgoptions->strlistptr[i],"%s",atoken);
|
||||
printf_params("[LIBCONFIG] %s[%i]: %s\n", cfgoptions->optname,i,cfgoptions->strlistptr[i]);
|
||||
atoken=strtok_r(NULL, ",",&tokctx);
|
||||
}
|
||||
|
||||
atoken=strtok_r(val, ",",&tokctx);
|
||||
for( int i=0; i<cfgoptions->numelt && atoken != NULL ; i++) {
|
||||
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(atoken)+1);
|
||||
sprintf(cfgoptions->strlistptr[i],"%s",atoken);
|
||||
printf_params("[LIBCONFIG] %s[%i]: %s\n", cfgoptions->optname,i,cfgoptions->strlistptr[i]);
|
||||
atoken=strtok_r(NULL, ",",&tokctx);
|
||||
}
|
||||
return (cfgoptions->numelt > 0);
|
||||
}
|
||||
|
||||
int processoption(paramdef_t *cfgoptions, char *value)
|
||||
{
|
||||
char *tmpval = value;
|
||||
int optisset=0;
|
||||
char defbool[2]="1";
|
||||
|
||||
|
||||
if ( value == NULL) {
|
||||
if( (cfgoptions->paramflags &PARAMFLAG_BOOL) == 0 ) { /* not a boolean, argument required */
|
||||
fprintf(stderr,"[CONFIG] command line, option %s requires an argument\n",cfgoptions->optname);
|
||||
return 0;
|
||||
} else { /* boolean value option without argument, set value to true*/
|
||||
tmpval = defbool;
|
||||
}
|
||||
}
|
||||
switch(cfgoptions->type)
|
||||
{
|
||||
case TYPE_STRING:
|
||||
if (cfgoptions->numelt == 0 ) {
|
||||
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
|
||||
sprintf(*(cfgoptions->strptr), "%s",tmpval);
|
||||
} else {
|
||||
sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);
|
||||
}
|
||||
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
optisset=parse_stringlist(cfgoptions,tmpval);
|
||||
break;
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_UINT16:
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->iptr),sizeof(int32_t));
|
||||
config_assign_int(cfgoptions,cfgoptions->optname,(int32_t)strtol(tmpval,NULL,0));
|
||||
optisset=1;
|
||||
break;
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->i64ptr),sizeof(uint64_t));
|
||||
*(cfgoptions->i64ptr)=strtoll(tmpval,NULL,0);
|
||||
printf_cmdl("[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*(cfgoptions->i64ptr));
|
||||
optisset=1;
|
||||
break;
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->dblptr),sizeof(double));
|
||||
*(cfgoptions->dblptr) = strtof(tmpval,NULL);
|
||||
printf_cmdl("[CONFIG] %s set to %lf from command line\n", cfgoptions->optname, *(cfgoptions->dblptr));
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr,"[CONFIG] command line, %s type %i not supported\n",cfgoptions->optname, cfgoptions->type);
|
||||
break;
|
||||
} /* switch on param type */
|
||||
if (optisset == 1) {
|
||||
cfgoptions->paramflags = cfgoptions->paramflags | PARAMFLAG_PARAMSET;
|
||||
}
|
||||
return optisset;
|
||||
return (cfgoptions->numelt > 0);
|
||||
}
|
||||
|
||||
int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix)
|
||||
{
|
||||
int processoption(paramdef_t *cfgoptions, char *value) {
|
||||
char *tmpval = value;
|
||||
int optisset=0;
|
||||
char defbool[2]="1";
|
||||
|
||||
if ( value == NULL) {
|
||||
if( (cfgoptions->paramflags &PARAMFLAG_BOOL) == 0 ) { /* not a boolean, argument required */
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an argument\n",cfgoptions->optname);
|
||||
} else { /* boolean value option without argument, set value to true*/
|
||||
tmpval = defbool;
|
||||
}
|
||||
}
|
||||
|
||||
switch(cfgoptions->type) {
|
||||
char *charptr;
|
||||
|
||||
case TYPE_STRING:
|
||||
if (cfgoptions->numelt == 0 ) {
|
||||
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
|
||||
sprintf(*(cfgoptions->strptr), "%s",tmpval);
|
||||
} else {
|
||||
sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);
|
||||
}
|
||||
|
||||
printf_cmdl("[CONFIG] %s set to %s from command line\n", cfgoptions->optname, tmpval);
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
optisset=parse_stringlist(cfgoptions,tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_UINT16:
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->iptr),sizeof(int32_t));
|
||||
config_assign_int(cfgoptions,cfgoptions->optname,(int32_t)strtol(tmpval,&charptr,0));
|
||||
|
||||
if( *charptr != 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an integer argument\n",cfgoptions->optname);
|
||||
}
|
||||
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->i64ptr),sizeof(uint64_t));
|
||||
*(cfgoptions->i64ptr)=strtoll(tmpval,&charptr,0);
|
||||
|
||||
if( *charptr != 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires an integer argument\n",cfgoptions->optname);
|
||||
}
|
||||
|
||||
printf_cmdl("[CONFIG] %s set to %lli from command line\n", cfgoptions->optname, (long long)*(cfgoptions->i64ptr));
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->dblptr),sizeof(double));
|
||||
*(cfgoptions->dblptr) = strtof(tmpval,&charptr);
|
||||
|
||||
if( *charptr != 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, option %s requires a double argument\n",cfgoptions->optname);
|
||||
}
|
||||
|
||||
printf_cmdl("[CONFIG] %s set to %lf from command line\n", cfgoptions->optname, *(cfgoptions->dblptr));
|
||||
optisset=1;
|
||||
break;
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
break;
|
||||
|
||||
default:
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] command line, %s type %i not supported\n",cfgoptions->optname, cfgoptions->type);
|
||||
break;
|
||||
} /* switch on param type */
|
||||
|
||||
if (optisset == 1) {
|
||||
cfgoptions->paramflags = cfgoptions->paramflags | PARAMFLAG_PARAMSET;
|
||||
}
|
||||
|
||||
return optisset;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* check unknown options in the command line
|
||||
*/
|
||||
int config_check_unknown_cmdlineopt(char *prefix) {
|
||||
int unknowndetected=0;
|
||||
char testprefix[CONFIG_MAXOPTLENGTH];
|
||||
int finalcheck = 0;
|
||||
|
||||
memset(testprefix,0,sizeof(testprefix));
|
||||
if (prefix != NULL) {
|
||||
if (strcmp(prefix,CONFIG_CHECKALLSECTIONS) == 0)
|
||||
finalcheck = 1;
|
||||
else if (strlen(prefix) > 0) {
|
||||
sprintf(testprefix,"--%.*s.",CONFIG_MAXOPTLENGTH-1,prefix);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=1; i<config_get_if()->argc ; i++) {
|
||||
if ( !finalcheck && strstr(config_get_if()->argv[i],testprefix) == NULL ) continue;
|
||||
|
||||
if ( !finalcheck && testprefix[0]==0 && index(config_get_if()->argv[i],'.') != NULL) continue;
|
||||
|
||||
if ( !finalcheck && isdigit(config_get_if()->argv[i][0])) continue;
|
||||
|
||||
if ( !finalcheck && config_get_if()->argv[i][0] == '-' && isdigit(config_get_if()->argv[i][1])) continue;
|
||||
|
||||
if ( (config_get_if()->argv_info[i] & CONFIG_CMDLINEOPT_PROCESSED) == 0 ) {
|
||||
fprintf(stderr,"[CONFIG] unknown option: %s\n",
|
||||
config_get_if()->argv[i] );
|
||||
unknowndetected++;
|
||||
}
|
||||
}
|
||||
|
||||
if (unknowndetected > 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %i unknown option(s) in command line starting with %s (section %s)\n",
|
||||
unknowndetected,testprefix,((prefix==NULL)?"":prefix));
|
||||
}
|
||||
|
||||
return unknowndetected;
|
||||
} /* config_check_unknown_cmdlineopt */
|
||||
|
||||
int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix) {
|
||||
int c = config_get_if()->argc;
|
||||
int i,j;
|
||||
char *pp;
|
||||
char cfgpath[512]; /* 512 should be enough for the sprintf below */
|
||||
|
||||
char cfgpath[CONFIG_MAXOPTLENGTH];
|
||||
j = 0;
|
||||
i = 0;
|
||||
while (c > 0 ) {
|
||||
char *oneargv = strdup(config_get_if()->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */
|
||||
/* first check help options, either --help, -h or --help_<section> */
|
||||
if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) {
|
||||
char *tokctx;
|
||||
pp=strtok_r(oneargv, "_",&tokctx);
|
||||
if (pp == NULL || strcasecmp(pp,config_get_if()->argv[i] ) == 0 ) {
|
||||
if( prefix == NULL) {
|
||||
config_printhelp(cfgoptions,numoptions);
|
||||
if ( ! ( CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP)))
|
||||
exit_fun("[CONFIG] Exiting after displaying help\n");
|
||||
}
|
||||
} else {
|
||||
pp=strtok_r(NULL, " ",&tokctx);
|
||||
if ( prefix != NULL && pp != NULL && strncasecmp(prefix,pp,strlen(pp)) == 0 ) {
|
||||
printf ("Help for %s section:\n",prefix);
|
||||
config_printhelp(cfgoptions,numoptions);
|
||||
if ( ! (CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP))) {
|
||||
fprintf(stderr,"[CONFIG] %s %i section %s:", __FILE__, __LINE__, prefix);
|
||||
exit_fun(" Exiting after displaying help\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (c > 0 ) {
|
||||
char *oneargv = strdup(config_get_if()->argv[i]); /* we use strtok_r which modifies its string paramater, and we don't want argv to be modified */
|
||||
|
||||
/* first check help options, either --help, -h or --help_<section> */
|
||||
if (strncmp(oneargv, "-h",2) == 0 || strncmp(oneargv, "--help",6) == 0 ) {
|
||||
char *tokctx;
|
||||
pp=strtok_r(oneargv, "_",&tokctx);
|
||||
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
|
||||
if (pp == NULL || strcasecmp(pp,config_get_if()->argv[i] ) == 0 ) {
|
||||
if( prefix == NULL) {
|
||||
config_printhelp(cfgoptions,numoptions,"(root section)");
|
||||
|
||||
if ( ! ( CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP)))
|
||||
exit_fun("[CONFIG] Exiting after displaying help\n");
|
||||
}
|
||||
} else {
|
||||
pp=strtok_r(NULL, " ",&tokctx);
|
||||
|
||||
if ( prefix != NULL && pp != NULL && strncasecmp(prefix,pp,strlen(pp)) == 0 ) {
|
||||
config_printhelp(cfgoptions,numoptions,prefix);
|
||||
|
||||
if ( ! (CONFIG_ISFLAGSET(CONFIG_NOEXITONHELP))) {
|
||||
fprintf(stderr,"[CONFIG] %s %i section %s:", __FILE__, __LINE__, prefix);
|
||||
exit_fun(" Exiting after displaying help\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* now, check for non help options */
|
||||
if (oneargv[0] == '-') {
|
||||
for(int n=0; n<numoptions; n++) {
|
||||
if ( ( cfgoptions[n].paramflags & PARAMFLAG_DISABLECMDLINE) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* now, check for non help options */
|
||||
if (oneargv[0] == '-') {
|
||||
for(int n=0;n<numoptions;n++) {
|
||||
if ( ( cfgoptions[n].paramflags & PARAMFLAG_DISABLECMDLINE) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (prefix != NULL) {
|
||||
sprintf(cfgpath,"%s.%s",prefix,cfgoptions[n].optname);
|
||||
} else {
|
||||
sprintf(cfgpath,"%s",cfgoptions[n].optname);
|
||||
}
|
||||
if ( ((strlen(oneargv) == 2) && (strcmp(oneargv + 1,cfgpath) == 0)) || /* short option, one "-" */
|
||||
((strlen(oneargv) > 2) && (strcmp(oneargv + 2,cfgpath ) == 0 )) ) {
|
||||
char *valptr=NULL;
|
||||
int ret;
|
||||
if (c > 0) {
|
||||
pp = config_get_if()->argv[i+1];
|
||||
if (pp != NULL ) {
|
||||
ret = strlen(pp);
|
||||
if (ret > 0 ) {
|
||||
if (pp[0] != '-')
|
||||
valptr=pp;
|
||||
else if ( ret > 1 && pp[0] == '-' && isdigit(pp[1]) )
|
||||
valptr=pp;
|
||||
}
|
||||
}
|
||||
}
|
||||
j += processoption(&(cfgoptions[n]), valptr);
|
||||
if ( valptr != NULL ) {
|
||||
i++;
|
||||
c--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} /* for n... */
|
||||
} /* if (oneargv[0] == '-') */
|
||||
free(oneargv);
|
||||
i++;
|
||||
c--;
|
||||
} /* fin du while */
|
||||
if (prefix != NULL) {
|
||||
sprintf(cfgpath,"%s.%s",prefix,cfgoptions[n].optname);
|
||||
} else {
|
||||
sprintf(cfgpath,"%s",cfgoptions[n].optname);
|
||||
}
|
||||
|
||||
if ( ((strlen(oneargv) == 2) && (strcmp(oneargv + 1,cfgpath) == 0)) || /* short option, one "-" */
|
||||
((strlen(oneargv) > 2) && (strcmp(oneargv + 2,cfgpath ) == 0 )) ) {
|
||||
char *valptr=NULL;
|
||||
int ret;
|
||||
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
|
||||
if (c > 0) {
|
||||
pp = config_get_if()->argv[i+1];
|
||||
|
||||
if (pp != NULL ) {
|
||||
ret = strlen(pp);
|
||||
|
||||
if (ret > 0 ) {
|
||||
if (pp[0] != '-')
|
||||
valptr=pp;
|
||||
else if ( ret > 1 && pp[0] == '-' && isdigit(pp[1]) )
|
||||
valptr=pp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
j += processoption(&(cfgoptions[n]), valptr);
|
||||
|
||||
if ( valptr != NULL ) {
|
||||
i++;
|
||||
config_get_if()->argv_info[i] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
c--;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
} /* for n... */
|
||||
} /* if (oneargv[0] == '-') */
|
||||
|
||||
free(oneargv);
|
||||
i++;
|
||||
c--;
|
||||
} /* fin du while */
|
||||
|
||||
printf_cmdl("[CONFIG] %s %i options set from command line\n",((prefix == NULL) ? "(root)":prefix),j);
|
||||
return j;
|
||||
return j;
|
||||
} /* parse_cmdline*/
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file common/config/config_load_configmodule.c
|
||||
* \brief configuration module, load the shared library implementing the configuration module
|
||||
* \brief configuration module, load the shared library implementing the configuration module
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
@@ -36,288 +36,323 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <platform_types.h>
|
||||
|
||||
#define CONFIG_LOADCONFIG_MAIN
|
||||
#include "config_load_configmodule.h"
|
||||
#include "config_userapi.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
#define CONFIG_SHAREDLIBFORMAT "libparams_%s.so"
|
||||
|
||||
int load_config_sharedlib(configmodule_interface_t *cfgptr)
|
||||
{
|
||||
void *lib_handle;
|
||||
char fname[128];
|
||||
char libname[FILENAME_MAX];
|
||||
int st;
|
||||
|
||||
st=0;
|
||||
sprintf(libname,CONFIG_SHAREDLIBFORMAT,cfgptr->cfgmode);
|
||||
int load_config_sharedlib(configmodule_interface_t *cfgptr) {
|
||||
void *lib_handle;
|
||||
char fname[128];
|
||||
char libname[FILENAME_MAX];
|
||||
int st;
|
||||
st=0;
|
||||
sprintf(libname,CONFIG_SHAREDLIBFORMAT,cfgptr->cfgmode);
|
||||
lib_handle = dlopen(libname,RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
|
||||
|
||||
lib_handle = dlopen(libname,RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE);
|
||||
if (!lib_handle) {
|
||||
fprintf(stderr,"[CONFIG] %s %d Error calling dlopen(%s): %s\n",__FILE__, __LINE__, libname,dlerror());
|
||||
if (!lib_handle) {
|
||||
fprintf(stderr,"[CONFIG] %s %d Error calling dlopen(%s): %s\n",__FILE__, __LINE__, libname,dlerror());
|
||||
st = -1;
|
||||
} else {
|
||||
sprintf (fname,"config_%s_init",cfgptr->cfgmode);
|
||||
cfgptr->init = dlsym(lib_handle,fname);
|
||||
|
||||
if (cfgptr->init == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
} else {
|
||||
st=cfgptr->init(cfgptr->cfgP,cfgptr->num_cfgP);
|
||||
printf("[CONFIG] function %s returned %i\n",
|
||||
fname, st);
|
||||
}
|
||||
|
||||
sprintf (fname,"config_%s_get",cfgptr->cfgmode);
|
||||
cfgptr->get = dlsym(lib_handle,fname);
|
||||
|
||||
if (cfgptr->get == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
st = -1;
|
||||
} else {
|
||||
sprintf (fname,"config_%s_init",cfgptr->cfgmode);
|
||||
cfgptr->init = dlsym(lib_handle,fname);
|
||||
}
|
||||
|
||||
if (cfgptr->init == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
} else {
|
||||
st=cfgptr->init(cfgptr->cfgP,cfgptr->num_cfgP);
|
||||
printf("[CONFIG] function %s returned %i\n",
|
||||
fname, st);
|
||||
}
|
||||
sprintf (fname,"config_%s_getlist",cfgptr->cfgmode);
|
||||
cfgptr->getlist = dlsym(lib_handle,fname);
|
||||
|
||||
sprintf (fname,"config_%s_get",cfgptr->cfgmode);
|
||||
cfgptr->get = dlsym(lib_handle,fname);
|
||||
if (cfgptr->get == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
st = -1;
|
||||
}
|
||||
|
||||
sprintf (fname,"config_%s_getlist",cfgptr->cfgmode);
|
||||
cfgptr->getlist = dlsym(lib_handle,fname);
|
||||
if (cfgptr->getlist == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
st = -1;
|
||||
}
|
||||
if (cfgptr->getlist == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
st = -1;
|
||||
}
|
||||
|
||||
sprintf (fname,"config_%s_end",cfgptr->cfgmode);
|
||||
cfgptr->end = dlsym(lib_handle,fname);
|
||||
if (cfgptr->getlist == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
}
|
||||
}
|
||||
|
||||
return st;
|
||||
sprintf (fname,"config_%s_end",cfgptr->cfgmode);
|
||||
cfgptr->end = dlsym(lib_handle,fname);
|
||||
|
||||
if (cfgptr->getlist == NULL ) {
|
||||
printf("[CONFIG] %s %d no function %s for config mode %s\n",
|
||||
__FILE__, __LINE__,fname, cfgptr->cfgmode);
|
||||
}
|
||||
}
|
||||
|
||||
return st;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* from here: interface implementtion of the configuration module */
|
||||
int nooptfunc(void) {
|
||||
return 0;
|
||||
return 0;
|
||||
};
|
||||
|
||||
int config_cmdlineonly_getlist(paramlist_def_t *ParamList,
|
||||
paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
ParamList->numelt = 0;
|
||||
return 0;
|
||||
int config_cmdlineonly_getlist(paramlist_def_t *ParamList,
|
||||
paramdef_t *params, int numparams, char *prefix) {
|
||||
ParamList->numelt = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int config_cmdlineonly_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
|
||||
{
|
||||
int config_cmdlineonly_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
|
||||
int defval;
|
||||
int fatalerror=0;
|
||||
int numdefvals=0;
|
||||
|
||||
|
||||
for(int i=0;i<numoptions;i++) {
|
||||
defval=0;
|
||||
switch(cfgoptions[i].type) {
|
||||
case TYPE_STRING:
|
||||
defval=config_setdefault_string(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
case TYPE_STRINGLIST:
|
||||
defval=config_setdefault_stringlist(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
case TYPE_UINT16:
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_MASK:
|
||||
defval=config_setdefault_int(&(cfgoptions[i]), prefix);
|
||||
for(int i=0; i<numoptions; i++) {
|
||||
defval=0;
|
||||
|
||||
switch(cfgoptions[i].type) {
|
||||
case TYPE_STRING:
|
||||
defval=config_setdefault_string(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
defval=config_setdefault_int64(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
defval=config_setdefault_intlist(&(cfgoptions[i]), prefix);
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
defval=config_setdefault_stringlist(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
defval=config_setdefault_double(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
case TYPE_IPV4ADDR:
|
||||
defval=config_setdefault_ipv4addr(&(cfgoptions[i]), prefix);
|
||||
|
||||
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
case TYPE_UINT16:
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_MASK:
|
||||
defval=config_setdefault_int(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"[CONFIG] %s.%s type %i not supported\n",prefix, cfgoptions[i].optname,cfgoptions[i].type);
|
||||
fatalerror=1;
|
||||
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
defval=config_setdefault_int64(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
} /* switch on param type */
|
||||
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
defval=config_setdefault_intlist(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
defval=config_setdefault_double(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
defval=config_setdefault_ipv4addr(&(cfgoptions[i]), prefix);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr,"[CONFIG] %s.%s type %i not supported\n",prefix, cfgoptions[i].optname,cfgoptions[i].type);
|
||||
fatalerror=1;
|
||||
break;
|
||||
} /* switch on param type */
|
||||
|
||||
if (defval == 1) {
|
||||
numdefvals++;
|
||||
cfgoptions[i].paramflags = cfgoptions[i].paramflags | PARAMFLAG_PARAMSETDEF;
|
||||
numdefvals++;
|
||||
cfgoptions[i].paramflags = cfgoptions[i].paramflags | PARAMFLAG_PARAMSETDEF;
|
||||
}
|
||||
} /* for loop on options */
|
||||
|
||||
printf("[CONFIG] %s: %i/%i parameters successfully set \n",
|
||||
((prefix == NULL)?"(root)":prefix),
|
||||
((prefix == NULL)?"(root)":prefix),
|
||||
numdefvals,numoptions );
|
||||
|
||||
if (fatalerror == 1) {
|
||||
fprintf(stderr,"[CONFIG] fatal errors found when assigning %s parameters \n",
|
||||
prefix);
|
||||
fprintf(stderr,"[CONFIG] fatal errors found when assigning %s parameters \n",
|
||||
prefix);
|
||||
}
|
||||
|
||||
return numdefvals;
|
||||
}
|
||||
|
||||
configmodule_interface_t *load_configmodule(int argc, char **argv)
|
||||
{
|
||||
char *cfgparam=NULL;
|
||||
char *modeparams=NULL;
|
||||
char *cfgmode=NULL;
|
||||
char *strtokctx=NULL;
|
||||
char *atoken;
|
||||
uint32_t tmpflags=0;
|
||||
int i;
|
||||
|
||||
/* first parse the command line to look for the -O option */
|
||||
for (i = 0;i<argc;i++) {
|
||||
if (strlen(argv[i]) < 2) continue;
|
||||
if ( argv[i][1] == 'O' && i < (argc -1)) {
|
||||
cfgparam = argv[i+1];
|
||||
}
|
||||
if ( strstr(argv[i], "help_config") != NULL ) {
|
||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params));
|
||||
exit(0);
|
||||
}
|
||||
if ( (strcmp(argv[i]+1, "h") == 0) || (strstr(argv[i]+1, "help_") != NULL ) ) {
|
||||
tmpflags = CONFIG_HELP;
|
||||
}
|
||||
}
|
||||
configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags) {
|
||||
char *cfgparam=NULL;
|
||||
char *modeparams=NULL;
|
||||
char *cfgmode=NULL;
|
||||
char *strtokctx=NULL;
|
||||
char *atoken;
|
||||
uint32_t tmpflags=0;
|
||||
int i;
|
||||
int OoptIdx=-1;
|
||||
|
||||
/* look for the OAI_CONFIGMODULE environement variable */
|
||||
/* first parse the command line to look for the -O option */
|
||||
for (i = 0; i<argc; i++) {
|
||||
if (strlen(argv[i]) < 2) continue;
|
||||
|
||||
if ( argv[i][1] == 'O' && i < (argc -1)) {
|
||||
cfgparam = argv[i+1];
|
||||
OoptIdx=i;
|
||||
}
|
||||
|
||||
if ( strstr(argv[i], "help_config") != NULL ) {
|
||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if ( (strcmp(argv[i]+1, "h") == 0) || (strstr(argv[i]+1, "help_") != NULL ) ) {
|
||||
tmpflags = CONFIG_HELP;
|
||||
}
|
||||
}
|
||||
|
||||
/* look for the OAI_CONFIGMODULE environement variable */
|
||||
if ( cfgparam == NULL ) {
|
||||
cfgparam = getenv("OAI_CONFIGMODULE");
|
||||
}
|
||||
cfgparam = getenv("OAI_CONFIGMODULE");
|
||||
}
|
||||
|
||||
/* default */
|
||||
/* default different for UE and softmodem because UE doesn't use config file*/
|
||||
/* and -O option is not mandatory for UE */
|
||||
/* phy simulators behave as UE */
|
||||
/* test of exec name would better be replaced by a parameter to the l */
|
||||
/* oad_configmodule function */
|
||||
if (cfgparam == NULL) {
|
||||
tmpflags = tmpflags | CONFIG_NOOOPT;
|
||||
if (strstr(argv[0],"uesoftmodem") == NULL) {
|
||||
cfgparam = CONFIG_LIBCONFIGFILE ":" DEFAULT_CFGFILENAME;
|
||||
} else {
|
||||
cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ;
|
||||
}
|
||||
}
|
||||
|
||||
/* parse the config parameters to set the config source */
|
||||
i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams);
|
||||
if (i< 0) {
|
||||
fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
else if ( i == 1 ) {
|
||||
/* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig
|
||||
with one parameter, the path to the configuration file */
|
||||
modeparams=cfgmode;
|
||||
cfgmode=strdup(CONFIG_LIBCONFIGFILE);
|
||||
}
|
||||
tmpflags = tmpflags | CONFIG_NOOOPT;
|
||||
|
||||
cfgptr = malloc(sizeof(configmodule_interface_t));
|
||||
memset(cfgptr,0,sizeof(configmodule_interface_t));
|
||||
if ( initflags & CONFIG_ENABLECMDLINEONLY) {
|
||||
cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ;
|
||||
} else {
|
||||
cfgparam = CONFIG_CMDLINEONLY ":dbgl0" ;
|
||||
cfgparam = CONFIG_LIBCONFIGFILE ":" DEFAULT_CFGFILENAME;
|
||||
}
|
||||
}
|
||||
|
||||
cfgptr->rtflags = cfgptr->rtflags | tmpflags;
|
||||
cfgptr->argc = argc;
|
||||
cfgptr->argv = argv;
|
||||
cfgptr->cfgmode=strdup(cfgmode);
|
||||
cfgptr->num_cfgP=0;
|
||||
atoken=strtok_r(modeparams,":",&strtokctx);
|
||||
while ( cfgptr->num_cfgP< CONFIG_MAX_OOPT_PARAMS && atoken != NULL) {
|
||||
/* look for debug level in the config parameters, it is commom to all config mode
|
||||
and will be removed frome the parameter array passed to the shared module */
|
||||
char *aptr;
|
||||
aptr=strcasestr(atoken,"dbgl");
|
||||
if (aptr != NULL) {
|
||||
cfgptr->rtflags = cfgptr->rtflags | strtol(aptr+4,NULL,0);
|
||||
/* parse the config parameters to set the config source */
|
||||
i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams);
|
||||
|
||||
} else {
|
||||
cfgptr->cfgP[cfgptr->num_cfgP] = strdup(atoken);
|
||||
cfgptr->num_cfgP++;
|
||||
}
|
||||
atoken = strtok_r(NULL,":",&strtokctx);
|
||||
}
|
||||
if (i< 0) {
|
||||
fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno));
|
||||
exit(-1) ;
|
||||
} else if ( i == 1 ) {
|
||||
/* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig
|
||||
with one parameter, the path to the configuration file cfgmode must not be NULL */
|
||||
modeparams=cfgmode;
|
||||
cfgmode=strdup(CONFIG_LIBCONFIGFILE);
|
||||
}
|
||||
|
||||
|
||||
printf("[CONFIG] get parameters from %s ",cfgmode);
|
||||
for (i=0;i<cfgptr->num_cfgP; i++) {
|
||||
printf("%s ",cfgptr->cfgP[i]);
|
||||
}
|
||||
printf(", debug flags: 0x%08x\n",cfgptr->rtflags);
|
||||
cfgptr = calloc(sizeof(configmodule_interface_t),1);
|
||||
cfgptr->argv_info = calloc(sizeof(int32_t), argc);
|
||||
cfgptr->argv_info[0] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
|
||||
if (strstr(cfgparam,CONFIG_CMDLINEONLY) == NULL) {
|
||||
i=load_config_sharedlib(cfgptr);
|
||||
if (i == 0) {
|
||||
printf("[CONFIG] config module %s loaded\n",cfgmode);
|
||||
Config_Params[CONFIGPARAM_DEBUGFLAGS_IDX].uptr=&(cfgptr->rtflags);
|
||||
config_get(Config_Params,CONFIG_PARAMLENGTH(Config_Params), CONFIG_SECTIONNAME );
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s %d config module \"%s\" couldn't be loaded\n", __FILE__, __LINE__,cfgmode);
|
||||
cfgptr->rtflags = cfgptr->rtflags | CONFIG_HELP | CONFIG_ABORT;
|
||||
}
|
||||
} else {
|
||||
cfgptr->init = (configmodule_initfunc_t)nooptfunc;
|
||||
cfgptr->get = config_cmdlineonly_get;
|
||||
cfgptr->getlist = config_cmdlineonly_getlist;
|
||||
cfgptr->end = (configmodule_endfunc_t)nooptfunc;
|
||||
}
|
||||
if (OoptIdx >= 0) {
|
||||
cfgptr->argv_info[OoptIdx] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
cfgptr->argv_info[OoptIdx+1] |= CONFIG_CMDLINEOPT_PROCESSED;
|
||||
}
|
||||
|
||||
|
||||
cfgptr->rtflags = cfgptr->rtflags | tmpflags;
|
||||
cfgptr->argc = argc;
|
||||
cfgptr->argv = argv;
|
||||
cfgptr->cfgmode=strdup(cfgmode);
|
||||
cfgptr->num_cfgP=0;
|
||||
atoken=strtok_r(modeparams,":",&strtokctx);
|
||||
|
||||
if (modeparams != NULL) free(modeparams);
|
||||
if (cfgmode != NULL) free(cfgmode);
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params));
|
||||
// exit(-1);
|
||||
}
|
||||
return cfgptr;
|
||||
while ( cfgptr->num_cfgP< CONFIG_MAX_OOPT_PARAMS && atoken != NULL) {
|
||||
/* look for debug level in the config parameters, it is commom to all config mode
|
||||
and will be removed frome the parameter array passed to the shared module */
|
||||
char *aptr;
|
||||
aptr=strcasestr(atoken,"dbgl");
|
||||
|
||||
if (aptr != NULL) {
|
||||
cfgptr->rtflags = cfgptr->rtflags | strtol(aptr+4,NULL,0);
|
||||
} else {
|
||||
cfgptr->cfgP[cfgptr->num_cfgP] = strdup(atoken);
|
||||
cfgptr->num_cfgP++;
|
||||
}
|
||||
|
||||
atoken = strtok_r(NULL,":",&strtokctx);
|
||||
}
|
||||
|
||||
printf("[CONFIG] get parameters from %s ",cfgmode);
|
||||
|
||||
for (i=0; i<cfgptr->num_cfgP; i++) {
|
||||
printf("%s ",cfgptr->cfgP[i]);
|
||||
}
|
||||
|
||||
printf(", debug flags: 0x%08x\n",cfgptr->rtflags);
|
||||
|
||||
if (strstr(cfgparam,CONFIG_CMDLINEONLY) == NULL) {
|
||||
i=load_config_sharedlib(cfgptr);
|
||||
|
||||
if (i == 0) {
|
||||
printf("[CONFIG] config module %s loaded\n",cfgmode);
|
||||
Config_Params[CONFIGPARAM_DEBUGFLAGS_IDX].uptr=&(cfgptr->rtflags);
|
||||
config_get(Config_Params,CONFIG_PARAMLENGTH(Config_Params), CONFIG_SECTIONNAME );
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s %d config module \"%s\" couldn't be loaded\n", __FILE__, __LINE__,cfgmode);
|
||||
cfgptr->rtflags = cfgptr->rtflags | CONFIG_HELP | CONFIG_ABORT;
|
||||
}
|
||||
} else {
|
||||
cfgptr->init = (configmodule_initfunc_t)nooptfunc;
|
||||
cfgptr->get = config_cmdlineonly_get;
|
||||
cfgptr->getlist = config_cmdlineonly_getlist;
|
||||
cfgptr->end = (configmodule_endfunc_t)nooptfunc;
|
||||
}
|
||||
|
||||
if (modeparams != NULL) free(modeparams);
|
||||
|
||||
if (cfgmode != NULL) free(cfgmode);
|
||||
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME );
|
||||
// exit(-1);
|
||||
}
|
||||
|
||||
return cfgptr;
|
||||
}
|
||||
|
||||
|
||||
/* free memory allocated when reading parameters */
|
||||
/* config module could be initialized again after this call */
|
||||
void end_configmodule(void)
|
||||
{
|
||||
void end_configmodule(void) {
|
||||
if (cfgptr != NULL) {
|
||||
if (cfgptr->end != NULL) {
|
||||
printf ("[CONFIG] calling config module end function...\n");
|
||||
cfgptr->end();
|
||||
}
|
||||
if (cfgptr->end != NULL) {
|
||||
printf ("[CONFIG] calling config module end function...\n");
|
||||
cfgptr->end();
|
||||
}
|
||||
|
||||
printf ("[CONFIG] free %u config value pointers\n",cfgptr->numptrs);
|
||||
for(int i=0; i<cfgptr->numptrs ; i++) {
|
||||
if (cfgptr->ptrs[i] != NULL) {
|
||||
free(cfgptr->ptrs[i]);
|
||||
cfgptr->ptrs[i]=NULL;
|
||||
}
|
||||
printf ("[CONFIG] free %u config value pointers\n",cfgptr->numptrs);
|
||||
|
||||
for(int i=0; i<cfgptr->numptrs ; i++) {
|
||||
if (cfgptr->ptrs[i] != NULL) {
|
||||
free(cfgptr->ptrs[i]);
|
||||
cfgptr->ptrs[i]=NULL;
|
||||
}
|
||||
cfgptr->numptrs=0;
|
||||
}
|
||||
|
||||
cfgptr->numptrs=0;
|
||||
}
|
||||
}
|
||||
|
||||
/* free all memory used by config module */
|
||||
/* should be called only at program exit */
|
||||
void free_configmodule(void)
|
||||
{
|
||||
void free_configmodule(void) {
|
||||
if (cfgptr != NULL) {
|
||||
end_configmodule();
|
||||
if( cfgptr->cfgmode != NULL) free(cfgptr->cfgmode);
|
||||
printf ("[CONFIG] free %u config parameter pointers\n",cfgptr->num_cfgP);
|
||||
for (int i=0; i<cfgptr->num_cfgP; i++) {
|
||||
if ( cfgptr->cfgP[i] != NULL) free(cfgptr->cfgP[i]);
|
||||
}
|
||||
end_configmodule();
|
||||
|
||||
if( cfgptr->cfgmode != NULL) free(cfgptr->cfgmode);
|
||||
|
||||
free(cfgptr);
|
||||
cfgptr=NULL;
|
||||
printf ("[CONFIG] free %i config parameter pointers\n",cfgptr->num_cfgP);
|
||||
|
||||
for (int i=0; i<cfgptr->num_cfgP; i++) {
|
||||
if ( cfgptr->cfgP[i] != NULL) free(cfgptr->cfgP[i]);
|
||||
}
|
||||
|
||||
free(cfgptr);
|
||||
cfgptr=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
*/
|
||||
|
||||
/*! \file common/config/config_load_configmodule.h
|
||||
* \brief: configuration module, include file to be used by the source code calling the
|
||||
* configuration module initialization
|
||||
* \brief: configuration module, include file to be used by the source code calling the
|
||||
* configuration module initialization
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
@@ -31,12 +31,13 @@
|
||||
* \warning
|
||||
*/
|
||||
#ifndef INCLUDE_CONFIG_LOADCONFIGMODULE_H
|
||||
#define INCLUDE_CONFIG_LOADCONFIGMODULE_H
|
||||
#define INCLUDE_CONFIG_LOADCONFIGMODULE_H
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "common/config/config_paramdesc.h"
|
||||
#include "common/utils/T/T.h"
|
||||
#define CONFIG_MAX_OOPT_PARAMS 10 // maximum number of parameters in the -O option (-O <cfgmode>:P1:P2...
|
||||
#define CONFIG_MAX_ALLOCATEDPTRS 1024 // maximum number of parameters that can be dynamicaly allocated in the config module
|
||||
|
||||
@@ -44,12 +45,13 @@
|
||||
#define CONFIG_LIBCONFIGFILE "libconfig" // use libconfig file
|
||||
#define CONFIG_CMDLINEONLY "cmdline" // use only command line options
|
||||
#define DEFAULT_CFGFILENAME "oai.conf" // default config file
|
||||
|
||||
/* rtflags bit position definitions */
|
||||
/* bit position definition for the argv_info mask of the configmodule_interface_t structure */
|
||||
#define CONFIG_CMDLINEOPT_PROCESSED (1<<0) // command line option has been processed
|
||||
/* bit position definitions for the rtflags mask of the configmodule_interface_t structure*/
|
||||
#define CONFIG_PRINTPARAMS 1 // print parameters values while processing
|
||||
#define CONFIG_DEBUGPTR (1<<1) // print memory allocation/free debug messages
|
||||
#define CONFIG_DEBUGCMDLINE (1<<2) // print command line processing messages
|
||||
#define CONFIG_NOABORTONCHKF (1<<3) // disable abort execution when parameter checking function fails
|
||||
#define CONFIG_NOABORTONCHKF (1<<4) // disable abort execution when parameter checking function fails
|
||||
#define CONFIG_NOEXITONHELP (1<<19) // do not exit after printing help
|
||||
#define CONFIG_HELP (1<<20) // print help message
|
||||
#define CONFIG_ABORT (1<<21) // config failed,abort execution
|
||||
@@ -58,10 +60,10 @@ typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
|
||||
typedef int(*configmodule_getfunc_t)(paramdef_t *,int numparams, char *prefix);
|
||||
typedef int(*configmodule_getlistfunc_t)(paramlist_def_t *, paramdef_t *,int numparams, char *prefix);
|
||||
typedef void(*configmodule_endfunc_t)(void);
|
||||
typedef struct configmodule_interface
|
||||
{
|
||||
typedef struct configmodule_interface {
|
||||
int argc;
|
||||
char **argv;
|
||||
uint32_t *argv_info;
|
||||
char *cfgmode;
|
||||
int num_cfgP;
|
||||
char *cfgP[CONFIG_MAX_OOPT_PARAMS];
|
||||
@@ -71,7 +73,7 @@ typedef struct configmodule_interface
|
||||
configmodule_endfunc_t end;
|
||||
uint32_t numptrs;
|
||||
uint32_t rtflags;
|
||||
char *ptrs[CONFIG_MAX_ALLOCATEDPTRS];
|
||||
char *ptrs[CONFIG_MAX_ALLOCATEDPTRS];
|
||||
} configmodule_interface_t;
|
||||
|
||||
#ifdef CONFIG_LOADCONFIG_MAIN
|
||||
@@ -81,17 +83,17 @@ static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugfl
|
||||
debugflags can also be defined in the config_libconfig section of the config file\n \
|
||||
debugflags: mask, 1->print parameters, 2->print memory allocations debug messages\n \
|
||||
4->print command line processing debug messages\n ";
|
||||
|
||||
|
||||
#define CONFIG_SECTIONNAME "config"
|
||||
#define CONFIGPARAM_DEBUGFLAGS_IDX 0
|
||||
|
||||
|
||||
static paramdef_t Config_Params[] = {
|
||||
/*-----------------------------------------------------------------------------------------------------------------------*/
|
||||
/* config parameters for config module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------*/
|
||||
{"debugflags", config_helpstr, 0, uptr:NULL, defintval:0, TYPE_MASK, 0},
|
||||
/*-----------------------------------------------------------------------------------------------------------------------*/
|
||||
/* config parameters for config module */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------*/
|
||||
{"debugflags", config_helpstr, 0, uptr:NULL, defintval:0, TYPE_MASK, 0},
|
||||
};
|
||||
|
||||
#else
|
||||
@@ -100,10 +102,13 @@ extern configmodule_interface_t *cfgptr;
|
||||
|
||||
|
||||
#define printf_params(...) if ( (cfgptr->rtflags & (CONFIG_PRINTPARAMS)) != 0 ) { printf ( __VA_ARGS__ ); }
|
||||
#define printf_ptrs(...) if ( (cfgptr->rtflags & (CONFIG_DEBUGPTR)) != 0 ) { printf ( __VA_ARGS__ ); }
|
||||
#define printf_ptrs(...) if ( (cfgptr->rtflags & (CONFIG_DEBUGPTR)) != 0 ) { printf ( __VA_ARGS__ ); }
|
||||
#define printf_cmdl(...) if ( (cfgptr->rtflags & (CONFIG_DEBUGCMDLINE)) != 0 ) { printf ( __VA_ARGS__ ); }
|
||||
|
||||
extern configmodule_interface_t *load_configmodule(int argc, char **argv);
|
||||
|
||||
#define CONFIG_ENABLECMDLINEONLY (1<<1)
|
||||
extern configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t initflags);
|
||||
extern void end_configmodule(void);
|
||||
#define CONFIG_PRINTF_ERROR(f, x... ) if (isLogInitDone ()) { LOG_E(ENB_APP,f,x);} else {printf(f,x);}; if ( !CONFIG_ISFLAGSET(CONFIG_NOABORTONCHKF) ) exit_fun("exit because configuration failed\n");
|
||||
|
||||
|
||||
#endif /* INCLUDE_CONFIG_LOADCONFIGMODULE_H */
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
#define MAX_OPTNAME_SIZE 64
|
||||
|
||||
#define CONFIG_MAXOPTLENGTH 512 /* max full option length, full option name exemple: (prefix1.[<index>].prefix2.optname */
|
||||
|
||||
|
||||
/* parameter flags definitions */
|
||||
@@ -55,83 +55,81 @@
|
||||
#define PARAMFLAG_PARAMSET (1 << 16) // parameter has been explicitely set in get functions
|
||||
#define PARAMFLAG_PARAMSETDEF (1 << 17) // parameter has been set to default value in get functions
|
||||
|
||||
|
||||
/* checkedparam_t is possibly used in paramdef_t for specific parameter value validation */
|
||||
#define CONFIG_MAX_NUMCHECKVAL 20
|
||||
typedef struct paramdef paramdef_t;
|
||||
typedef union checkedparam {
|
||||
struct {
|
||||
int (*f1)(paramdef_t *param); /* check an integer against a list of authorized values */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1;
|
||||
struct {
|
||||
int (*f1a)(paramdef_t *param); /* check an integer against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values in config file */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1a;
|
||||
struct {
|
||||
int (*f2)(paramdef_t *param); /* check an integer against an authorized range, defined by its min and max value */
|
||||
int okintrange[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store min and max values */
|
||||
|
||||
} s2;
|
||||
struct {
|
||||
int (*f3)(paramdef_t *param); /* check a string against a list of authorized values */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3;
|
||||
struct {
|
||||
int (*f3a)(paramdef_t *param); /* check a string against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3a;
|
||||
struct {
|
||||
int (*f4)(paramdef_t *param); /* generic check function, no arguments but the param description */
|
||||
|
||||
} s4;
|
||||
struct {
|
||||
void (*checkfunc)(void) ;
|
||||
} s5;
|
||||
struct {
|
||||
int (*f1)(paramdef_t *param); /* check an integer against a list of authorized values */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1;
|
||||
struct {
|
||||
int (*f1a)(paramdef_t *param); /* check an integer against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values in config file */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1a;
|
||||
struct {
|
||||
int (*f2)(paramdef_t *param); /* check an integer against an authorized range, defined by its min and max value */
|
||||
int okintrange[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store min and max values */
|
||||
|
||||
} s2;
|
||||
struct {
|
||||
int (*f3)(paramdef_t *param); /* check a string against a list of authorized values */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3;
|
||||
struct {
|
||||
int (*f3a)(paramdef_t *param); /* check a string against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3a;
|
||||
struct {
|
||||
int (*f4)(paramdef_t *param); /* generic check function, no arguments but the param description */
|
||||
|
||||
} s4;
|
||||
struct {
|
||||
void (*checkfunc)(void) ;
|
||||
} s5;
|
||||
} checkedparam_t;
|
||||
|
||||
/* paramdef is used to describe a parameter, array of paramdef_t strustures is used as the main parameter in */
|
||||
/* config apis used to retrieve parameters values */
|
||||
typedef struct paramdef
|
||||
{
|
||||
char optname[MAX_OPTNAME_SIZE]; /* parameter name, can be used as long command line option */
|
||||
char *helpstr; /* help string */
|
||||
unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */
|
||||
union { /* pointer to the parameter value, completed by the config module */
|
||||
char **strptr;
|
||||
char **strlistptr;
|
||||
uint8_t *u8ptr;
|
||||
int8_t *i8ptr;
|
||||
uint16_t *u16ptr;
|
||||
int16_t *i16ptr;
|
||||
uint32_t *uptr;
|
||||
int32_t *iptr;
|
||||
uint64_t *u64ptr;
|
||||
int64_t *i64ptr;
|
||||
double *dblptr;
|
||||
void *voidptr;
|
||||
} ;
|
||||
union { /* default parameter value, to be used when PARAMFLAG_MANDATORY is not specified */
|
||||
char *defstrval;
|
||||
char **defstrlistval;
|
||||
uint32_t defuintval;
|
||||
int defintval;
|
||||
uint64_t defint64val;
|
||||
int *defintarrayval;
|
||||
double defdblval;
|
||||
} ;
|
||||
char type; /* parameter value type, as listed below as TYPE_XXXX macro */
|
||||
int numelt; /* number of elements in a list or array parameters or max size of string value */
|
||||
checkedparam_t *chkPptr; /* possible pointer to the structure containing the info used to check parameter values */
|
||||
int *processedvalue; /* used to store integer values computed from string original value */
|
||||
typedef struct paramdef {
|
||||
char optname[MAX_OPTNAME_SIZE]; /* parameter name, can be used as long command line option */
|
||||
char *helpstr; /* help string */
|
||||
unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */
|
||||
union { /* pointer to the parameter value, completed by the config module */
|
||||
char **strptr;
|
||||
char **strlistptr;
|
||||
uint8_t *u8ptr;
|
||||
int8_t *i8ptr;
|
||||
uint16_t *u16ptr;
|
||||
int16_t *i16ptr;
|
||||
uint32_t *uptr;
|
||||
int32_t *iptr;
|
||||
uint64_t *u64ptr;
|
||||
int64_t *i64ptr;
|
||||
double *dblptr;
|
||||
void *voidptr;
|
||||
} ;
|
||||
union { /* default parameter value, to be used when PARAMFLAG_MANDATORY is not specified */
|
||||
char *defstrval;
|
||||
char **defstrlistval;
|
||||
uint32_t defuintval;
|
||||
int defintval;
|
||||
uint64_t defint64val;
|
||||
int *defintarrayval;
|
||||
double defdblval;
|
||||
} ;
|
||||
char type; /* parameter value type, as listed below as TYPE_XXXX macro */
|
||||
int numelt; /* number of elements in a list or array parameters or max size of string value */
|
||||
checkedparam_t *chkPptr; /* possible pointer to the structure containing the info used to check parameter values */
|
||||
int *processedvalue; /* used to store integer values computed from string original value */
|
||||
} paramdef_t;
|
||||
|
||||
#define TYPE_INT TYPE_INT32
|
||||
@@ -161,9 +159,9 @@ typedef struct paramdef
|
||||
#define ANY_IPV4ADDR_STRING "0.0.0.0"
|
||||
|
||||
typedef struct paramlist_def {
|
||||
char listname[MAX_OPTNAME_SIZE];
|
||||
paramdef_t **paramarray;
|
||||
int numelt ;
|
||||
char listname[MAX_OPTNAME_SIZE];
|
||||
paramdef_t **paramarray;
|
||||
int numelt ;
|
||||
} paramlist_def_t;
|
||||
|
||||
/* macro helpers for module users */
|
||||
|
||||
@@ -39,414 +39,453 @@
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <platform_types.h>
|
||||
#include "config_userapi.h"
|
||||
#include "../utils/LOG/log.h"
|
||||
|
||||
|
||||
configmodule_interface_t *config_get_if(void)
|
||||
{
|
||||
if (cfgptr == NULL) {
|
||||
fprintf(stderr,"[CONFIG] %s %d config module not initialized\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
return cfgptr;
|
||||
}
|
||||
|
||||
char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length)
|
||||
{
|
||||
if (ptr == NULL ) {
|
||||
ptr = malloc(sizeof(char *));
|
||||
if (ptr != NULL) {
|
||||
*ptr=NULL;
|
||||
cfgoptions->strptr=ptr;
|
||||
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) == 0) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)ptr;
|
||||
config_get_if()->numptrs++;
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "[CONFIG] %s %d option %s, cannot allocate pointer: %s \n",
|
||||
__FILE__, __LINE__, cfgoptions->optname, strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
printf_ptrs("[CONFIG] %s ptr: 0x%08lx requested size: %i\n",cfgoptions->optname,(uintptr_t)(ptr),length);
|
||||
if(cfgoptions->numelt > 0 && PARAM_ISSCALAR(cfgoptions) ) { /* already allocated */
|
||||
if (*ptr != NULL) {
|
||||
return *ptr;
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s %d option %s, definition error: value pointer is NULL, declared as %i bytes allocated\n",
|
||||
__FILE__, __LINE__,cfgoptions->optname, cfgoptions->numelt);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
if (*ptr == NULL) {
|
||||
*ptr = malloc(length);
|
||||
if ( *ptr != NULL) {
|
||||
memset(*ptr,0,length);
|
||||
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) == 0) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = *ptr;
|
||||
config_get_if()->numptrs++;
|
||||
}
|
||||
} else {
|
||||
fprintf (stderr,"[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val)
|
||||
{
|
||||
int tmpval=val;
|
||||
if ( ((cfgoptions->paramflags &PARAMFLAG_BOOL) != 0) && tmpval >0) {
|
||||
tmpval =1;
|
||||
configmodule_interface_t *config_get_if(void) {
|
||||
if (cfgptr == NULL) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %s %d config module not initialized\n",__FILE__,__LINE__);
|
||||
}
|
||||
|
||||
return cfgptr;
|
||||
}
|
||||
|
||||
char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) {
|
||||
if (ptr == NULL ) {
|
||||
ptr = malloc(sizeof(char *));
|
||||
|
||||
if (ptr != NULL) {
|
||||
*ptr=NULL;
|
||||
cfgoptions->strptr=ptr;
|
||||
|
||||
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) == 0) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)ptr;
|
||||
config_get_if()->numptrs++;
|
||||
}
|
||||
} else {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %s %d option %s, cannot allocate pointer: %s \n",
|
||||
__FILE__, __LINE__, cfgoptions->optname, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
printf_ptrs("[CONFIG] %s ptr: 0x%08lx requested size: %i\n",cfgoptions->optname,(uintptr_t)(ptr),length);
|
||||
|
||||
if(cfgoptions->numelt > 0 && PARAM_ISSCALAR(cfgoptions) ) { /* already allocated */
|
||||
if (*ptr != NULL) {
|
||||
return *ptr;
|
||||
} else {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %s %d option %s, definition error: value pointer is NULL, declared as %i bytes allocated\n",
|
||||
__FILE__, __LINE__,cfgoptions->optname, cfgoptions->numelt);
|
||||
}
|
||||
}
|
||||
|
||||
if (*ptr == NULL) {
|
||||
*ptr = malloc(length);
|
||||
|
||||
if ( *ptr != NULL) {
|
||||
memset(*ptr,0,length);
|
||||
|
||||
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) == 0) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = *ptr;
|
||||
config_get_if()->numptrs++;
|
||||
}
|
||||
} else {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
}
|
||||
}
|
||||
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val) {
|
||||
int tmpval=val;
|
||||
|
||||
if ( ((cfgoptions->paramflags &PARAMFLAG_BOOL) != 0) && tmpval >0) {
|
||||
tmpval =1;
|
||||
}
|
||||
|
||||
switch (cfgoptions->type) {
|
||||
case TYPE_UINT8:
|
||||
*(cfgoptions->u8ptr) = (uint8_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %u\n", fullname, (uint8_t)tmpval);
|
||||
break;
|
||||
case TYPE_INT8:
|
||||
*(cfgoptions->i8ptr) = (int8_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %i\n", fullname, (int8_t)tmpval);
|
||||
break;
|
||||
case TYPE_UINT16:
|
||||
*(cfgoptions->u16ptr) = (uint16_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %hu\n", fullname, (uint16_t)tmpval);
|
||||
break;
|
||||
case TYPE_INT16:
|
||||
*(cfgoptions->i16ptr) = (int16_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %hi\n", fullname, (int16_t)tmpval);
|
||||
break;
|
||||
case TYPE_UINT32:
|
||||
*(cfgoptions->uptr) = (uint32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %u\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
case TYPE_MASK:
|
||||
*(cfgoptions->uptr) = *(cfgoptions->uptr) | (uint32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: 0x%08x\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
case TYPE_INT32:
|
||||
*(cfgoptions->iptr) = (int32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %i\n", fullname, (int32_t)tmpval);
|
||||
break;
|
||||
default:
|
||||
fprintf (stderr,"[CONFIG] %s %i type %i non integer parameter %s not assigned\n",__FILE__, __LINE__,cfgoptions->type,fullname);
|
||||
break;
|
||||
case TYPE_UINT8:
|
||||
*(cfgoptions->u8ptr) = (uint8_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %u\n", fullname, (uint8_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT8:
|
||||
*(cfgoptions->i8ptr) = (int8_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %i\n", fullname, (int8_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT16:
|
||||
*(cfgoptions->u16ptr) = (uint16_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %hu\n", fullname, (uint16_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT16:
|
||||
*(cfgoptions->i16ptr) = (int16_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %hi\n", fullname, (int16_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_UINT32:
|
||||
*(cfgoptions->uptr) = (uint32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %u\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_MASK:
|
||||
*(cfgoptions->uptr) = *(cfgoptions->uptr) | (uint32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: 0x%08x\n", fullname, (uint32_t)tmpval);
|
||||
break;
|
||||
|
||||
case TYPE_INT32:
|
||||
*(cfgoptions->iptr) = (int32_t)tmpval;
|
||||
printf_params("[CONFIG] %s: %i\n", fullname, (int32_t)tmpval);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf (stderr,"[CONFIG] %s %i type %i non integer parameter %s not assigned\n",__FILE__, __LINE__,cfgoptions->type,fullname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void config_assign_processedint(paramdef_t *cfgoption, int val) {
|
||||
cfgoption->processedvalue = malloc(sizeof(int));
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
*(cfgoption->processedvalue) = val;
|
||||
} else {
|
||||
fprintf (stderr,"[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
cfgoption->processedvalue = malloc(sizeof(int));
|
||||
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
*(cfgoption->processedvalue) = val;
|
||||
} else {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
}
|
||||
}
|
||||
|
||||
int config_get_processedint(paramdef_t *cfgoption) {
|
||||
int ret;
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
ret=*(cfgoption->processedvalue);
|
||||
free( cfgoption->processedvalue);
|
||||
cfgoption->processedvalue=NULL;
|
||||
printf_params("[CONFIG] %s: set from %s to %i\n",cfgoption->optname, *(cfgoption->strptr), ret);
|
||||
} else {
|
||||
fprintf (stderr,"[CONFIG] %s %d %s has no processed integer availablle\n",__FILE__, __LINE__, cfgoption->optname);
|
||||
ret=0;
|
||||
}
|
||||
return ret;
|
||||
int ret;
|
||||
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
ret=*(cfgoption->processedvalue);
|
||||
free( cfgoption->processedvalue);
|
||||
cfgoption->processedvalue=NULL;
|
||||
printf_params("[CONFIG] %s: set from %s to %i\n",cfgoption->optname, *(cfgoption->strptr), ret);
|
||||
} else {
|
||||
fprintf (stderr,"[CONFIG] %s %d %s has no processed integer availablle\n",__FILE__, __LINE__, cfgoption->optname);
|
||||
ret=0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
void config_printhelp(paramdef_t *params,int numparams)
|
||||
{
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
if ( params[i].helpstr != NULL) {
|
||||
printf("%s%s: %s",
|
||||
(strlen(params[i].optname) <= 1) ? "-" : "--",
|
||||
params[i].optname,
|
||||
params[i].helpstr);
|
||||
}
|
||||
}
|
||||
void config_printhelp(paramdef_t *params,int numparams, char *prefix) {
|
||||
printf("\n-----Help for section %-26s: %03i entries------\n",(prefix==NULL)?"(root section)":prefix ,numparams);
|
||||
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
printf(" %s%s: %s",
|
||||
(strlen(params[i].optname) <= 1) ? "-" : "--",
|
||||
params[i].optname,
|
||||
(params[i].helpstr != NULL)?params[i].helpstr:"Help string not specified\n");
|
||||
} /* for on params entries */
|
||||
|
||||
printf("--------------------------------------------------------------------\n\n");
|
||||
}
|
||||
|
||||
int config_execcheck(paramdef_t *params,int numparams, char *prefix)
|
||||
{
|
||||
int st=0;
|
||||
int config_execcheck(paramdef_t *params,int numparams, char *prefix) {
|
||||
int st=0;
|
||||
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
if ( params[i].chkPptr == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (params[i].chkPptr->s4.f4 != NULL) {
|
||||
st += params[i].chkPptr->s4.f4(&(params[i]));
|
||||
}
|
||||
}
|
||||
if (st != 0) {
|
||||
fprintf(stderr,"[CONFIG] config_execcheck: section %s %i parameters with wrong value\n", prefix, -st);
|
||||
if ( CONFIG_ISFLAGSET(CONFIG_NOABORTONCHKF) == 0) {
|
||||
exit_fun("exit because configuration failed\n");
|
||||
}
|
||||
}
|
||||
return st;
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
if ( params[i].chkPptr == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (params[i].chkPptr->s4.f4 != NULL) {
|
||||
st += params[i].chkPptr->s4.f4(&(params[i]));
|
||||
}
|
||||
}
|
||||
|
||||
if (st != 0) {
|
||||
CONFIG_PRINTF_ERROR("[CONFIG] config_execcheck: section %s %i parameters with wrong value\n", prefix, -st);
|
||||
}
|
||||
|
||||
return st;
|
||||
}
|
||||
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix)
|
||||
{
|
||||
int ret= -1;
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix) {
|
||||
int ret= -1;
|
||||
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
fprintf(stderr,"[CONFIG] config_get, section %s skipped, config module not properly initialized\n",prefix);
|
||||
return ret;
|
||||
}
|
||||
configmodule_interface_t *cfgif = config_get_if();
|
||||
if (cfgif != NULL) {
|
||||
ret = config_get_if()->get(params, numparams,prefix);
|
||||
if (ret >= 0) {
|
||||
config_process_cmdline(params,numparams,prefix);
|
||||
config_execcheck(params,numparams,prefix);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
|
||||
configmodule_interface_t *cfgif = config_get_if();
|
||||
|
||||
if (cfgif != NULL) {
|
||||
ret = config_get_if()->get(params, numparams,prefix);
|
||||
|
||||
if (ret >= 0) {
|
||||
config_process_cmdline(params,numparams,prefix);
|
||||
config_execcheck(params,numparams,prefix);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix) {
|
||||
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
|
||||
fprintf(stderr,"[CONFIG] config_get skipped, config module not properly initialized\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!config_get_if())
|
||||
return -1;
|
||||
|
||||
const int ret = config_get_if()->getlist(ParamList, params, numparams, prefix);
|
||||
|
||||
if (ret >= 0 && params) {
|
||||
char *newprefix;
|
||||
|
||||
if (prefix) {
|
||||
int rc = asprintf(&newprefix, "%s.%s", prefix, ParamList->listname);
|
||||
|
||||
if (rc < 0) newprefix = NULL;
|
||||
} else {
|
||||
newprefix = ParamList->listname;
|
||||
}
|
||||
|
||||
char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */
|
||||
|
||||
for (int i = 0; i < ParamList->numelt; ++i) {
|
||||
// TODO config_process_cmdline?
|
||||
sprintf(cfgpath, "%s.[%i]", newprefix, i);
|
||||
config_process_cmdline(ParamList->paramarray[i],numparams,cfgpath);
|
||||
config_execcheck(ParamList->paramarray[i], numparams, cfgpath);
|
||||
}
|
||||
|
||||
if (prefix)
|
||||
free(newprefix);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int config_isparamset(paramdef_t *params,int paramidx)
|
||||
{
|
||||
int config_isparamset(paramdef_t *params,int paramidx) {
|
||||
if ((params[paramidx].paramflags & PARAMFLAG_PARAMSET) != 0) {
|
||||
return 1;
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void print_intvalueerror(paramdef_t *param, char *fname, int *okval, int numokval) {
|
||||
fprintf(stderr,"[CONFIG] %s: %s: %i invalid value, authorized values:\n ",
|
||||
fname,param->optname, (int)*(param->uptr));
|
||||
for ( int i=0; i<numokval ; i++) {
|
||||
fprintf(stderr, " %i",okval[i]);
|
||||
}
|
||||
fprintf(stderr, " \n");
|
||||
}
|
||||
|
||||
int config_check_intval(paramdef_t *param)
|
||||
{
|
||||
if ( param == NULL ){
|
||||
fprintf(stderr,"[CONFIG] config_check_intval: NULL param argument\n");
|
||||
return -1;
|
||||
}
|
||||
for ( int i=0; i<param->chkPptr->s1.num_okintval ; i++) {
|
||||
if( *(param->uptr) == param->chkPptr->s1.okintval[i] ) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_intvalueerror(param,"config_check_intval", param->chkPptr->s1.okintval,param->chkPptr->s1.num_okintval);
|
||||
return -1;
|
||||
fprintf(stderr,"[CONFIG] %s: %s: %i invalid value, authorized values:\n ",
|
||||
fname,param->optname, (int)*(param->uptr));
|
||||
|
||||
for ( int i=0; i<numokval ; i++) {
|
||||
fprintf(stderr, " %i",okval[i]);
|
||||
}
|
||||
|
||||
fprintf(stderr, " \n");
|
||||
}
|
||||
|
||||
int config_check_modify_integer(paramdef_t *param)
|
||||
{
|
||||
|
||||
for (int i=0; i < param->chkPptr->s1a.num_okintval ; i++) {
|
||||
if (*(param->uptr) == param->chkPptr->s1a.okintval[i] ) {
|
||||
printf_params("[CONFIG] %s: read value %i, set to %i\n",param->optname,*(param->uptr),param->chkPptr->s1a.setintval [i]);
|
||||
*(param->uptr) = param->chkPptr->s1a.setintval [i];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_intvalueerror(param,"config_check_modify_integer", param->chkPptr->s1a.okintval,param->chkPptr->s1a.num_okintval);
|
||||
int config_check_intval(paramdef_t *param) {
|
||||
if ( param == NULL ) {
|
||||
fprintf(stderr,"[CONFIG] config_check_intval: NULL param argument\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for ( int i=0; i<param->chkPptr->s1.num_okintval ; i++) {
|
||||
if( *(param->uptr) == param->chkPptr->s1.okintval[i] ) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
print_intvalueerror(param,"config_check_intval", param->chkPptr->s1.okintval,param->chkPptr->s1.num_okintval);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_check_intrange(paramdef_t *param)
|
||||
{
|
||||
if( *(param->iptr) >= param->chkPptr->s2.okintrange[0] && *(param->iptr) <= param->chkPptr->s2.okintrange[1] ) {
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr,"[CONFIG] config_check_intrange: %s: %i invalid value, authorized range: %i %i\n",
|
||||
param->optname, (int)*(param->uptr), param->chkPptr->s2.okintrange[0], param->chkPptr->s2.okintrange[1]);
|
||||
return -1;
|
||||
int config_check_modify_integer(paramdef_t *param) {
|
||||
for (int i=0; i < param->chkPptr->s1a.num_okintval ; i++) {
|
||||
if (*(param->uptr) == param->chkPptr->s1a.okintval[i] ) {
|
||||
printf_params("[CONFIG] %s: read value %i, set to %i\n",param->optname,*(param->uptr),param->chkPptr->s1a.setintval [i]);
|
||||
*(param->uptr) = param->chkPptr->s1a.setintval [i];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
print_intvalueerror(param,"config_check_modify_integer", param->chkPptr->s1a.okintval,param->chkPptr->s1a.num_okintval);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_check_intrange(paramdef_t *param) {
|
||||
if( *(param->iptr) >= param->chkPptr->s2.okintrange[0] && *(param->iptr) <= param->chkPptr->s2.okintrange[1] ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
fprintf(stderr,"[CONFIG] config_check_intrange: %s: %i invalid value, authorized range: %i %i\n",
|
||||
param->optname, (int)*(param->uptr), param->chkPptr->s2.okintrange[0], param->chkPptr->s2.okintrange[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
void print_strvalueerror(paramdef_t *param, char *fname, char **okval, int numokval) {
|
||||
fprintf(stderr,"[CONFIG] %s: %s: %s invalid value, authorized values:\n ",
|
||||
fname,param->optname, *(param->strptr));
|
||||
for ( int i=0; i<numokval ; i++) {
|
||||
fprintf(stderr, " %s",okval[i]);
|
||||
}
|
||||
fprintf(stderr, " \n");
|
||||
fprintf(stderr,"[CONFIG] %s: %s: %s invalid value, authorized values:\n ",
|
||||
fname,param->optname, *(param->strptr));
|
||||
|
||||
for ( int i=0; i<numokval ; i++) {
|
||||
fprintf(stderr, " %s",okval[i]);
|
||||
}
|
||||
|
||||
fprintf(stderr, " \n");
|
||||
}
|
||||
|
||||
int config_check_strval(paramdef_t *param)
|
||||
{
|
||||
if ( param == NULL ){
|
||||
fprintf(stderr,"[CONFIG] config_check_strval: NULL param argument\n");
|
||||
return -1;
|
||||
}
|
||||
for ( int i=0; i<param->chkPptr->s3.num_okstrval ; i++) {
|
||||
if( strcasecmp(*(param->strptr),param->chkPptr->s3.okstrval[i] ) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_strvalueerror(param, "config_check_strval", param->chkPptr->s3.okstrval, param->chkPptr->s3.num_okstrval);
|
||||
|
||||
int config_check_strval(paramdef_t *param) {
|
||||
if ( param == NULL ) {
|
||||
fprintf(stderr,"[CONFIG] config_check_strval: NULL param argument\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for ( int i=0; i<param->chkPptr->s3.num_okstrval ; i++) {
|
||||
if( strcasecmp(*(param->strptr),param->chkPptr->s3.okstrval[i] ) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
print_strvalueerror(param, "config_check_strval", param->chkPptr->s3.okstrval, param->chkPptr->s3.num_okstrval);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_checkstr_assign_integer(paramdef_t *param)
|
||||
{
|
||||
int config_checkstr_assign_integer(paramdef_t *param) {
|
||||
for (int i=0; i < param->chkPptr->s3a.num_okstrval ; i++) {
|
||||
if (strcasecmp(*(param->strptr),param->chkPptr->s3a.okstrval[i] ) == 0) {
|
||||
config_assign_processedint(param, param->chkPptr->s3a.setintval[i]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (int i=0; i < param->chkPptr->s3a.num_okstrval ; i++) {
|
||||
if (strcasecmp(*(param->strptr),param->chkPptr->s3a.okstrval[i] ) == 0) {
|
||||
config_assign_processedint(param, param->chkPptr->s3a.setintval[i]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_strvalueerror(param, "config_check_strval", param->chkPptr->s3a.okstrval, param->chkPptr->s3a.num_okstrval);
|
||||
|
||||
return -1;
|
||||
print_strvalueerror(param, "config_check_strval", param->chkPptr->s3a.okstrval, param->chkPptr->s3a.num_okstrval);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_setdefault_string(paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
void config_set_checkfunctions(paramdef_t *params, checkedparam_t *checkfunctions, int numparams) {
|
||||
for (int i=0; i< numparams ; i++ ) {
|
||||
params[i].chkPptr = &(checkfunctions[i]);
|
||||
}
|
||||
}
|
||||
|
||||
int config_setdefault_string(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
if( cfgoptions->defstrval != NULL) {
|
||||
status=1;
|
||||
status=1;
|
||||
|
||||
if (cfgoptions->numelt == 0 ) {
|
||||
config_check_valptr(cfgoptions, (char **)(cfgoptions->strptr), sizeof(char *));
|
||||
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(cfgoptions->defstrval)+1);
|
||||
sprintf(*(cfgoptions->strptr), "%s",cfgoptions->defstrval);
|
||||
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, *(cfgoptions->strptr));
|
||||
} else {
|
||||
sprintf((char *)*(cfgoptions->strptr), "%s",cfgoptions->defstrval);
|
||||
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, (char *)*(cfgoptions->strptr));
|
||||
}
|
||||
if (cfgoptions->numelt == 0 ) {
|
||||
config_check_valptr(cfgoptions, (char **)(cfgoptions->strptr), sizeof(char *));
|
||||
config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(cfgoptions->defstrval)+1);
|
||||
sprintf(*(cfgoptions->strptr), "%s",cfgoptions->defstrval);
|
||||
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, *(cfgoptions->strptr));
|
||||
} else {
|
||||
sprintf((char *)*(cfgoptions->strptr), "%s",cfgoptions->defstrval);
|
||||
printf_params("[CONFIG] %s.%s set to default value \"%s\"\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, (char *)*(cfgoptions->strptr));
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_stringlist(paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int config_setdefault_stringlist(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
if( cfgoptions->defstrlistval != NULL) {
|
||||
cfgoptions->strlistptr=cfgoptions->defstrlistval;
|
||||
status=1;
|
||||
for(int j=0; j<cfgoptions->numelt; j++)
|
||||
printf_params("[CONFIG] %s.%s[%i] set to default value %s\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname,j, cfgoptions->strlistptr[j]);
|
||||
cfgoptions->strlistptr=cfgoptions->defstrlistval;
|
||||
status=1;
|
||||
|
||||
for(int j=0; j<cfgoptions->numelt; j++)
|
||||
printf_params("[CONFIG] %s.%s[%i] set to default value %s\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname,j, cfgoptions->strlistptr[j]);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_int(paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int config_setdefault_int(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
config_check_valptr(cfgoptions, (char **)(&(cfgoptions->iptr)),sizeof(int32_t));
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
config_assign_int(cfgoptions,cfgoptions->optname,cfgoptions->defintval);
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s.%s set to default value\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_int64(paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
config_assign_int(cfgoptions,cfgoptions->optname,cfgoptions->defintval);
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s.%s set to default value\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_int64(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->i64ptr),sizeof(long long));
|
||||
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
*(cfgoptions->u64ptr)=cfgoptions->defuintval;
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s.%s set to default value %llu\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, (long long unsigned)(*(cfgoptions->u64ptr)));
|
||||
*(cfgoptions->u64ptr)=cfgoptions->defuintval;
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s.%s set to default value %llu\n", ((prefix == NULL) ? "" : prefix), cfgoptions->optname, (long long unsigned)(*(cfgoptions->u64ptr)));
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_intlist(paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int status = 0;
|
||||
int config_setdefault_intlist(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
if( cfgoptions->defintarrayval != NULL) {
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->iptr), sizeof(int32_t*));
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->iptr), sizeof(int32_t *));
|
||||
cfgoptions->iptr=cfgoptions->defintarrayval;
|
||||
status=1;
|
||||
|
||||
for (int j=0; j<cfgoptions->numelt ; j++) {
|
||||
printf_params("[CONFIG] %s[%i] set to default value %i\n",cfgoptions->optname ,j,(int)cfgoptions->iptr[j]);
|
||||
printf_params("[CONFIG] %s[%i] set to default value %i\n",cfgoptions->optname ,j,(int)cfgoptions->iptr[j]);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_setdefault_double(paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int config_setdefault_double(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
config_check_valptr(cfgoptions, (char **)&(cfgoptions->dblptr),sizeof(double));
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
*(cfgoptions->u64ptr)=cfgoptions->defdblval;
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s set to default value %lf\n",cfgoptions->optname , *(cfgoptions->dblptr));
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_assign_ipv4addr(paramdef_t *cfgoptions, char *ipv4addr)
|
||||
{
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->uptr), sizeof(int));
|
||||
int rst=inet_pton(AF_INET, ipv4addr ,cfgoptions->uptr );
|
||||
if (rst == 1 && *(cfgoptions->uptr) > 0) {
|
||||
printf_params("[CONFIG] %s: %s\n",cfgoptions->optname, ipv4addr);
|
||||
return 1;
|
||||
} else {
|
||||
if ( strncmp(ipv4addr,ANY_IPV4ADDR_STRING,sizeof(ANY_IPV4ADDR_STRING)) == 0) {
|
||||
printf_params("[CONFIG] %s:%s (INADDR_ANY) \n",cfgoptions->optname,ipv4addr);
|
||||
*cfgoptions->uptr=INADDR_ANY;
|
||||
return 1;
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s not valid for %s \n", ipv4addr, cfgoptions->optname);
|
||||
return -1;
|
||||
}
|
||||
if( ((cfgoptions->paramflags & PARAMFLAG_MANDATORY) == 0)) {
|
||||
*(cfgoptions->u64ptr)=cfgoptions->defdblval;
|
||||
status=1;
|
||||
printf_params("[CONFIG] %s set to default value %lf\n",cfgoptions->optname , *(cfgoptions->dblptr));
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_assign_ipv4addr(paramdef_t *cfgoptions, char *ipv4addr) {
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->uptr), sizeof(int));
|
||||
int rst=inet_pton(AF_INET, ipv4addr ,cfgoptions->uptr );
|
||||
|
||||
if (rst == 1 && *(cfgoptions->uptr) > 0) {
|
||||
printf_params("[CONFIG] %s: %s\n",cfgoptions->optname, ipv4addr);
|
||||
return 1;
|
||||
} else {
|
||||
if ( strncmp(ipv4addr,ANY_IPV4ADDR_STRING,sizeof(ANY_IPV4ADDR_STRING)) == 0) {
|
||||
printf_params("[CONFIG] %s:%s (INADDR_ANY) \n",cfgoptions->optname,ipv4addr);
|
||||
*cfgoptions->uptr=INADDR_ANY;
|
||||
return 1;
|
||||
} else {
|
||||
fprintf(stderr,"[CONFIG] %s not valid for %s \n", ipv4addr, cfgoptions->optname);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int config_setdefault_ipv4addr(paramdef_t *cfgoptions, char *prefix)
|
||||
{
|
||||
int config_setdefault_ipv4addr(paramdef_t *cfgoptions, char *prefix) {
|
||||
int status = 0;
|
||||
|
||||
|
||||
if (cfgoptions->defstrval != NULL) {
|
||||
status = config_assign_ipv4addr(cfgoptions, cfgoptions->defstrval);
|
||||
status = config_assign_ipv4addr(cfgoptions, cfgoptions->defstrval);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file common/config/config_userapi.h
|
||||
* \brief: configuration module, include file to be used by the source code calling the
|
||||
* \brief: configuration module, include file to be used by the source code calling the
|
||||
* configuration module to access configuration parameters
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
@@ -31,7 +31,7 @@
|
||||
* \warning
|
||||
*/
|
||||
#ifndef INCLUDE_CONFIG_USERAPI_H
|
||||
#define INCLUDE_CONFIG_USERAPI_H
|
||||
#define INCLUDE_CONFIG_USERAPI_H
|
||||
#include "config_load_configmodule.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -48,17 +48,22 @@ extern "C"
|
||||
#define CONFIG_ISPARAMFLAGSET(P,F) ( !!(P.paramflags & F))
|
||||
/* utility functions, to be used by configuration module and/or configuration libraries */
|
||||
extern configmodule_interface_t *config_get_if(void);
|
||||
extern char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) ;
|
||||
extern void config_printhelp(paramdef_t *,int numparams);
|
||||
extern char *config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) ;
|
||||
extern void config_printhelp(paramdef_t *,int numparams, char *prefix);
|
||||
extern int config_process_cmdline(paramdef_t *params,int numparams, char *prefix);
|
||||
extern void config_assign_processedint(paramdef_t *cfgoption, int val);
|
||||
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
|
||||
extern int config_assign_ipv4addr(paramdef_t *cfgoptions, char *ipv4addr);
|
||||
|
||||
/* apis to get parameters, to be used by oai modules, at configuration time */
|
||||
/* apis to get/check parameters, to be used by oai modules, at configuration time */
|
||||
#define CONFIG_CHECKALLSECTIONS "ALLSECTIONS"
|
||||
extern int config_check_unknown_cmdlineopt(char *prefix);
|
||||
extern int config_get(paramdef_t *params,int numparams, char *prefix);
|
||||
extern int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams, char *prefix);
|
||||
|
||||
/* apis to set some of the paramdef_t fields before using the get/getlist api's */
|
||||
extern void config_set_checkfunctions(paramdef_t *params, checkedparam_t *checkfunctions, int numparams);
|
||||
|
||||
/* apis to retrieve parameters info after calling get or getlist functions */
|
||||
extern int config_isparamset(paramdef_t *params,int paramidx);
|
||||
extern int config_get_processedint(paramdef_t *cfgoption);
|
||||
|
||||
@@ -42,60 +42,60 @@
|
||||
#include "errno.h"
|
||||
|
||||
#if ( LIBCONFIG_VER_MAJOR == 1 && LIBCONFIG_VER_MINOR < 5)
|
||||
#define config_setting_lookup config_lookup_from
|
||||
#define config_setting_lookup config_lookup_from
|
||||
#endif
|
||||
|
||||
void config_libconfig_end(void );
|
||||
|
||||
int read_strlist(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath)
|
||||
{
|
||||
const char *str;
|
||||
int st;
|
||||
int numelt;
|
||||
int read_strlist(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath) {
|
||||
const char *str;
|
||||
int st;
|
||||
int numelt;
|
||||
numelt=config_setting_length(setting);
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
|
||||
st=0;
|
||||
|
||||
numelt=config_setting_length(setting);
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
|
||||
st=0;
|
||||
for (int i=0; i< numelt ; i++) {
|
||||
str=config_setting_get_string_elem(setting,i);
|
||||
if (str==NULL) {
|
||||
printf("[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i);
|
||||
} else {
|
||||
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(str)+1);
|
||||
sprintf(cfgoptions->strlistptr[i],"%s",str);
|
||||
st++;
|
||||
printf_params("[LIBCONFIG] %s%i: %s\n", cfgpath,i,cfgoptions->strlistptr[i]);
|
||||
}
|
||||
}
|
||||
cfgoptions->numelt=numelt;
|
||||
return st;
|
||||
for (int i=0; i< numelt ; i++) {
|
||||
str=config_setting_get_string_elem(setting,i);
|
||||
|
||||
if (str==NULL) {
|
||||
printf("[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i);
|
||||
} else {
|
||||
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(str)+1);
|
||||
sprintf(cfgoptions->strlistptr[i],"%s",str);
|
||||
st++;
|
||||
printf_params("[LIBCONFIG] %s%i: %s\n", cfgpath,i,cfgoptions->strlistptr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
cfgoptions->numelt=numelt;
|
||||
return st;
|
||||
}
|
||||
|
||||
int read_intarray(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath)
|
||||
{
|
||||
int read_intarray(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath) {
|
||||
cfgoptions->numelt=config_setting_length(setting);
|
||||
|
||||
cfgoptions->numelt=config_setting_length(setting);
|
||||
|
||||
if (cfgoptions->numelt > 0) {
|
||||
cfgoptions->iptr=malloc(sizeof(int) * (cfgoptions->numelt));
|
||||
for (int i=0; i< cfgoptions->numelt && cfgoptions->iptr != NULL; i++) {
|
||||
cfgoptions->iptr[i]=config_setting_get_int_elem(setting,i);
|
||||
printf_params("[LIBCONFIG] %s[%i]: %i\n", cfgpath,i,cfgoptions->iptr[i]);
|
||||
} /* for loop on array element... */
|
||||
}
|
||||
return cfgoptions->numelt;
|
||||
if (cfgoptions->numelt > 0) {
|
||||
cfgoptions->iptr=malloc(sizeof(int) * (cfgoptions->numelt));
|
||||
|
||||
for (int i=0; i< cfgoptions->numelt && cfgoptions->iptr != NULL; i++) {
|
||||
cfgoptions->iptr[i]=config_setting_get_int_elem(setting,i);
|
||||
printf_params("[LIBCONFIG] %s[%i]: %i\n", cfgpath,i,cfgoptions->iptr[i]);
|
||||
} /* for loop on array element... */
|
||||
}
|
||||
|
||||
return cfgoptions->numelt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
|
||||
{
|
||||
int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
|
||||
config_setting_t *setting;
|
||||
char *str;
|
||||
int i,u;
|
||||
long long int llu;
|
||||
double dbl;
|
||||
double dbl;
|
||||
int rst;
|
||||
int status=0;
|
||||
int notfound;
|
||||
@@ -104,211 +104,244 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
|
||||
int numdefvals=0;
|
||||
char cfgpath[512]; /* 512 should be enough for the sprintf below */
|
||||
|
||||
for(i=0;i<numoptions;i++) {
|
||||
for(i=0; i<numoptions; i++) {
|
||||
if (prefix != NULL) {
|
||||
sprintf(cfgpath,"%s.%s",prefix,cfgoptions[i].optname);
|
||||
} else {
|
||||
sprintf(cfgpath,"%s",cfgoptions[i].optname);
|
||||
}
|
||||
|
||||
if (prefix != NULL) {
|
||||
sprintf(cfgpath,"%s.%s",prefix,cfgoptions[i].optname);
|
||||
} else {
|
||||
sprintf(cfgpath,"%s",cfgoptions[i].optname);
|
||||
}
|
||||
if( (cfgoptions->paramflags & PARAMFLAG_DONOTREAD) != 0) {
|
||||
printf_params("[LIBCONFIG] %s.%s ignored\n", cfgpath,cfgoptions[i].optname );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( (cfgoptions->paramflags & PARAMFLAG_DONOTREAD) != 0) {
|
||||
printf_params("[LIBCONFIG] %s.%s ignored\n", cfgpath,cfgoptions[i].optname );
|
||||
continue;
|
||||
}
|
||||
notfound=0;
|
||||
defval=0;
|
||||
switch(cfgoptions[i].type)
|
||||
{
|
||||
case TYPE_STRING:
|
||||
if ( config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
|
||||
if ( cfgoptions[i].numelt > 0 && str != NULL && strlen(str) >= cfgoptions[i].numelt ) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
|
||||
cfgpath,str,cfgoptions[i].numelt);
|
||||
str[strlen(str)-1] = 0;
|
||||
}
|
||||
if (cfgoptions[i].numelt == 0 ) {
|
||||
// config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
|
||||
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
|
||||
sprintf( *(cfgoptions[i].strptr) , "%s", str);
|
||||
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,*(cfgoptions[i].strptr) );
|
||||
} else {
|
||||
sprintf( (char *)(cfgoptions[i].strptr) , "%s", str);
|
||||
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,(char *)cfgoptions[i].strptr );
|
||||
}
|
||||
} else {
|
||||
defval=config_setdefault_string(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
break;
|
||||
case TYPE_STRINGLIST:
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
if ( setting != NULL) {
|
||||
read_strlist(&cfgoptions[i],setting,cfgpath);
|
||||
} else {
|
||||
defval=config_setdefault_stringlist(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
break;
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
case TYPE_UINT16:
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_MASK:
|
||||
if ( config_lookup_int(&(libconfig_privdata.cfg),cfgpath, &u)) {
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].iptr)),sizeof(int32_t));
|
||||
config_assign_int(&(cfgoptions[i]),cfgpath,u);
|
||||
} else {
|
||||
defval=config_setdefault_int(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
break;
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
if ( config_lookup_int64(&(libconfig_privdata.cfg),cfgpath, &llu)) {
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)&(cfgoptions[i].i64ptr),sizeof(long long));
|
||||
if(cfgoptions[i].type==TYPE_UINT64) {
|
||||
*(cfgoptions[i].u64ptr) = (uint64_t)llu;
|
||||
printf_params("[LIBCONFIG] %s: %llu\n", cfgpath,(long long unsigned)(*(cfgoptions[i].u64ptr)) );
|
||||
} else {
|
||||
*(cfgoptions[i].iptr) = llu;
|
||||
printf_params("[LIBCONFIG] %s: %lli\n", cfgpath,(long long unsigned)(*(cfgoptions[i].i64ptr)) );
|
||||
}
|
||||
} else {
|
||||
defval=config_setdefault_int64(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
break;
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
if ( setting != NULL) {
|
||||
read_intarray(&cfgoptions[i],setting,cfgpath);
|
||||
} else {
|
||||
defval=config_setdefault_intlist(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
if ( config_lookup_float(&(libconfig_privdata.cfg),cfgpath, &dbl)) {
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)&(cfgoptions[i].dblptr),sizeof(double));
|
||||
*(cfgoptions[i].dblptr) = dbl;
|
||||
printf_params("[LIBCONFIG] %s: %lf\n", cfgpath,*(cfgoptions[i].dblptr) );
|
||||
} else {
|
||||
defval=config_setdefault_double(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
break;
|
||||
case TYPE_IPV4ADDR:
|
||||
if ( !config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
|
||||
defval=config_setdefault_ipv4addr(&(cfgoptions[i]),prefix);
|
||||
} else {
|
||||
rst=config_assign_ipv4addr(cfgoptions, str);
|
||||
if (rst < 0) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s not valid for %s \n", str, cfgpath);
|
||||
fatalerror=1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TYPE_LIST:
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
if ( setting) {
|
||||
cfgoptions[i].numelt=config_setting_length(setting);
|
||||
} else {
|
||||
notfound=1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"[LIBCONFIG] %s type %i not supported\n", cfgpath,cfgoptions[i].type);
|
||||
fatalerror=1;
|
||||
break;
|
||||
} /* switch on param type */
|
||||
if( notfound == 1) {
|
||||
printf("[LIBCONFIG] %s not found in %s ", cfgpath,libconfig_privdata.configfile );
|
||||
if ( (cfgoptions[i].paramflags & PARAMFLAG_MANDATORY) != 0) {
|
||||
fatalerror=1;
|
||||
printf(" mandatory parameter missing\n");
|
||||
notfound=0;
|
||||
defval=0;
|
||||
|
||||
switch(cfgoptions[i].type) {
|
||||
case TYPE_STRING:
|
||||
if ( config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
|
||||
if ( cfgoptions[i].numelt > 0 && str != NULL && strlen(str) >= cfgoptions[i].numelt ) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
|
||||
cfgpath,str,cfgoptions[i].numelt);
|
||||
str[strlen(str)-1] = 0;
|
||||
}
|
||||
|
||||
if (cfgoptions[i].numelt == 0 ) {
|
||||
// config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
|
||||
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
|
||||
sprintf( *(cfgoptions[i].strptr) , "%s", str);
|
||||
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,*(cfgoptions[i].strptr) );
|
||||
} else {
|
||||
sprintf( (char *)(cfgoptions[i].strptr) , "%s", str);
|
||||
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,(char *)cfgoptions[i].strptr );
|
||||
}
|
||||
} else {
|
||||
printf("\n");
|
||||
defval=config_setdefault_string(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
|
||||
if ( setting != NULL) {
|
||||
read_strlist(&cfgoptions[i],setting,cfgpath);
|
||||
} else {
|
||||
defval=config_setdefault_stringlist(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_UINT8:
|
||||
case TYPE_INT8:
|
||||
case TYPE_UINT16:
|
||||
case TYPE_INT16:
|
||||
case TYPE_UINT32:
|
||||
case TYPE_INT32:
|
||||
case TYPE_MASK:
|
||||
if ( config_lookup_int(&(libconfig_privdata.cfg),cfgpath, &u)) {
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].iptr)),sizeof(int32_t));
|
||||
config_assign_int(&(cfgoptions[i]),cfgpath,u);
|
||||
} else {
|
||||
defval=config_setdefault_int(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_UINT64:
|
||||
case TYPE_INT64:
|
||||
if ( config_lookup_int64(&(libconfig_privdata.cfg),cfgpath, &llu)) {
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)&(cfgoptions[i].i64ptr),sizeof(long long));
|
||||
|
||||
if(cfgoptions[i].type==TYPE_UINT64) {
|
||||
*(cfgoptions[i].u64ptr) = (uint64_t)llu;
|
||||
printf_params("[LIBCONFIG] %s: %llu\n", cfgpath,(long long unsigned)(*(cfgoptions[i].u64ptr)) );
|
||||
} else {
|
||||
*(cfgoptions[i].iptr) = llu;
|
||||
printf_params("[LIBCONFIG] %s: %llu\n", cfgpath,(long long unsigned)(*(cfgoptions[i].i64ptr)) );
|
||||
}
|
||||
} else {
|
||||
defval=config_setdefault_int64(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_UINTARRAY:
|
||||
case TYPE_INTARRAY:
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
|
||||
if ( setting != NULL) {
|
||||
read_intarray(&cfgoptions[i],setting,cfgpath);
|
||||
} else {
|
||||
defval=config_setdefault_intlist(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
if ( config_lookup_float(&(libconfig_privdata.cfg),cfgpath, &dbl)) {
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)&(cfgoptions[i].dblptr),sizeof(double));
|
||||
*(cfgoptions[i].dblptr) = dbl;
|
||||
printf_params("[LIBCONFIG] %s: %lf\n", cfgpath,*(cfgoptions[i].dblptr) );
|
||||
} else {
|
||||
defval=config_setdefault_double(&(cfgoptions[i]),prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_IPV4ADDR:
|
||||
if ( !config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
|
||||
defval=config_setdefault_ipv4addr(&(cfgoptions[i]),prefix);
|
||||
} else {
|
||||
rst=config_assign_ipv4addr(cfgoptions, str);
|
||||
|
||||
if (rst < 0) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s not valid for %s \n", str, cfgpath);
|
||||
fatalerror=1;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_LIST:
|
||||
setting = config_setting_lookup (config_root_setting(&(libconfig_privdata.cfg)),cfgpath );
|
||||
|
||||
if ( setting) {
|
||||
cfgoptions[i].numelt=config_setting_length(setting);
|
||||
} else {
|
||||
notfound=1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr,"[LIBCONFIG] %s type %i not supported\n", cfgpath,cfgoptions[i].type);
|
||||
fatalerror=1;
|
||||
break;
|
||||
} /* switch on param type */
|
||||
|
||||
if( notfound == 1) {
|
||||
printf("[LIBCONFIG] %s not found in %s ", cfgpath,libconfig_privdata.configfile );
|
||||
|
||||
if ( (cfgoptions[i].paramflags & PARAMFLAG_MANDATORY) != 0) {
|
||||
fatalerror=1;
|
||||
printf(" mandatory parameter missing\n");
|
||||
} else {
|
||||
printf("\n");
|
||||
}
|
||||
} else {
|
||||
if (defval == 1) {
|
||||
numdefvals++;
|
||||
cfgoptions[i].paramflags = cfgoptions[i].paramflags | PARAMFLAG_PARAMSETDEF;
|
||||
numdefvals++;
|
||||
cfgoptions[i].paramflags = cfgoptions[i].paramflags | PARAMFLAG_PARAMSETDEF;
|
||||
} else {
|
||||
cfgoptions[i].paramflags = cfgoptions[i].paramflags | PARAMFLAG_PARAMSET;
|
||||
cfgoptions[i].paramflags = cfgoptions[i].paramflags | PARAMFLAG_PARAMSET;
|
||||
}
|
||||
|
||||
status++;
|
||||
}
|
||||
} /* for loop on options */
|
||||
|
||||
printf("[LIBCONFIG] %s: %i/%i parameters successfully set, (%i to default value)\n",
|
||||
((prefix == NULL)?"(root)":prefix),
|
||||
((prefix == NULL)?"(root)":prefix),
|
||||
status,numoptions,numdefvals );
|
||||
|
||||
if (fatalerror == 1) {
|
||||
fprintf(stderr,"[LIBCONFIG] fatal errors found when processing %s \n", libconfig_privdata.configfile );
|
||||
config_libconfig_end();
|
||||
end_configmodule();
|
||||
fprintf(stderr,"[LIBCONFIG] fatal errors found when processing %s \n", libconfig_privdata.configfile );
|
||||
config_libconfig_end();
|
||||
end_configmodule();
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_libconfig_getlist(paramlist_def_t *ParamList,
|
||||
paramdef_t *params, int numparams, char *prefix)
|
||||
{
|
||||
config_setting_t *setting;
|
||||
int i,j,status;
|
||||
char *listpath=NULL;
|
||||
char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */
|
||||
int config_libconfig_getlist(paramlist_def_t *ParamList,
|
||||
paramdef_t *params, int numparams, char *prefix) {
|
||||
config_setting_t *setting;
|
||||
int i,j,status;
|
||||
char *listpath=NULL;
|
||||
char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */
|
||||
|
||||
if (prefix != NULL)
|
||||
{
|
||||
i=asprintf(&listpath ,"%s.%s",prefix,ParamList->listname);
|
||||
}
|
||||
else
|
||||
{
|
||||
i=asprintf(&listpath ,"%s",ParamList->listname);
|
||||
}
|
||||
setting = config_lookup(&(libconfig_privdata.cfg), listpath);
|
||||
if ( setting) {
|
||||
status = ParamList->numelt = config_setting_length(setting);
|
||||
printf_params("[LIBCONFIG] %i %s in config file %s \n",
|
||||
ParamList->numelt,listpath,libconfig_privdata.configfile );
|
||||
if (prefix != NULL) {
|
||||
i=asprintf(&listpath ,"%s.%s",prefix,ParamList->listname);
|
||||
} else {
|
||||
i=asprintf(&listpath ,"%s",ParamList->listname);
|
||||
}
|
||||
|
||||
setting = config_lookup(&(libconfig_privdata.cfg), listpath);
|
||||
|
||||
if ( setting) {
|
||||
status = ParamList->numelt = config_setting_length(setting);
|
||||
printf_params("[LIBCONFIG] %i %s in config file %s \n",
|
||||
ParamList->numelt,listpath,libconfig_privdata.configfile );
|
||||
} else {
|
||||
printf("[LIBCONFIG] list %s not found in config file %s \n",
|
||||
listpath,libconfig_privdata.configfile );
|
||||
ParamList->numelt= 0;
|
||||
status = -1;
|
||||
}
|
||||
|
||||
if (ParamList->numelt > 0 && params != NULL) {
|
||||
ParamList->paramarray = malloc(ParamList->numelt * sizeof(paramdef_t *));
|
||||
|
||||
if ( ParamList->paramarray != NULL) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)(ParamList->paramarray);
|
||||
config_get_if()->numptrs++;
|
||||
} else {
|
||||
printf("[LIBCONFIG] list %s not found in config file %s \n",
|
||||
listpath,libconfig_privdata.configfile );
|
||||
ParamList->numelt= 0;
|
||||
status = -1;
|
||||
fprintf (stderr,"[LIBCONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
if (ParamList->numelt > 0 && params != NULL) {
|
||||
ParamList->paramarray = malloc(ParamList->numelt * sizeof(paramdef_t *));
|
||||
if ( ParamList->paramarray != NULL) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)(ParamList->paramarray);
|
||||
config_get_if()->numptrs++;
|
||||
} else {
|
||||
fprintf (stderr,"[LIBCONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
for (i=0 ; i < ParamList->numelt ; i++) {
|
||||
ParamList->paramarray[i] = malloc(numparams * sizeof(paramdef_t));
|
||||
if ( ParamList->paramarray[i] != NULL) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)(ParamList->paramarray[i]);
|
||||
config_get_if()->numptrs++;
|
||||
} else {
|
||||
fprintf (stderr,"[LIBCONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
memcpy(ParamList->paramarray[i], params, sizeof(paramdef_t)*numparams);
|
||||
for (j=0;j<numparams;j++) {
|
||||
ParamList->paramarray[i][j].strptr = NULL ;
|
||||
}
|
||||
sprintf(cfgpath,"%s.[%i]",listpath,i);
|
||||
config_libconfig_get(ParamList->paramarray[i], numparams, cfgpath );
|
||||
} /* for i... */
|
||||
} /* ParamList->numelt > 0 && params != NULL */
|
||||
if (listpath != NULL)
|
||||
free(listpath);
|
||||
return status;
|
||||
|
||||
for (i=0 ; i < ParamList->numelt ; i++) {
|
||||
ParamList->paramarray[i] = malloc(numparams * sizeof(paramdef_t));
|
||||
|
||||
if ( ParamList->paramarray[i] != NULL) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = (char *)(ParamList->paramarray[i]);
|
||||
config_get_if()->numptrs++;
|
||||
} else {
|
||||
fprintf (stderr,"[LIBCONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
memcpy(ParamList->paramarray[i], params, sizeof(paramdef_t)*numparams);
|
||||
|
||||
for (j=0; j<numparams; j++) {
|
||||
ParamList->paramarray[i][j].strptr = NULL ;
|
||||
}
|
||||
|
||||
sprintf(cfgpath,"%s.[%i]",listpath,i);
|
||||
config_libconfig_get(ParamList->paramarray[i], numparams, cfgpath );
|
||||
} /* for i... */
|
||||
} /* ParamList->numelt > 0 && params != NULL */
|
||||
|
||||
if (listpath != NULL)
|
||||
free(listpath);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int config_libconfig_init(char *cfgP[], int numP)
|
||||
{
|
||||
int config_libconfig_init(char *cfgP[], int numP) {
|
||||
config_init(&(libconfig_privdata.cfg));
|
||||
libconfig_privdata.configfile = strdup((char *)cfgP[0]);
|
||||
config_get_if()->numptrs=0;
|
||||
@@ -317,24 +350,22 @@ int config_libconfig_init(char *cfgP[], int numP)
|
||||
/* Read the file. If there is an error, report it and exit. */
|
||||
if(! config_read_file(&(libconfig_privdata.cfg), libconfig_privdata.configfile)) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s %d file %s - %d - %s\n",__FILE__, __LINE__,
|
||||
libconfig_privdata.configfile, config_error_line(&(libconfig_privdata.cfg)),
|
||||
config_error_text(&(libconfig_privdata.cfg)));
|
||||
libconfig_privdata.configfile, config_error_line(&(libconfig_privdata.cfg)),
|
||||
config_error_text(&(libconfig_privdata.cfg)));
|
||||
config_destroy(&(libconfig_privdata.cfg));
|
||||
printf( "\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void config_libconfig_end(void )
|
||||
{
|
||||
void config_libconfig_end(void ) {
|
||||
config_destroy(&(libconfig_privdata.cfg));
|
||||
|
||||
if ( libconfig_privdata.configfile != NULL ) {
|
||||
free(libconfig_privdata.configfile);
|
||||
libconfig_privdata.configfile=NULL;
|
||||
}
|
||||
|
||||
free(libconfig_privdata.configfile);
|
||||
libconfig_privdata.configfile=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
17
common/utils/DOC/loader.md
Normal file
17
common/utils/DOC/loader.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# OAI shared library loader
|
||||
|
||||
Shared libraries usage is modularization mechanism which provides the following advantages:
|
||||
1. Prevents including in the main executable code which is not used in a given configuration
|
||||
1. Provides flexibility, several implementation of a given functionality can be chosen at run-time, without any compilation step. For example you can build several devices (USRP, BladeFR, LimeSDR) and choose which one you want to use on the command line or via the configuration.
|
||||
1. Makes code evolution easier: as soon as the shared library interface is clearly defined, you can work on the functionality implemented in a shared library while regularly updating the other components of the code. You can decide to develop your own version of a functionality, decide to deliver it or not, letting the user decide wwhat version he wants to use.
|
||||
|
||||
The main drawback is a performance cost at init time, when loading libraries.
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
* [runtime usage](loader/rtusage.md)
|
||||
* [developer usage](loader/devusage.md)
|
||||
* [module architecture](loader/arch.md)
|
||||
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
7
common/utils/DOC/loader/arch.md
Normal file
7
common/utils/DOC/loader/arch.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# loader source files
|
||||
|
||||
The oai shared library loader is implemented in two source files, located in [common/utils](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils)
|
||||
1. [load_module_shlib.c](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/load_module_shlib.c) contains the loader implementation
|
||||
1. [load_module_shlib.h](https://gitlab.eurecom.fr/oai/openairinterface5g/tree/develop/common/utils/load_module_shlib.h) is the loader include file containing both private and public data type definitions. It also contain API prototypes.
|
||||
|
||||
[loader home page](../loader.md)
|
||||
16
common/utils/DOC/loader/devusage.md
Normal file
16
common/utils/DOC/loader/devusage.md
Normal file
@@ -0,0 +1,16 @@
|
||||
The loader objectives are
|
||||
1. provides a common mechanism to prevent an executable to include code that is only used under specific configurations, without rebuilding the code
|
||||
1. Provide a common mechanism to allow to choose between different implementations of a given set of functions, without rebuilding the code
|
||||
|
||||
As a developer you may need to look at these sections:
|
||||
|
||||
* [loading a shared library](devusage/loading.md)
|
||||
* [loader API](devusage/api.md)
|
||||
* [loader public structures](devusage/struct.md)
|
||||
|
||||
Loader usage examples can be found in oai sources:
|
||||
|
||||
* device and transport initialization code: [function `load_lib` in *targets/ARCH/COMMON/__common_lib.c__* ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/targets/ARCH/COMMON/common_lib.c#L91)
|
||||
* turbo encoder and decoder initialization: [function `load_codinglib`in *openair1/PHY/CODING/__coding_load.c__*](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/CODING/coding_load.c#L113)
|
||||
|
||||
[loader home page](../loader.md)
|
||||
20
common/utils/DOC/loader/devusage/api.md
Normal file
20
common/utils/DOC/loader/devusage/api.md
Normal file
@@ -0,0 +1,20 @@
|
||||
Loader API is defined in the [common/utils/load_module_shlib.h](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/load_module_shlib.h) include file.
|
||||
```c
|
||||
int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf)
|
||||
```
|
||||
* possibly initializes the loader, if it has not been already initialized
|
||||
* Formats the full shared library path, using the `modname` argument and the loader `shlibpath` and `shlibversion`configuration parameters.
|
||||
* loads the shared library, using the dlopen system call
|
||||
* looks for `< modname >_autoinit` symbol, using the `dlsym` system call and possibly call the corresponding function.
|
||||
* looks for `< modname >_checkbuildver` symbol, using the `dlsym` system call and possibly calls the corresponding function. If the return value of this call is `-1`, program execution is stopped. It is the responsibility of the shared library developer to implement or not a `< modname >_checkbuildver` function and to decide if a version mismatch is a fatal condition. The `< modname >_checkbuildver` function must match the `checkverfunc_t` function type. The first argument is the main executable version, as set in the `PACKAGE_VERSION` macro defined in the [oai CMakeLists](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/cmake_targets/CMakeLists.txt#L218), around line 218. The second argument points to the shared library version which should be set by the `< modname >_checkbuildver` function.
|
||||
* If the farray pointer is null, looks for `< modname >_getfarray` symbol, calls the corresponding function when the symbol is found. `< modname >_getfarray` takes one argument, a pointer to a `loader_shlibfunc_t` array, and returns the number of items in this array, as defined by the `getfarrayfunc_t` type. The `loader_shlibfunc_t` array returned by the shared library must be fully filled (both `fname` and `fptr` fields).
|
||||
* looks for the `numf` function symbols listed in the `farray[i].fname` arguments and set the corresponding `farray[i].fptr`function pointers
|
||||
|
||||
|
||||
```c
|
||||
void * get_shlibmodule_fptr(char *modname, char *fname)
|
||||
```
|
||||
Returns a pointer to the symbol `fname`, defined in module `modname`, or `NULL` if the symbol is not found.
|
||||
|
||||
[loader home page](../../loader.md)
|
||||
[loader developer home page](../devusage.md)
|
||||
56
common/utils/DOC/loader/devusage/loading.md
Normal file
56
common/utils/DOC/loader/devusage/loading.md
Normal file
@@ -0,0 +1,56 @@
|
||||
Implementing a shared library dynamic load using the oai loader is a two steps task:
|
||||
1. define the `loader_shlibfunc_t` array, describing the list of externally available functions implemented in the library. This is the interface of the module.
|
||||
1. Call the `load_module_shlib` function, passing it the previously defined array and the number of items in this array. The first argument to `load_module_shlib` is the name identifying the module, which is also used to format the corresponding library name, as described [here](loader/rtusage#shared-library-names)
|
||||
|
||||
After a successful `load__module_shlib` call, the function pointer of each `loader_shlibfunc_t` array item has been set and can be used to call the corresponding function.
|
||||
|
||||
Typical loader usage looks like:
|
||||
|
||||
```c
|
||||
/* shared library loader include file */
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
.............
|
||||
/*
|
||||
define and initialize the array, describing the list of functions
|
||||
implemented in "mymodule"
|
||||
*/
|
||||
loader_shlibfunc_t mymodule_fdesc[2];
|
||||
mymodule_fdesc[0].fname="mymodule_f1";
|
||||
mymodule_fdesc[1].fname="mymodule_f2";
|
||||
|
||||
/*
|
||||
load the library, it's name must be libmymod.so. Configuration can be
|
||||
used to specify a specific path to look for libmymod.so. Configuration
|
||||
can also specify a version, for example "V1", in this case the loader
|
||||
will look for libmymodV1.so
|
||||
*/
|
||||
ret=load_module_shlib("mymod",mymodule_fdesc, sizeof(mymodule_fdesc)/sizeof(loader_shlibfunc_t));
|
||||
if (ret < 0) {
|
||||
fprintf(stderr,"Library couldn't be loaded\n");
|
||||
} else {
|
||||
/*
|
||||
library has been loaded, we probably want to call some functions...
|
||||
*/
|
||||
ret=((funcf1_t)mymodule_fdesc[0].fptr)();
|
||||
|
||||
..................
|
||||
/*
|
||||
later and/or somewhere else in the code you may want to call function "mymodule_f2"
|
||||
You can use the loader get_shlibmodule_fptr(char *modname, char *fname) function
|
||||
to retrieve the pointer to that function
|
||||
*/
|
||||
funcf2_t *f2;
|
||||
int ret;
|
||||
int intarg1;
|
||||
char *strarg;
|
||||
........................
|
||||
f2 = (funcf2_t)get_shlibmodule_fptr("mymodule", "mymodule_f2")
|
||||
if (f2 != NULL) {
|
||||
ret = f2(intarg1,strarg);
|
||||
}
|
||||
...............
|
||||
```
|
||||
When loading a shared library the loader looks for a symbol named `< module name > _autoinit` and, if it finds it, calls it. The `autoinit` function is called without any argument and the returned value, if any, is not tested.
|
||||
|
||||
[loader home page](../loader.md)
|
||||
[loader developer home page](../../loader/devusage.md)
|
||||
10
common/utils/DOC/loader/devusage/struct.md
Normal file
10
common/utils/DOC/loader/devusage/struct.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# `loader_shlibfunc_t`structure
|
||||
It is defined in include file [ common/util/load_module_shlib.h ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/load_module_shlib.h#L38). This structure is used to list the symbols that should be searched by the loader when calling the `load_module_shlib` function.
|
||||
|
||||
| Fields | Description | I/O |
|
||||
|:-----------|:------------------------------------------------------------------|----:|
|
||||
| `fname` | symbol name, is passed to the [`dlsym`](http://man7.org/linux/man-pages/man3/dlsym.3.html) system call performed by the loader to get a pointer to the symbol | I |
|
||||
| `fptr` | pointer to the symbol name, set by the loader. `fptr` is defined as a `int (*fptr)(void)` function type | O |
|
||||
|
||||
[loader home page](../../loader.md)
|
||||
[loader developer home page](../devusage.md)
|
||||
50
common/utils/DOC/loader/rtusage.md
Normal file
50
common/utils/DOC/loader/rtusage.md
Normal file
@@ -0,0 +1,50 @@
|
||||
## shared library names
|
||||
Shared library full names are built by the loader using the format:
|
||||
> < *path* >/lib< *module name* >< *module version* >.so
|
||||
|
||||
1. the < *module name* > is defined at development time, it comes from the `modname` argument of the `load_module_shlib` call.
|
||||
1. the < *module version* > and < *path* > optional parameters, are defined at run-time, depending on the configuration.
|
||||
|
||||
## loader parameters
|
||||
The loader is using the [configuration module](../../../config/DOC/config.md), and defines global and per library parameters. Global parameters must be specified under the **loader** section and library specific parameters under a **loader.<*module name*>** section. Module specific parameters override the global parameters.
|
||||
### Global loader parameters
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `shlibpath` | `string of char` | `""` | directory path used to look for shared libraries, may be superseded by the library specific `shlibpath`.|
|
||||
| `maxshlibs` | `integer` | 10 | Maximum number of shared libraries the loader can manage. |
|
||||
|
||||
### library specific loader parameters
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `shlibpath` | `string of char` | `""` | directory path used to look for this shared library.|
|
||||
| `shlibversion` | `string of char` | `""` | version to be used to load this shared library.|
|
||||
|
||||
### loader configuration examples
|
||||
|
||||
The following configuration file example just reproduce the default loader parameters:
|
||||
```c
|
||||
loader :
|
||||
{
|
||||
shlibpath = "./";
|
||||
maxshlibs = 10;
|
||||
liboai_device :
|
||||
{
|
||||
shlibpath = "./";
|
||||
shlibversion = "";
|
||||
}
|
||||
};
|
||||
```
|
||||
If you want to load a device called *liboai_device_USRP.so* without writting a specific configuration, you can start the softmodem using the following command:
|
||||
> ./lte-softmodem -O libconfig:/usr/local/oai/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf:dbgl5 --loader.oai_device.shlibversion _USRP
|
||||
|
||||
With this latest example, nn the softmodem logs, you can check that the right device library has been loaded:
|
||||
```bash
|
||||
[LIBCONFIG] loader.oai_device.shlibpath not found in /usr/local/oai/develop-nb-iot-merge/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf
|
||||
[LIBCONFIG] loader.oai_device.shlibversion set to default value ""
|
||||
[LIBCONFIG] loader.oai_device: 1/2 parameters successfully set, (1 to default value)
|
||||
[CONFIG] shlibversion set to _USRP from command line
|
||||
[CONFIG] loader.oai_device 1 options set from command line
|
||||
|
||||
```
|
||||
|
||||
[loader home page](../loader.md)
|
||||
110
common/utils/LOG/DOC/addconsoletrace.md
Normal file
110
common/utils/LOG/DOC/addconsoletrace.md
Normal file
@@ -0,0 +1,110 @@
|
||||
### Adding console traces in oai code
|
||||
#### console messages macros
|
||||
```C
|
||||
LOG_E(<component>,<format>,<argument>,...)
|
||||
LOG_W(<component>,<format>,<argument>,...)
|
||||
LOG_I(<component>,<format>,<argument>,...)
|
||||
LOG_D(<component>,<format>,<argument>,...)
|
||||
LOG_T(<component>,<format>,<argument>,...)
|
||||
)
|
||||
```
|
||||
these macros are used in place of the printf C function. The additionnal ***component*** parameter identifies the functionnal module which generates the message. At run time, the message will only be printed if the configured log level for the component is greater or equal than the macro level used in the code.
|
||||
|
||||
| macro | level letter | level value | level name |
|
||||
|:---------|:---------------|:---------------|----------------:|
|
||||
| LOG_E | E | 0 | error |
|
||||
| LOG_W | W | 1 | warning |
|
||||
| LOG_I | I | 2 | informational |
|
||||
| LOG_D | D | 3 | debug |
|
||||
| LOG_T | T | 4 | trace |
|
||||
|
||||
component list is defined as an `enum` in [log.h](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/LOG/log.h). A new component can be defined by adding an item in this type, it must also be defined in the T tracer [T_messages.txt ](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/T/T_messages.txt).
|
||||
|
||||
Most oai sources are including LOG macros.
|
||||
|
||||
#### conditional code macros
|
||||
|
||||
```C
|
||||
LOG_DEBUGFLAG(<flag>)
|
||||
```
|
||||
this macro is to be used in if statements. The condition is true if the flag has been set, as described in the [run time usage page](rtusage.md)
|
||||
```C
|
||||
if ( LOG_DEBUGFLAG(<flag>) {
|
||||
/*
|
||||
the code below is only executed if the corresponding
|
||||
<flag>_debug option is set.
|
||||
*/
|
||||
......................
|
||||
......................
|
||||
}
|
||||
```
|
||||
[example in oai code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c#L396)
|
||||
|
||||
#### memory dump macros
|
||||
```C
|
||||
LOG_DUMPFLAG(<flag>)
|
||||
```
|
||||
this macro is to be used in if statements. The condition is true if the flag has been set, as described in the [run time usage page](rtusage.md). It is mainly provided to surround LOG_M macros or direct calls to `log_dump`which otherwise would be unconditionals.
|
||||
```C
|
||||
if ( LOG_DUMPFLAG(<flag>) {
|
||||
/*
|
||||
the code below is only executed if the corresponding
|
||||
<flag>_dump option is set.
|
||||
*/
|
||||
LOG_M(.............
|
||||
LOG_M(.............
|
||||
log_dump(...
|
||||
}
|
||||
|
||||
[example in oai code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/LTE_TRANSPORT/prach.c#L205)
|
||||
#### matlab format dump
|
||||
```C
|
||||
LOG_M(file, vector, data, len, dec, format)
|
||||
```
|
||||
|argument| type| description |
|
||||
|:-----------|:-------|-----------------:|
|
||||
| file | char* |path to the fle which will contain the dump |
|
||||
|vector |char * |name of the dump, printed at the top of the dump file |
|
||||
|data| void *| pointer to the memory to be dumpped |
|
||||
|len | int | length of the data to be dumpped, in `dec` unit|
|
||||
| dec| int | length of each data item.Interpretation depends on format|
|
||||
|format| int | defines the type of data to be dumped|
|
||||
|
||||
This macro can be used to dump a buffer in a format that can be used for analyze via tools like matlab or octave. **It must be surrounded by LOG_DEBUGFLAG or LOG_DUMPFLAG macros, to prevent the dump to be built unconditionally.** The LOG_M macro points to the `write_file_matlab` function implemented in [log.c](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/LOG/log.c). **This function should be revisited for more understandable implementation and ease of use (format parameter ???)**
|
||||
[example in oai code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/PHY/LTE_TRANSPORT/prach.c#L205)
|
||||
|
||||
#### hexadecimal format dump
|
||||
```C
|
||||
LOG_DUMPMSG(c, f, b, s, x...)
|
||||
```
|
||||
dumps a memory region if the corresponding debug flag `f` is set as explained here [run time usage page](rtusage.md)
|
||||
|
||||
|argument| type| description |
|
||||
|:-----------|:-------|-----------------:|
|
||||
| c | int, component id (in `comp_name_t` enum)| used to print the message, as specified by the s and x arguments |
|
||||
|f |int |flag used to filter the dump depending on the logs configuration. flag list is defined by the LOG_MASKMAP_INIT macro in [log.h](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/LOG/log.h) |
|
||||
|b| void *| pointer to the memory to be dumpped |
|
||||
|s | int | length of the data to be dumpped in char|
|
||||
| x...| printf format and arguments| text string to be printed at the top of the dump|
|
||||
|
||||
This macro can be used to conditionaly dump a buffer, bytes by bytes, giving the integer value of each byte in hexadecimal form.
|
||||
[example in oai code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair2/RRC/LTE/rrc_eNB.c#L1181)
|
||||
|
||||
This macro points to the `log_dump` function, implemented in [log.c](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/common/utils/LOG/log.c). This function can also dump buffers containing `double` data via the LOG_UDUMPMSG macro
|
||||
|
||||
```C
|
||||
LOG_UDUMPMSG(c, b, s, f, x...)
|
||||
```
|
||||
|argument| type| description |
|
||||
|:-----------|:-------|-----------------:|
|
||||
| c | int, component id (in `comp_name_t` enum)| used to print the message, as specified by the s and x arguments |
|
||||
|b| void *| pointer to the memory to be dumpped |
|
||||
|s | int | length of the data to be dumpped in char|
|
||||
|f| int | format of dumped data LOG_DUMP_CHAR or LOG_DUMP_DOUBLE|
|
||||
| x...| printf format and arguments| text string to be printed at the top of the dump|
|
||||
|
||||
[example in oai code](https://gitlab.eurecom.fr/oai/openairinterface5g/blob/develop/openair1/SIMULATION/LTE_PHY/dlsim.c#L1974)
|
||||
|
||||
[logging facility developer main page](devusage.md)
|
||||
[logging facility main page](log.md)
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
12
common/utils/LOG/DOC/arch.md
Normal file
12
common/utils/LOG/DOC/arch.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# logging facility source files
|
||||
|
||||
The oai logging facility is implemented in two source files, located in [common/utils/LOG](LOG)
|
||||
1. [log.c](../log.c) contains logging implementation
|
||||
1. [log.h](../log.h) is the logging facility include file containing both private and public data type definitions. It also contain API prototypes.
|
||||
|
||||
The logging facility doesn't create any thread, all api's are executed in the context of the caller. The tracing macro's `LOG_<X>` are all using the logRecord_mt function to output the messages. To keep this function thread safe it must perform a single system call to the output stream. The buffer used to build the message must be specific to the calling thread, which is today enforced by using a variable in the logRecord_mt stack.
|
||||
|
||||
Data used by the logging utility are defined by the `log_t` structure which is allocated at init time, when calling the `logInit` function.
|
||||
|
||||
[logging facility main page](log.md)
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
49
common/utils/LOG/DOC/configurelog.md
Normal file
49
common/utils/LOG/DOC/configurelog.md
Normal file
@@ -0,0 +1,49 @@
|
||||
### Initializing and configuring the logging facility
|
||||
|
||||
#### logging facility APIs
|
||||
```C
|
||||
int logInit (void);
|
||||
```
|
||||
Allocate the internal data used by the logging utility, set the configuration, using the [configuration module](../../../config/DOC/config.md)
|
||||
|
||||
```C
|
||||
void logClean (void)
|
||||
```
|
||||
Reset console attributes (color settings) and possibly close opened log files. Logging facility is still usable after this call, the internal data are not freed.
|
||||
|
||||
```C
|
||||
int set_log(int component, int level)
|
||||
void set_glog(int level)
|
||||
```
|
||||
Set a component or all components logiing level. Messages which level is lower than this level are not printed to the console.
|
||||
|
||||
```C
|
||||
void set_glog_onlinelog(int enable)
|
||||
```
|
||||
Enable or disable all logging messages. Even error level messages are discarded, which is not advised. This can be usefull to temporarily workaround high rate of logging messages.
|
||||
|
||||
```C
|
||||
void set_component_filelog(int comp)
|
||||
void close_component_filelog(int comp)
|
||||
```
|
||||
|
||||
Redirect or reset to stdout the output stream used by the logging facility. When the output stream is redirected to a file, it is created under /tmp with a hard-coded filename including the componemt name.
|
||||
|
||||
```C
|
||||
SET_LOG_DEBUG(flag)
|
||||
CLEAR_LOG_DEBUG(flag)
|
||||
SET_LOG_DUMP(flag)
|
||||
CLEAR_LOG_DUMP(flag)
|
||||
```
|
||||
These macros are used to set or clear the corresponding bit flag, trigerring the activation or un-activation of conditional code or memory dumps generation.
|
||||
|
||||
Example of using the logging utility APIs can be found, for initialization and cleanup, in [lte-softmodem.c](../../../../targets/RT/USER/lte-softmodem.c) and in the [telnet server log command implementation](../../telnetsrv/telnetsrv_proccmd.c) for a complete access to the logging facility features.
|
||||
|
||||
#### components and debug flags definitions
|
||||
|
||||
Adding a new component is just adding an item in the `comp_name_t` enum defined in [log.h](../log.h) . You must also declare it in the T Tracer facility [message fefinitions](../../T/T_messages.txt).
|
||||
To add a flag than can then be used for adding conditional code or memory dumps you have to add the flag definition in the `LOG_MASKMAP_INIT` macro, in [log.h](../log.h).
|
||||
|
||||
[logging facility developer main page](devusage.md)
|
||||
[logging facility main page](log.md)
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
14
common/utils/LOG/DOC/devusage.md
Normal file
14
common/utils/LOG/DOC/devusage.md
Normal file
@@ -0,0 +1,14 @@
|
||||
### logging facility developer usage
|
||||
The logging facility objectives are
|
||||
1. provide a common console tracing mechanism
|
||||
1. Allow a flexible activation of console traces, by configuration or dynamically at any time while code is running.
|
||||
|
||||
Most developpers will only use the log macros to add console messages to the code. The logging facility also provides an api that is used for initialization and configuration.
|
||||
|
||||
[Adding console traces in oaicode](addconsoletrace.md)
|
||||
|
||||
[Configuring the logging facility](configurelog.md)
|
||||
|
||||
|
||||
[logging facility main page](log.md)
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
19
common/utils/LOG/DOC/log.md
Normal file
19
common/utils/LOG/DOC/log.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# OAI console logging facility
|
||||
|
||||
oai includes a console logging facility that any component should use when writting informational or debugging messages to the softmodem or uesoftmodem stdout stream.
|
||||
By default, this facility is included at build-time and activated at run-time. The T Tracer and the Logging facility share common options for activation:
|
||||
|
||||
- To disable the logging facility (and T Tracer) at build-time use the *--disable-T-Tracer* switch:
|
||||
|
||||
```bash
|
||||
/build_oai --disable-T-Tracer
|
||||
```
|
||||
- To use the the T-Tracer instead of the console logging facility, use the command line option *T_stdout*. *T_stdout* is a boolean option, which, when set to 0 (false) disable the console logging facility. All stdout messages are then sent to the T-Tracer.
|
||||
|
||||
## Documentation
|
||||
|
||||
* [runtime usage](rtusage.md)
|
||||
* [developer usage](devusage.md)
|
||||
* [module architecture](arch.md)
|
||||
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
265
common/utils/LOG/DOC/rtusage.md
Normal file
265
common/utils/LOG/DOC/rtusage.md
Normal file
@@ -0,0 +1,265 @@
|
||||
## configuring the logging facility
|
||||
The logging facility is fully configurable and it uses the [config module](../../../config/config.md) to get its parameters at init time. The [telnet server](../../telnetsrv/DOC/telnetsrv.md) includes a set of commands which can be used to dynamically modify the logging facility behavior
|
||||
|
||||
All logging facility parameters are defined in the log_config section. Some parameters are global to the logging facility, they modify the way messages are printed to stdout. Conversely, some parameters are specific to a component and only modify the behavior for messages issued by a given component. A third type of parameters can be used to activate conditional debug code or dump messages or buffers.
|
||||
|
||||
### global parameters
|
||||
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `global_log_level` | `pre-defined string of char` | `info` | Allows printing of messages up to the specified level. Available levels, from lower to higher are `error`,`warn`,`info`,`debug`,`trace` |
|
||||
| `global_log_online` | `boolean` | 1 (=true) | If false, all console messages are discarded, whatever their level |
|
||||
| `global_log_options` | `list of pre-defined string of char` | | 3 options can be specified to trigger the information added in the header of the message: `nocolor`, disable color usage in log messages, usefull when redirecting logs to a file, where escape sequences used for color selection can be annoying, `level`, add a one letter level id in the message header (T,D,I,W,E for trace, debug, info, warning, error),`thread`, add the thread name in the message header|
|
||||
|
||||
### Component specific parameters
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `<component>_log_level` | `boolean` | global log level, as defined by the `global_log_level ` parameter) |
|
||||
| `<component>_log_infile` | `boolean` | 0 = false| Triggers the redirection of log messages printed by the specified component in a file. The file path and name is /tmp/<componemt>.[extension] the extension is optional and component dependant, it can be `log `, `dat `, `txt `|
|
||||
|
||||
The list of components defined within oai can be retrieved from the [config module](../../../config/config.md) traces, when asking for config module debugging info on the command line:
|
||||
|
||||
```bash
|
||||
./lte-softmodem -O libconfig:<path to config file>:dbgl5
|
||||
|
||||
[LIBCONFIG] log_config.global_log_level: "info"
|
||||
[CONFIG] global_log_online: 1
|
||||
[CONFIG] log_config.global_log_online set to default value
|
||||
[LIBCONFIG] log_config: 3/3 parameters successfully set, (1 to default value)
|
||||
[LIBCONFIG] global_log_options[0]: nocolor
|
||||
[LIBCONFIG] global_log_options[1]: level
|
||||
[LIBCONFIG] global_log_options[2]: thread
|
||||
[CONFIG] log_config 1 options set from command line
|
||||
[LIBCONFIG] log_config.phy_log_level: "info"
|
||||
[LIBCONFIG] log_config.mac_log_level: "info"
|
||||
[CONFIG] log_config.sim_log_level set to default value "info"
|
||||
[CONFIG] log_config.ocg_log_level set to default value "info"
|
||||
[CONFIG] log_config.omg_log_level set to default value "info"
|
||||
[CONFIG] log_config.opt_log_level set to default value "info"
|
||||
[CONFIG] log_config.otg_log_level set to default value "info"
|
||||
[CONFIG] log_config.otg_latency_log_level set to default value "info"
|
||||
[CONFIG] log_config.otg_latency_bg_log_level set to default value "info"
|
||||
[CONFIG] log_config.otg_gp_log_level set to default value "info"
|
||||
[CONFIG] log_config.otg_gp_bg_log_level set to default value "info"
|
||||
[CONFIG] log_config.otg_jitter_log_level set to default value "info"
|
||||
[LIBCONFIG] log_config.rlc_log_level: "info"
|
||||
[LIBCONFIG] log_config.pdcp_log_level: "info"
|
||||
[LIBCONFIG] log_config.rrc_log_level: "info"
|
||||
[CONFIG] log_config.nas_log_level set to default value "info"
|
||||
[CONFIG] log_config.perf_log_level set to default value "info"
|
||||
[CONFIG] log_config.oip_log_level set to default value "info"
|
||||
[CONFIG] log_config.cli_log_level set to default value "info"
|
||||
[CONFIG] log_config.msc_log_level set to default value "info"
|
||||
[CONFIG] log_config.ocm_log_level set to default value "info"
|
||||
[CONFIG] log_config.udp_log_level set to default value "info"
|
||||
[CONFIG] log_config.gtpv1u_log_level set to default value "info"
|
||||
[CONFIG] log_config.comp23?_log_level set to default value "info"
|
||||
[CONFIG] log_config.s1ap_log_level set to default value "info"
|
||||
[CONFIG] log_config.sctp_log_level set to default value "info"
|
||||
[LIBCONFIG] log_config.hw_log_level: "info"
|
||||
[CONFIG] log_config.osa_log_level set to default value "info"
|
||||
[CONFIG] log_config.eral_log_level set to default value "info"
|
||||
[CONFIG] log_config.mral_log_level set to default value "info"
|
||||
[CONFIG] log_config.enb_app_log_level set to default value "info"
|
||||
[CONFIG] log_config.flexran_agent_log_level set to default value "info"
|
||||
[CONFIG] log_config.tmr_log_level set to default value "info"
|
||||
[CONFIG] log_config.usim_log_level set to default value "info"
|
||||
[CONFIG] log_config.localize_log_level set to default value "info"
|
||||
[CONFIG] log_config.x2ap_log_level set to default value "info"
|
||||
[CONFIG] log_config.loader_log_level set to default value "info"
|
||||
[CONFIG] log_config.asn_log_level set to default value "info"
|
||||
[LIBCONFIG] log_config: 38/38 parameters successfully set, (32 to default value)
|
||||
[CONFIG] log_config 0 options set from command line
|
||||
[CONFIG] phy_log_infile: 0
|
||||
[CONFIG] log_config.phy_log_infile set to default value
|
||||
[CONFIG] mac_log_infile: 0
|
||||
[CONFIG] log_config.mac_log_infile set to default value
|
||||
[CONFIG] sim_log_infile: 0
|
||||
[CONFIG] log_config.sim_log_infile set to default value
|
||||
[CONFIG] ocg_log_infile: 0
|
||||
[CONFIG] log_config.ocg_log_infile set to default value
|
||||
[CONFIG] omg_log_infile: 0
|
||||
[CONFIG] log_config.omg_log_infile set to default value
|
||||
[CONFIG] opt_log_infile: 0
|
||||
[CONFIG] log_config.opt_log_infile set to default value
|
||||
[CONFIG] otg_log_infile: 0
|
||||
[CONFIG] log_config.otg_log_infile set to default value
|
||||
[CONFIG] otg_latency_log_infile: 0
|
||||
[CONFIG] log_config.otg_latency_log_infile set to default value
|
||||
[CONFIG] otg_latency_bg_log_infile: 0
|
||||
[CONFIG] log_config.otg_latency_bg_log_infile set to default value
|
||||
[CONFIG] otg_gp_log_infile: 0
|
||||
[CONFIG] log_config.otg_gp_log_infile set to default value
|
||||
[CONFIG] otg_gp_bg_log_infile: 0
|
||||
[CONFIG] log_config.otg_gp_bg_log_infile set to default value
|
||||
[CONFIG] otg_jitter_log_infile: 0
|
||||
[CONFIG] log_config.otg_jitter_log_infile set to default value
|
||||
[CONFIG] rlc_log_infile: 0
|
||||
[CONFIG] log_config.rlc_log_infile set to default value
|
||||
[CONFIG] pdcp_log_infile: 0
|
||||
[CONFIG] log_config.pdcp_log_infile set to default value
|
||||
[CONFIG] rrc_log_infile: 0
|
||||
[CONFIG] log_config.rrc_log_infile set to default value
|
||||
[CONFIG] nas_log_infile: 0
|
||||
[CONFIG] log_config.nas_log_infile set to default value
|
||||
[CONFIG] perf_log_infile: 0
|
||||
[CONFIG] log_config.perf_log_infile set to default value
|
||||
[CONFIG] oip_log_infile: 0
|
||||
[CONFIG] log_config.oip_log_infile set to default value
|
||||
[CONFIG] cli_log_infile: 0
|
||||
[CONFIG] log_config.cli_log_infile set to default value
|
||||
[CONFIG] msc_log_infile: 0
|
||||
[CONFIG] log_config.msc_log_infile set to default value
|
||||
[CONFIG] ocm_log_infile: 0
|
||||
[CONFIG] log_config.ocm_log_infile set to default value
|
||||
[CONFIG] udp_log_infile: 0
|
||||
[CONFIG] log_config.udp_log_infile set to default value
|
||||
[CONFIG] gtpv1u_log_infile: 0
|
||||
[CONFIG] log_config.gtpv1u_log_infile set to default value
|
||||
[CONFIG] comp23?_log_infile: 0
|
||||
[CONFIG] log_config.comp23?_log_infile set to default value
|
||||
[CONFIG] s1ap_log_infile: 0
|
||||
[CONFIG] log_config.s1ap_log_infile set to default value
|
||||
[CONFIG] sctp_log_infile: 0
|
||||
[CONFIG] log_config.sctp_log_infile set to default value
|
||||
[CONFIG] hw_log_infile: 0
|
||||
[CONFIG] log_config.hw_log_infile set to default value
|
||||
[CONFIG] osa_log_infile: 0
|
||||
[CONFIG] log_config.osa_log_infile set to default value
|
||||
[CONFIG] eral_log_infile: 0
|
||||
[CONFIG] log_config.eral_log_infile set to default value
|
||||
[CONFIG] mral_log_infile: 0
|
||||
[CONFIG] log_config.mral_log_infile set to default value
|
||||
[CONFIG] enb_app_log_infile: 0
|
||||
[CONFIG] log_config.enb_app_log_infile set to default value
|
||||
[CONFIG] flexran_agent_log_infile: 0
|
||||
[CONFIG] log_config.flexran_agent_log_infile set to default value
|
||||
[CONFIG] tmr_log_infile: 0
|
||||
[CONFIG] log_config.tmr_log_infile set to default value
|
||||
[CONFIG] usim_log_infile: 0
|
||||
[CONFIG] log_config.usim_log_infile set to default value
|
||||
[CONFIG] localize_log_infile: 0
|
||||
[CONFIG] log_config.localize_log_infile set to default value
|
||||
[CONFIG] x2ap_log_infile: 0
|
||||
[CONFIG] log_config.x2ap_log_infile set to default value
|
||||
[CONFIG] loader_log_infile: 0
|
||||
[CONFIG] log_config.loader_log_infile set to default value
|
||||
[CONFIG] asn_log_infile: 0
|
||||
[CONFIG] log_config.asn_log_infile set to default value
|
||||
[LIBCONFIG] log_config: 38/38 parameters successfully set, (38 to default value)
|
||||
[CONFIG] log_config 0 options set from command line
|
||||
[CONFIG] PRACH_debug: 0
|
||||
[CONFIG] log_config.PRACH_debug set to default value
|
||||
[CONFIG] RU_debug: 0
|
||||
[CONFIG] log_config.RU_debug set to default value
|
||||
[CONFIG] UE_PHYPROC_debug: 0
|
||||
[CONFIG] log_config.UE_PHYPROC_debug set to default value
|
||||
[CONFIG] LTEESTIM_debug: 0
|
||||
[CONFIG] log_config.LTEESTIM_debug set to default value
|
||||
[CONFIG] DLCELLSPEC_debug: 0
|
||||
[CONFIG] log_config.DLCELLSPEC_debug set to default value
|
||||
[CONFIG] ULSCH_debug: 0
|
||||
[CONFIG] log_config.ULSCH_debug set to default value
|
||||
[CONFIG] RRC_debug: 0
|
||||
[CONFIG] log_config.RRC_debug set to default value
|
||||
[CONFIG] PDCP_debug: 0
|
||||
[CONFIG] log_config.PDCP_debug set to default value
|
||||
[CONFIG] DFT_debug: 0
|
||||
[CONFIG] log_config.DFT_debug set to default value
|
||||
[CONFIG] ASN1_debug: 0
|
||||
[CONFIG] log_config.ASN1_debug set to default value
|
||||
[CONFIG] CTRLSOCKET_debug: 0
|
||||
[CONFIG] log_config.CTRLSOCKET_debug set to default value
|
||||
[CONFIG] SECURITY_debug: 0
|
||||
[CONFIG] log_config.SECURITY_debug set to default value
|
||||
[CONFIG] NAS_debug: 0
|
||||
[CONFIG] log_config.NAS_debug set to default value
|
||||
[CONFIG] RLC_debug: 0
|
||||
[CONFIG] log_config.RLC_debug set to default value
|
||||
[CONFIG] UE_TIMING_debug: 0
|
||||
[CONFIG] log_config.UE_TIMING_debug set to default value
|
||||
[LIBCONFIG] log_config: 15/15 parameters successfully set, (15 to default value)
|
||||
[CONFIG] log_config 0 options set from command line
|
||||
[CONFIG] PRACH_dump: 0
|
||||
[CONFIG] log_config.PRACH_dump set to default value
|
||||
[CONFIG] RU_dump: 0
|
||||
[CONFIG] log_config.RU_dump set to default value
|
||||
[CONFIG] UE_PHYPROC_dump: 0
|
||||
[CONFIG] log_config.UE_PHYPROC_dump set to default value
|
||||
[CONFIG] LTEESTIM_dump: 0
|
||||
[CONFIG] log_config.LTEESTIM_dump set to default value
|
||||
[CONFIG] DLCELLSPEC_dump: 0
|
||||
[CONFIG] log_config.DLCELLSPEC_dump set to default value
|
||||
[CONFIG] ULSCH_dump: 0
|
||||
[CONFIG] log_config.ULSCH_dump set to default value
|
||||
[CONFIG] RRC_dump: 0
|
||||
[CONFIG] log_config.RRC_dump set to default value
|
||||
[CONFIG] PDCP_dump: 0
|
||||
[CONFIG] log_config.PDCP_dump set to default value
|
||||
[CONFIG] DFT_dump: 0
|
||||
[CONFIG] log_config.DFT_dump set to default value
|
||||
[CONFIG] ASN1_dump: 0
|
||||
[CONFIG] log_config.ASN1_dump set to default value
|
||||
[CONFIG] CTRLSOCKET_dump: 0
|
||||
[CONFIG] log_config.CTRLSOCKET_dump set to default value
|
||||
[CONFIG] SECURITY_dump: 0
|
||||
[CONFIG] log_config.SECURITY_dump set to default value
|
||||
[CONFIG] NAS_dump: 0
|
||||
[CONFIG] log_config.NAS_dump set to default value
|
||||
[CONFIG] RLC_dump: 0
|
||||
[CONFIG] log_config.RLC_dump set to default value
|
||||
[CONFIG] UE_TIMING_dump: 0
|
||||
[CONFIG] log_config.UE_TIMING_dump set to default value
|
||||
[LIBCONFIG] log_config: 15/15 parameters successfully set, (15 to default value)
|
||||
[CONFIG] log_config 0 options set from command line
|
||||
log init done
|
||||
|
||||
```
|
||||
It can also be retrieved when using the telnet server, as explained [below](### Using the telnet server to configure the logging facility)
|
||||
|
||||
### parameters to activate conditional code
|
||||
| name | type | default | description |
|
||||
|:---:|:---:|:---:|:----|
|
||||
| `<flag>_debug` | `boolean` | 0 = false | Triggers the activation of conditional code identified by the specified flag.
|
||||
| `<flag>_dump` | `boolean` | 0 = false| Triggers buffer dump, on the console in text form or in a file in matlab format, depending on the developper choice and forcasted usage|
|
||||
|
||||
### Using the configuration file to configure the logging facility
|
||||
The following example sets all components log level to info, exept for hw,phy,mac,rlc,pdcp,rrc which log levels are set to error or warning.
|
||||
```bash
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="error";
|
||||
phy_log_level ="error";
|
||||
mac_log_level ="warn";
|
||||
rlc_log_level ="error"
|
||||
pdcp_log_level ="error";
|
||||
rrc_log_level ="error";
|
||||
};
|
||||
```
|
||||
### Using the command line to configure the logging facility
|
||||
Command line parameter values supersedes values specified in the configuration file.
|
||||
```bash
|
||||
./lte-softmodem -O --log_config.global_log_options nocolor,level,thread --log_config.prach_log_level debug --log_config.PRACH_debug
|
||||
```
|
||||
In this example to get all the debug PRACH messages it is necessary to also set the PRACH_debug flag. This is a choice from the developper.
|
||||
The log messages will be printed whithout color and the header will include the lmessage evel and the thread name:
|
||||
```bash
|
||||
[PHY]I ru thread Time in secs now: 104652566
|
||||
[PHY]I ru thread Time in secs last pps: 91827117
|
||||
[PHY]I ru thread RU 0 rf device ready
|
||||
[PHY]I ru thread RU 0 no asynch_south interface
|
||||
[MAC]E rxtx processing SCHED_MODE=0
|
||||
[PHY]I lte-softmodem PRACH (eNB) : running rx_prach for subframe 1, prach_FreqOffset 2, prach_ConfigIndex 0 , rootSequenceIndex 0
|
||||
[PHY]I lte-softmodem prach_I0 = 0.0 dB
|
||||
[PHY]I rxtx processing max_I0 21, min_I0 0
|
||||
[PHY]I lte-softmodem PRACH (eNB) : running rx_prach for subframe 1, prach_FreqOffset 2, prach_ConfigIndex 0 , rootSequenceIndex 0
|
||||
[PHY]I lte-softmodem PRACH (eNB) : running rx_prach for subframe 1, prach_FreqOffset 2, prach_ConfigIndex 0 , rootSequenceIndex 0
|
||||
```
|
||||
|
||||
### Using the telnet server to configure the logging facility
|
||||
The telnet server includes a `log` command which can be used to dymically modify the logging facility configuration parameters.
|
||||
[telnet server ***softmodem log*** commands](../../telnetsrv/DOC/telnetlog.md)
|
||||
|
||||
[logging facility main page](log.md)
|
||||
[oai Wikis home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
@@ -39,13 +39,9 @@
|
||||
#include "vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
#endif
|
||||
|
||||
# include <pthread.h>
|
||||
# include <string.h>
|
||||
#include <linux/prctl.h>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <linux/prctl.h>
|
||||
#include "common/config/config_userapi.h"
|
||||
// main log variables
|
||||
|
||||
@@ -75,16 +71,14 @@ char *log_level_highlight_start[] = {LOG_RED, LOG_ORANGE, "", LOG_BLUE, LOG_CYBL
|
||||
char *log_level_highlight_end[] = {LOG_RESET,LOG_RESET,LOG_RESET, LOG_RESET,LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
|
||||
|
||||
|
||||
int write_file_matlab(const char *fname,const char *vname,void *data,int length,int dec,char format)
|
||||
{
|
||||
|
||||
int write_file_matlab(const char *fname,const char *vname,void *data,int length,int dec,char format) {
|
||||
FILE *fp=NULL;
|
||||
int i;
|
||||
|
||||
if (data == NULL)
|
||||
return -1;
|
||||
//printf("Writing %d elements of type %d to %s\n",length,format,fname);
|
||||
return -1;
|
||||
|
||||
//printf("Writing %d elements of type %d to %s\n",length,format,fname);
|
||||
|
||||
if (format == 10 || format ==11 || format == 12 || format == 13 || format == 14) {
|
||||
fp = fopen(fname,"a+");
|
||||
@@ -92,8 +86,6 @@ int write_file_matlab(const char *fname,const char *vname,void *data,int length,
|
||||
fp = fopen(fname,"w+");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (fp== NULL) {
|
||||
printf("[OPENAIR][FILE OUTPUT] Cannot open file %s\n",fname);
|
||||
return(-1);
|
||||
@@ -102,121 +94,108 @@ int write_file_matlab(const char *fname,const char *vname,void *data,int length,
|
||||
if (format != 10 && format !=11 && format != 12 && format != 13 && format != 14)
|
||||
fprintf(fp,"%s = [",vname);
|
||||
|
||||
|
||||
switch (format) {
|
||||
case 0: // real 16-bit
|
||||
case 0: // real 16-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((short *)data)[i]);
|
||||
}
|
||||
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((short *)data)[i]);
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
case 1: // complex 16-bit
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
fprintf(fp,"%d + j*(%d)\n",((short *)data)[i],((short *)data)[i+1]);
|
||||
}
|
||||
|
||||
case 1: // complex 16-bit
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
break;
|
||||
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
fprintf(fp,"%d + j*(%d)\n",((short *)data)[i],((short *)data)[i+1]);
|
||||
case 2: // real 32-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((int *)data)[i]);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: // complex 32-bit
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
fprintf(fp,"%d + j*(%d)\n",((int *)data)[i],((int *)data)[i+1]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 2: // real 32-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((int *)data)[i]);
|
||||
}
|
||||
case 4: // real 8-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((char *)data)[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 3: // complex 32-bit
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
fprintf(fp,"%d + j*(%d)\n",((int *)data)[i],((int *)data)[i+1]);
|
||||
}
|
||||
case 5: // complex 8-bit
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
fprintf(fp,"%d + j*(%d)\n",((char *)data)[i],((char *)data)[i+1]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 4: // real 8-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((char *)data)[i]);
|
||||
}
|
||||
case 6: // real 64-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%lld\n",((long long *)data)[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 5: // complex 8-bit
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
fprintf(fp,"%d + j*(%d)\n",((char *)data)[i],((char *)data)[i+1]);
|
||||
}
|
||||
case 7: // real double
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%g\n",((double *)data)[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 6: // real 64-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%lld\n",((long long*)data)[i]);
|
||||
}
|
||||
case 8: // complex double
|
||||
for (i=0; i<length<<1; i+=2*dec) {
|
||||
fprintf(fp,"%g + j*(%g)\n",((double *)data)[i], ((double *)data)[i+1]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 7: // real double
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%g\n",((double *)data)[i]);
|
||||
}
|
||||
case 9: // real unsigned 8-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((unsigned char *)data)[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 8: // complex double
|
||||
for (i=0; i<length<<1; i+=2*dec) {
|
||||
fprintf(fp,"%g + j*(%g)\n",((double *)data)[i], ((double *)data)[i+1]);
|
||||
}
|
||||
case 10 : // case eren 16 bit complex :
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
if((i < 2*(length-1)) && (i > 0))
|
||||
fprintf(fp,"%d + j*(%d),",((short *)data)[i],((short *)data)[i+1]);
|
||||
else if (i == 2*(length-1))
|
||||
fprintf(fp,"%d + j*(%d);",((short *)data)[i],((short *)data)[i+1]);
|
||||
else if (i == 0)
|
||||
fprintf(fp,"\n%d + j*(%d),",((short *)data)[i],((short *)data)[i+1]);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 9: // real unsigned 8-bit
|
||||
for (i=0; i<length; i+=dec) {
|
||||
fprintf(fp,"%d\n",((unsigned char *)data)[i]);
|
||||
}
|
||||
case 11 : //case eren 16 bit real for channel magnitudes:
|
||||
for (i=0; i<length; i+=dec) {
|
||||
if((i <(length-1))&& (i > 0))
|
||||
fprintf(fp,"%d,",((short *)data)[i]);
|
||||
else if (i == (length-1))
|
||||
fprintf(fp,"%d;",((short *)data)[i]);
|
||||
else if (i == 0)
|
||||
fprintf(fp,"\n%d,",((short *)data)[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 10 : // case eren 16 bit complex :
|
||||
|
||||
for (i=0; i<length<<1; i+=(2*dec)) {
|
||||
|
||||
if((i < 2*(length-1)) && (i > 0))
|
||||
fprintf(fp,"%d + j*(%d),",((short *)data)[i],((short *)data)[i+1]);
|
||||
else if (i == 2*(length-1))
|
||||
fprintf(fp,"%d + j*(%d);",((short *)data)[i],((short *)data)[i+1]);
|
||||
else if (i == 0)
|
||||
fprintf(fp,"\n%d + j*(%d),",((short *)data)[i],((short *)data)[i+1]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 11 : //case eren 16 bit real for channel magnitudes:
|
||||
for (i=0; i<length; i+=dec) {
|
||||
|
||||
if((i <(length-1))&& (i > 0))
|
||||
fprintf(fp,"%d,",((short *)data)[i]);
|
||||
else if (i == (length-1))
|
||||
fprintf(fp,"%d;",((short *)data)[i]);
|
||||
else if (i == 0)
|
||||
fprintf(fp,"\n%d,",((short *)data)[i]);
|
||||
}
|
||||
|
||||
printf("\n eren: length :%d",length);
|
||||
break;
|
||||
|
||||
case 12 : // case eren for log2_maxh real unsigned 8 bit
|
||||
fprintf(fp,"%d \n",((unsigned char *)&data)[0]);
|
||||
break;
|
||||
printf("\n eren: length :%d",length);
|
||||
break;
|
||||
|
||||
case 12 : // case eren for log2_maxh real unsigned 8 bit
|
||||
fprintf(fp,"%d \n",((unsigned char *)&data)[0]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (format != 10 && format !=11 && format !=12 && format != 13 && format != 15) {
|
||||
@@ -235,131 +214,152 @@ int write_file_matlab(const char *fname,const char *vname,void *data,int length,
|
||||
void log_getconfig(log_t *g_log) {
|
||||
char *gloglevel = NULL;
|
||||
int consolelog ;
|
||||
|
||||
|
||||
paramdef_t logparams_defaults[] = LOG_GLOBALPARAMS_DESC;
|
||||
paramdef_t logparams_level[MAX_LOG_PREDEF_COMPONENTS];
|
||||
paramdef_t logparams_logfile[MAX_LOG_PREDEF_COMPONENTS];
|
||||
paramdef_t logparams_debug[sizeof(log_maskmap)/sizeof(mapping)];
|
||||
paramdef_t logparams_dump[sizeof(log_maskmap)/sizeof(mapping)];
|
||||
|
||||
int ret = config_get( logparams_defaults,sizeof(logparams_defaults)/sizeof(paramdef_t),CONFIG_STRING_LOG_PREFIX);
|
||||
if (ret <0) {
|
||||
fprintf(stderr,"[LOG] init aborted, configuration couldn't be performed");
|
||||
return;
|
||||
}
|
||||
|
||||
/* set LOG display options (enable/disable color, thread name, level ) */
|
||||
if (ret <0) {
|
||||
fprintf(stderr,"[LOG] init aborted, configuration couldn't be performed");
|
||||
return;
|
||||
}
|
||||
|
||||
/* set LOG display options (enable/disable color, thread name, level ) */
|
||||
for(int i=0; i<logparams_defaults[LOG_OPTIONS_IDX].numelt ; i++) {
|
||||
for(int j=0; log_options[j].name != NULL ; j++) {
|
||||
if (strcmp(logparams_defaults[LOG_OPTIONS_IDX].strlistptr[i],log_options[j].name) == 0) {
|
||||
g_log->flag = g_log->flag | log_options[j].value;
|
||||
break;
|
||||
} else if (log_options[j+1].name == NULL){
|
||||
fprintf(stderr,"Unknown log option: %s\n",logparams_defaults[LOG_OPTIONS_IDX].strlistptr[i]);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* build the parameter array for setting per component log level and infile options */
|
||||
for(int j=0; log_options[j].name != NULL ; j++) {
|
||||
if (strcmp(logparams_defaults[LOG_OPTIONS_IDX].strlistptr[i],log_options[j].name) == 0) {
|
||||
g_log->flag = g_log->flag | log_options[j].value;
|
||||
break;
|
||||
} else if (log_options[j+1].name == NULL) {
|
||||
fprintf(stderr,"Unknown log option: %s\n",logparams_defaults[LOG_OPTIONS_IDX].strlistptr[i]);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* build the parameter array for setting per component log level and infile options */
|
||||
memset(logparams_level, 0, sizeof(paramdef_t)*MAX_LOG_PREDEF_COMPONENTS);
|
||||
memset(logparams_logfile, 0, sizeof(paramdef_t)*MAX_LOG_PREDEF_COMPONENTS);
|
||||
|
||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||
if(g_log->log_component[i].name == NULL) {
|
||||
g_log->log_component[i].name = malloc(16);
|
||||
sprintf((char *)g_log->log_component[i].name,"comp%i?",i);
|
||||
logparams_logfile[i].paramflags = PARAMFLAG_DONOTREAD;
|
||||
logparams_level[i].paramflags = PARAMFLAG_DONOTREAD;
|
||||
g_log->log_component[i].name = malloc(16);
|
||||
sprintf((char *)g_log->log_component[i].name,"comp%i?",i);
|
||||
logparams_logfile[i].paramflags = PARAMFLAG_DONOTREAD;
|
||||
logparams_level[i].paramflags = PARAMFLAG_DONOTREAD;
|
||||
}
|
||||
|
||||
sprintf(logparams_level[i].optname, LOG_CONFIG_LEVEL_FORMAT, g_log->log_component[i].name);
|
||||
sprintf(logparams_logfile[i].optname, LOG_CONFIG_LOGFILE_FORMAT, g_log->log_component[i].name);
|
||||
/* workaround: all log options in existing configuration files use lower case component names
|
||||
where component names include uppercase char in log.h.... */
|
||||
for (int j=0 ; j<strlen(logparams_level[i].optname); j++)
|
||||
logparams_level[i].optname[j] = tolower(logparams_level[i].optname[j]);
|
||||
for (int j=0 ; j<strlen(logparams_level[i].optname); j++)
|
||||
logparams_logfile[i].optname[j] = tolower(logparams_logfile[i].optname[j]);
|
||||
/* */
|
||||
|
||||
/* workaround: all log options in existing configuration files use lower case component names
|
||||
where component names include uppercase char in log.h.... */
|
||||
for (int j=0 ; j<strlen(logparams_level[i].optname); j++)
|
||||
logparams_level[i].optname[j] = tolower(logparams_level[i].optname[j]);
|
||||
|
||||
for (int j=0 ; j<strlen(logparams_level[i].optname); j++)
|
||||
logparams_logfile[i].optname[j] = tolower(logparams_logfile[i].optname[j]);
|
||||
|
||||
/* */
|
||||
logparams_level[i].defstrval = gloglevel;
|
||||
logparams_logfile[i].defuintval = 0;
|
||||
logparams_logfile[i].numelt = 0;
|
||||
logparams_level[i].numelt = 0;
|
||||
logparams_level[i].type = TYPE_STRING;
|
||||
logparams_logfile[i].type = TYPE_UINT;
|
||||
|
||||
logparams_logfile[i].paramflags = logparams_logfile[i].paramflags|PARAMFLAG_BOOL;
|
||||
}
|
||||
/* read the per component parameters */
|
||||
config_get( logparams_level, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||
config_get( logparams_logfile, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||
/* now set the log levels and infile option, according to what we read */
|
||||
}
|
||||
|
||||
/* read the per component parameters */
|
||||
config_get( logparams_level, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||
config_get( logparams_logfile, MAX_LOG_PREDEF_COMPONENTS,CONFIG_STRING_LOG_PREFIX);
|
||||
|
||||
/* now set the log levels and infile option, according to what we read */
|
||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_PREDEF_COMPONENTS; i++) {
|
||||
g_log->log_component[i].level = map_str_to_int(log_level_names, *(logparams_level[i].strptr));
|
||||
set_log(i, g_log->log_component[i].level);
|
||||
|
||||
if (*(logparams_logfile[i].uptr) == 1)
|
||||
set_component_filelog(i);
|
||||
set_component_filelog(i);
|
||||
}
|
||||
|
||||
/* build then read the debug and dump parameter array */
|
||||
for (int i=0;log_maskmap[i].name != NULL ; i++) {
|
||||
sprintf(logparams_debug[i].optname, LOG_CONFIG_DEBUG_FORMAT, log_maskmap[i].name);
|
||||
sprintf(logparams_dump[i].optname, LOG_CONFIG_DUMP_FORMAT, log_maskmap[i].name);
|
||||
logparams_debug[i].defuintval = 0;
|
||||
logparams_debug[i].type = TYPE_UINT;
|
||||
logparams_debug[i].paramflags = PARAMFLAG_BOOL;
|
||||
logparams_debug[i].uptr = NULL;
|
||||
logparams_debug[i].chkPptr = NULL;
|
||||
logparams_debug[i].numelt = 0;
|
||||
logparams_dump[i].defuintval = 0;
|
||||
logparams_dump[i].type = TYPE_UINT;
|
||||
logparams_dump[i].paramflags = PARAMFLAG_BOOL;
|
||||
logparams_dump[i].uptr = NULL;
|
||||
logparams_dump[i].chkPptr = NULL;
|
||||
logparams_dump[i].numelt = 0;
|
||||
/* build then read the debug and dump parameter array */
|
||||
for (int i=0; log_maskmap[i].name != NULL ; i++) {
|
||||
sprintf(logparams_debug[i].optname, LOG_CONFIG_DEBUG_FORMAT, log_maskmap[i].name);
|
||||
sprintf(logparams_dump[i].optname, LOG_CONFIG_DUMP_FORMAT, log_maskmap[i].name);
|
||||
logparams_debug[i].defuintval = 0;
|
||||
logparams_debug[i].type = TYPE_UINT;
|
||||
logparams_debug[i].paramflags = PARAMFLAG_BOOL;
|
||||
logparams_debug[i].uptr = NULL;
|
||||
logparams_debug[i].chkPptr = NULL;
|
||||
logparams_debug[i].numelt = 0;
|
||||
logparams_dump[i].defuintval = 0;
|
||||
logparams_dump[i].type = TYPE_UINT;
|
||||
logparams_dump[i].paramflags = PARAMFLAG_BOOL;
|
||||
logparams_dump[i].uptr = NULL;
|
||||
logparams_dump[i].chkPptr = NULL;
|
||||
logparams_dump[i].numelt = 0;
|
||||
}
|
||||
|
||||
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
|
||||
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
|
||||
/* set the debug mask according to the debug parameters values */
|
||||
config_check_unknown_cmdlineopt(CONFIG_STRING_LOG_PREFIX);
|
||||
|
||||
/* set the debug mask according to the debug parameters values */
|
||||
for (int i=0; log_maskmap[i].name != NULL ; i++) {
|
||||
if (*(logparams_debug[i].uptr) )
|
||||
g_log->debug_mask = g_log->debug_mask | log_maskmap[i].value;
|
||||
g_log->debug_mask = g_log->debug_mask | log_maskmap[i].value;
|
||||
|
||||
if (*(logparams_dump[i].uptr) )
|
||||
g_log->dump_mask = g_log->dump_mask | log_maskmap[i].value;
|
||||
}
|
||||
/* log globally enabled/disabled */
|
||||
g_log->dump_mask = g_log->dump_mask | log_maskmap[i].value;
|
||||
}
|
||||
|
||||
/* log globally enabled/disabled */
|
||||
set_glog_onlinelog(consolelog);
|
||||
}
|
||||
|
||||
int register_log_component(char *name, char *fext, int compidx)
|
||||
{
|
||||
int computed_compidx=compidx;
|
||||
int register_log_component(char *name, char *fext, int compidx) {
|
||||
int computed_compidx=compidx;
|
||||
|
||||
if (strlen(fext) > 3) {
|
||||
fext[3]=0; /* limit log file extension to 3 chars */
|
||||
fext[3]=0; /* limit log file extension to 3 chars */
|
||||
}
|
||||
|
||||
if (compidx < 0) { /* this is not a pre-defined component */
|
||||
for (int i = MAX_LOG_PREDEF_COMPONENTS; i< MAX_LOG_COMPONENTS; i++) {
|
||||
if (g_log->log_component[i].name == NULL) {
|
||||
computed_compidx=i;
|
||||
break;
|
||||
}
|
||||
for (int i = MAX_LOG_PREDEF_COMPONENTS; i< MAX_LOG_COMPONENTS; i++) {
|
||||
if (g_log->log_component[i].name == NULL) {
|
||||
computed_compidx=i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (computed_compidx >= 0 && computed_compidx <MAX_LOG_COMPONENTS) {
|
||||
g_log->log_component[computed_compidx].name = strdup(name);
|
||||
g_log->log_component[computed_compidx].stream = stdout;
|
||||
g_log->log_component[computed_compidx].filelog = 0;
|
||||
g_log->log_component[computed_compidx].filelog_name = malloc(strlen(name)+16);/* /tmp/<name>.%s */
|
||||
sprintf(g_log->log_component[computed_compidx].filelog_name,"/tmp/%s.%s",name,fext);
|
||||
g_log->log_component[computed_compidx].name = strdup(name);
|
||||
g_log->log_component[computed_compidx].stream = stdout;
|
||||
g_log->log_component[computed_compidx].filelog = 0;
|
||||
g_log->log_component[computed_compidx].filelog_name = malloc(strlen(name)+16);/* /tmp/<name>.%s */
|
||||
sprintf(g_log->log_component[computed_compidx].filelog_name,"/tmp/%s.%s",name,fext);
|
||||
} else {
|
||||
fprintf(stderr,"{LOG} %s %d Couldn't register componemt %s\n",__FILE__,__LINE__,name);
|
||||
fprintf(stderr,"{LOG} %s %d Couldn't register componemt %s\n",__FILE__,__LINE__,name);
|
||||
}
|
||||
return computed_compidx;
|
||||
|
||||
return computed_compidx;
|
||||
}
|
||||
|
||||
int logInit (void)
|
||||
{
|
||||
int isLogInitDone (void) {
|
||||
if (g_log == NULL)
|
||||
return 0;
|
||||
|
||||
if (!(g_log->flag & FLAG_INITIALIZED))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int logInit (void) {
|
||||
int i;
|
||||
g_log = calloc(1, sizeof(log_t));
|
||||
|
||||
@@ -367,10 +367,8 @@ int logInit (void)
|
||||
perror ("cannot allocated memory for log generation module \n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memset(g_log,0,sizeof(log_t));
|
||||
|
||||
|
||||
|
||||
register_log_component("PHY","log",PHY);
|
||||
register_log_component("MAC","log",MAC);
|
||||
register_log_component("OPT","log",OPT);
|
||||
@@ -386,143 +384,121 @@ int logInit (void)
|
||||
register_log_component("OTG_JITTER","dat",OTG_JITTER);
|
||||
register_log_component("OCG","",OCG);
|
||||
register_log_component("PERF","",PERF);
|
||||
register_log_component("OIP","",OIP);
|
||||
register_log_component("CLI","",CLI);
|
||||
register_log_component("MSC","log",MSC);
|
||||
register_log_component("OCM","log",OCM);
|
||||
register_log_component("HW","",HW);
|
||||
register_log_component("OSA","",OSA);
|
||||
register_log_component("eRAL","",RAL_ENB);
|
||||
register_log_component("mRAL","",RAL_UE);
|
||||
register_log_component("ENB_APP","log",ENB_APP);
|
||||
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
|
||||
register_log_component("TMR","",TMR);
|
||||
register_log_component("USIM","txt",USIM);
|
||||
register_log_component("SIM","txt",SIM);
|
||||
|
||||
register_log_component("OIP","",OIP);
|
||||
register_log_component("CLI","",CLI);
|
||||
register_log_component("MSC","log",MSC);
|
||||
register_log_component("OCM","log",OCM);
|
||||
register_log_component("HW","",HW);
|
||||
register_log_component("OSA","",OSA);
|
||||
register_log_component("eRAL","",RAL_ENB);
|
||||
register_log_component("mRAL","",RAL_UE);
|
||||
register_log_component("ENB_APP","log",ENB_APP);
|
||||
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
|
||||
register_log_component("TMR","",TMR);
|
||||
register_log_component("USIM","txt",USIM);
|
||||
register_log_component("SIM","txt",SIM);
|
||||
/* following log component are used for the localization*/
|
||||
register_log_component("LOCALIZE","log",LOCALIZE);
|
||||
register_log_component("NAS","log",NAS);
|
||||
register_log_component("UDP","",UDP_);
|
||||
|
||||
|
||||
register_log_component("GTPV1U","",GTPU);
|
||||
|
||||
|
||||
register_log_component("S1AP","",S1AP);
|
||||
register_log_component("X2AP","",X2AP);
|
||||
|
||||
|
||||
register_log_component("SCTP","",SCTP);
|
||||
register_log_component("X2AP","",X2AP);
|
||||
register_log_component("LOADER","log",LOADER);
|
||||
register_log_component("ASN","log",ASN);
|
||||
|
||||
|
||||
|
||||
for (int i=0 ; log_level_names[i].name != NULL ; i++)
|
||||
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
|
||||
|
||||
|
||||
|
||||
|
||||
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
|
||||
|
||||
g_log->filelog_name = "/tmp/openair.log";
|
||||
|
||||
log_getconfig(g_log);
|
||||
|
||||
|
||||
|
||||
// set all unused component items to 0, they are for non predefined components
|
||||
for (i=MAX_LOG_PREDEF_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
memset(&(g_log->log_component[i]),0,sizeof(log_component_t));
|
||||
memset(&(g_log->log_component[i]),0,sizeof(log_component_t));
|
||||
}
|
||||
printf("log init done\n");
|
||||
|
||||
g_log->flag = g_log->flag | FLAG_INITIALIZED;
|
||||
printf("log init done\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
char *log_getthreadname(char *threadname, int bufsize) {
|
||||
int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ;
|
||||
|
||||
int rt = pthread_getname_np(pthread_self(), threadname,bufsize) ;
|
||||
if (rt == 0)
|
||||
{
|
||||
return threadname;
|
||||
} else {
|
||||
return "thread?";
|
||||
}
|
||||
if (rt == 0) {
|
||||
return threadname;
|
||||
} else {
|
||||
return "thread?";
|
||||
}
|
||||
}
|
||||
|
||||
static int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
|
||||
char threadname[PR_SET_NAME];
|
||||
return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s",
|
||||
log_level_highlight_end[level],
|
||||
( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
|
||||
g_log->log_component[comp].name,
|
||||
( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:' '),
|
||||
( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""),
|
||||
format,
|
||||
log_level_highlight_end[level]);
|
||||
return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s",
|
||||
log_level_highlight_end[level],
|
||||
( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
|
||||
g_log->log_component[comp].name,
|
||||
( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:' '),
|
||||
( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""),
|
||||
format,
|
||||
log_level_highlight_end[level]);
|
||||
}
|
||||
|
||||
void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char* format, ... )
|
||||
{
|
||||
void logRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, ... ) {
|
||||
char log_buffer[MAX_LOG_TOTAL];
|
||||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
|
||||
|
||||
|
||||
|
||||
log_header(log_buffer,MAX_LOG_TOTAL ,comp, level,format);
|
||||
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
|
||||
va_end(args);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void log_dump(int component, void *buffer, int buffsize,int datatype, const char* format, ... ) {
|
||||
va_list args;
|
||||
char *wbuf;
|
||||
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... ) {
|
||||
va_list args;
|
||||
char *wbuf;
|
||||
|
||||
switch(datatype) {
|
||||
case LOG_DUMP_DOUBLE:
|
||||
wbuf=malloc((buffsize * 10) + 64 + MAX_LOG_TOTAL);
|
||||
break;
|
||||
|
||||
switch(datatype) {
|
||||
case LOG_DUMP_DOUBLE:
|
||||
wbuf=malloc((buffsize * 10) + 64 + MAX_LOG_TOTAL);
|
||||
break;
|
||||
case LOG_DUMP_CHAR:
|
||||
default:
|
||||
wbuf=malloc((buffsize * 3 ) + 64 + MAX_LOG_TOTAL);
|
||||
break;
|
||||
case LOG_DUMP_CHAR:
|
||||
default:
|
||||
wbuf=malloc((buffsize * 3 ) + 64 + MAX_LOG_TOTAL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (wbuf != NULL) {
|
||||
va_start(args, format);
|
||||
int pos=log_header(wbuf,MAX_LOG_TOTAL ,component, OAILOG_INFO,"");
|
||||
int pos2=vsprintf(wbuf+pos,format, args);
|
||||
pos=pos+pos2;
|
||||
va_end(args);
|
||||
|
||||
for (int i=0; i<buffsize; i++) {
|
||||
switch(datatype) {
|
||||
case LOG_DUMP_DOUBLE:
|
||||
pos = pos + sprintf(wbuf+pos,"%04.4lf ", (double)((double *)buffer)[i]);
|
||||
break;
|
||||
|
||||
case LOG_DUMP_CHAR:
|
||||
default:
|
||||
pos = pos + sprintf(wbuf+pos,"%02x ", (unsigned char)((unsigned char *)buffer)[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (wbuf != NULL) {
|
||||
va_start(args, format);
|
||||
int pos=log_header(wbuf,MAX_LOG_TOTAL ,component, OAILOG_INFO,"");
|
||||
int pos2=vsprintf(wbuf+pos,format, args);
|
||||
pos=pos+pos2;
|
||||
va_end(args);
|
||||
|
||||
for (int i=0; i<buffsize; i++) {
|
||||
switch(datatype) {
|
||||
case LOG_DUMP_DOUBLE:
|
||||
pos = pos + sprintf(wbuf+pos,"%04.4lf ", (double)((double *)buffer)[i]);
|
||||
break;
|
||||
case LOG_DUMP_CHAR:
|
||||
default:
|
||||
pos = pos + sprintf(wbuf+pos,"%02x ", (unsigned char)((unsigned char *)buffer)[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(wbuf+pos,"\n");
|
||||
g_log->log_component[component].print(g_log->log_component[component].stream,wbuf);
|
||||
free(wbuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int set_log(int component, int level)
|
||||
{
|
||||
int set_log(int component, int level) {
|
||||
/* Checking parameters */
|
||||
DevCheck((component >= MIN_LOG_COMPONENTS) && (component < MAX_LOG_COMPONENTS),
|
||||
component, MIN_LOG_COMPONENTS, MAX_LOG_COMPONENTS);
|
||||
@@ -530,38 +506,34 @@ int set_log(int component, int level)
|
||||
OAILOG_ERR);
|
||||
|
||||
if ( g_log->log_component[component].level != OAILOG_DISABLE )
|
||||
g_log->log_component[component].savedlevel = g_log->log_component[component].level;
|
||||
g_log->log_component[component].level = level;
|
||||
g_log->log_component[component].savedlevel = g_log->log_component[component].level;
|
||||
|
||||
g_log->log_component[component].level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_glog(int level)
|
||||
{
|
||||
void set_glog(int level) {
|
||||
for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) {
|
||||
set_log(c, level);
|
||||
set_log(c, level);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void set_glog_onlinelog(int enable)
|
||||
{
|
||||
void set_glog_onlinelog(int enable) {
|
||||
for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) {
|
||||
if ( enable ) {
|
||||
g_log->log_component[c].level = g_log->log_component[c].savedlevel;
|
||||
g_log->log_component[c].vprint = vfprintf;
|
||||
g_log->log_component[c].print = fprintf;
|
||||
g_log->log_component[c].stream = stdout;
|
||||
} else {
|
||||
g_log->log_component[c].level = OAILOG_DISABLE;
|
||||
}
|
||||
}
|
||||
if ( enable ) {
|
||||
g_log->log_component[c].level = g_log->log_component[c].savedlevel;
|
||||
g_log->log_component[c].vprint = vfprintf;
|
||||
g_log->log_component[c].print = fprintf;
|
||||
g_log->log_component[c].stream = stdout;
|
||||
} else {
|
||||
g_log->log_component[c].level = OAILOG_DISABLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
void set_glog_filelog(int enable)
|
||||
{
|
||||
static FILE *fptr;
|
||||
void set_glog_filelog(int enable) {
|
||||
static FILE *fptr;
|
||||
|
||||
if ( enable ) {
|
||||
fptr = fopen(g_log->filelog_name,"w");
|
||||
@@ -574,33 +546,35 @@ static FILE *fptr;
|
||||
} else {
|
||||
for (int c=0; c< MAX_LOG_COMPONENTS; c++ ) {
|
||||
g_log->log_component[c].filelog = 0;
|
||||
|
||||
if (fptr != NULL) {
|
||||
fclose(fptr);
|
||||
}
|
||||
|
||||
g_log->log_component[c].stream = stdout;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_component_filelog(int comp)
|
||||
{
|
||||
if (g_log->log_component[comp].stream == NULL || g_log->log_component[comp].stream == stdout) {
|
||||
g_log->log_component[comp].stream = fopen(g_log->log_component[comp].filelog_name,"w");
|
||||
}
|
||||
g_log->log_component[comp].vprint = vfprintf;
|
||||
g_log->log_component[comp].print = fprintf;
|
||||
g_log->log_component[comp].filelog = 1;
|
||||
void set_component_filelog(int comp) {
|
||||
if (g_log->log_component[comp].stream == NULL || g_log->log_component[comp].stream == stdout) {
|
||||
g_log->log_component[comp].stream = fopen(g_log->log_component[comp].filelog_name,"w");
|
||||
}
|
||||
|
||||
g_log->log_component[comp].vprint = vfprintf;
|
||||
g_log->log_component[comp].print = fprintf;
|
||||
g_log->log_component[comp].filelog = 1;
|
||||
}
|
||||
void close_component_filelog(int comp)
|
||||
{
|
||||
g_log->log_component[comp].filelog = 0;
|
||||
if (g_log->log_component[comp].stream != NULL && g_log->log_component[comp].stream != stdout ) {
|
||||
fclose(g_log->log_component[comp].stream);
|
||||
g_log->log_component[comp].stream = stdout;
|
||||
}
|
||||
g_log->log_component[comp].vprint = vfprintf;
|
||||
g_log->log_component[comp].print = fprintf;
|
||||
|
||||
void close_component_filelog(int comp) {
|
||||
g_log->log_component[comp].filelog = 0;
|
||||
|
||||
if (g_log->log_component[comp].stream != NULL && g_log->log_component[comp].stream != stdout ) {
|
||||
fclose(g_log->log_component[comp].stream);
|
||||
g_log->log_component[comp].stream = stdout;
|
||||
}
|
||||
|
||||
g_log->log_component[comp].vprint = vfprintf;
|
||||
g_log->log_component[comp].print = fprintf;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -608,8 +582,7 @@ void close_component_filelog(int comp)
|
||||
* with string value NULL
|
||||
*/
|
||||
/* map a string to an int. Takes a mapping array and a string as arg */
|
||||
int map_str_to_int(mapping *map, const char *str)
|
||||
{
|
||||
int map_str_to_int(mapping *map, const char *str) {
|
||||
while (1) {
|
||||
if (map->name == NULL) {
|
||||
return(-1);
|
||||
@@ -624,8 +597,7 @@ int map_str_to_int(mapping *map, const char *str)
|
||||
}
|
||||
|
||||
/* map an int to a string. Takes a mapping array and a value */
|
||||
char *map_int_to_str(mapping *map, int val)
|
||||
{
|
||||
char *map_int_to_str(mapping *map, int val) {
|
||||
while (1) {
|
||||
if (map->name == NULL) {
|
||||
return NULL;
|
||||
@@ -639,8 +611,7 @@ char *map_int_to_str(mapping *map, int val)
|
||||
}
|
||||
}
|
||||
|
||||
int is_newline( char *str, int size)
|
||||
{
|
||||
int is_newline( char *str, int size) {
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < size; i++ ) {
|
||||
@@ -653,85 +624,65 @@ int is_newline( char *str, int size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void logClean (void)
|
||||
{
|
||||
void logClean (void) {
|
||||
int i;
|
||||
LOG_UI(PHY,"\n");
|
||||
|
||||
if(isLogInitDone()) {
|
||||
LOG_UI(PHY,"\n");
|
||||
|
||||
|
||||
|
||||
for (i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
close_component_filelog(i);
|
||||
for (i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
close_component_filelog(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef LOG_TEST
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
logInit();
|
||||
|
||||
|
||||
test_log();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int test_log(void)
|
||||
{
|
||||
int test_log(void) {
|
||||
LOG_ENTER(MAC); // because the default level is DEBUG
|
||||
LOG_I(EMU, "1 Starting OAI logs version %s Build date: %s on %s\n",
|
||||
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
|
||||
LOG_D(MAC, "1 debug MAC \n");
|
||||
LOG_W(MAC, "1 warning MAC \n");
|
||||
|
||||
set_log(EMU, OAILOG_INFO);
|
||||
set_log(MAC, OAILOG_WARNING);
|
||||
|
||||
LOG_I(EMU, "2 Starting OAI logs version %s Build date: %s on %s\n",
|
||||
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
|
||||
LOG_E(MAC, "2 error MAC\n");
|
||||
LOG_D(MAC, "2 debug MAC \n");
|
||||
LOG_W(MAC, "2 warning MAC \n");
|
||||
LOG_I(MAC, "2 info MAC \n");
|
||||
|
||||
|
||||
set_log(MAC, OAILOG_NOTICE);
|
||||
|
||||
LOG_ENTER(MAC);
|
||||
LOG_I(EMU, "3 Starting OAI logs version %s Build date: %s on %s\n",
|
||||
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
|
||||
LOG_D(MAC, "3 debug MAC \n");
|
||||
LOG_W(MAC, "3 warning MAC \n");
|
||||
LOG_I(MAC, "3 info MAC \n");
|
||||
|
||||
set_log(MAC, LOG_DEBUG);
|
||||
set_log(EMU, LOG_DEBUG);
|
||||
|
||||
LOG_ENTER(MAC);
|
||||
LOG_I(EMU, "4 Starting OAI logs version %s Build date: %s on %s\n",
|
||||
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
|
||||
LOG_D(MAC, "4 debug MAC \n");
|
||||
LOG_W(MAC, "4 warning MAC \n");
|
||||
LOG_I(MAC, "4 info MAC \n");
|
||||
|
||||
|
||||
set_log(MAC, LOG_DEBUG);
|
||||
set_log(EMU, LOG_DEBUG);
|
||||
|
||||
LOG_I(LOG, "5 Starting OAI logs version %s Build date: %s on %s\n",
|
||||
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
|
||||
LOG_D(MAC, "5 debug MAC \n");
|
||||
LOG_W(MAC, "5 warning MAC \n");
|
||||
LOG_I(MAC, "5 info MAC \n");
|
||||
|
||||
|
||||
set_log(MAC, LOG_TRACE);
|
||||
set_log(EMU, LOG_TRACE);
|
||||
|
||||
LOG_ENTER(MAC);
|
||||
LOG_I(LOG, "6 Starting OAI logs version %s Build date: %s on %s\n",
|
||||
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
|
||||
@@ -739,7 +690,6 @@ int test_log(void)
|
||||
LOG_W(MAC, "6 warning MAC \n");
|
||||
LOG_I(MAC, "6 info MAC \n");
|
||||
LOG_EXIT(MAC);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
#include <time.h>
|
||||
#include <stdint.h>
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
#include <inttypes.h>
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <pthread.h>
|
||||
#include "T.h"
|
||||
@@ -115,23 +115,22 @@ extern "C" {
|
||||
* @{*/
|
||||
|
||||
|
||||
#define FLAG_NOCOLOR 0x0001 /*!< \brief use colors in log messages, depending on level */
|
||||
#define FLAG_THREAD 0x0008 /*!< \brief display thread name in log messages */
|
||||
#define FLAG_LEVEL 0x0010 /*!< \brief display log level in log messages */
|
||||
#define FLAG_FUNCT 0x0020
|
||||
#define FLAG_FILE_LINE 0x0040
|
||||
#define FLAG_TIME 0x0100
|
||||
#define FLAG_NOCOLOR 0x0001 /*!< \brief use colors in log messages, depending on level */
|
||||
#define FLAG_THREAD 0x0008 /*!< \brief display thread name in log messages */
|
||||
#define FLAG_LEVEL 0x0010 /*!< \brief display log level in log messages */
|
||||
#define FLAG_TIME 0x0100
|
||||
#define FLAG_INITIALIZED 0x8000
|
||||
|
||||
#define SET_LOG_OPTION(O) g_log->flag = (g_log->flag | O)
|
||||
#define CLEAR_LOG_OPTION(O) g_log->flag = (g_log->flag & (~O))
|
||||
|
||||
/** @defgroup macros to identify a debug entity
|
||||
* @ingroup each macro is a bit mask where the unique bit set identifies an entity to be debugged
|
||||
* it allows to dynamically activate or not blocks of code. The LOG_MASKMAP_INIT macro
|
||||
* it allows to dynamically activate or not blocks of code. The LOG_MASKMAP_INIT macro
|
||||
* is used to map a character string name to each debug bit, it allows to set or clear
|
||||
* the corresponding bit via the defined name, from the configuration or from the telnet
|
||||
* server.
|
||||
* @brief
|
||||
* @brief
|
||||
* @{*/
|
||||
#define DEBUG_PRACH (1<<0)
|
||||
#define DEBUG_RU (1<<1)
|
||||
@@ -146,26 +145,28 @@ extern "C" {
|
||||
#define DEBUG_CTRLSOCKET (1<<10)
|
||||
#define DEBUG_SECURITY (1<<11)
|
||||
#define DEBUG_NAS (1<<12)
|
||||
#define DEBUG_RLC (1<<13)
|
||||
#define UE_TIMING (1<<20)
|
||||
|
||||
|
||||
#define LOG_MASKMAP_INIT {\
|
||||
{"PRACH", DEBUG_PRACH},\
|
||||
{"RU", DEBUG_RU},\
|
||||
{"UE_PHYPROC", DEBUG_UE_PHYPROC},\
|
||||
{"LTEESTIM", DEBUG_LTEESTIM},\
|
||||
{"DLCELLSPEC", DEBUG_DLCELLSPEC},\
|
||||
{"ULSCH", DEBUG_ULSCH},\
|
||||
{"RRC", DEBUG_RRC},\
|
||||
{"PDCP", DEBUG_PDCP},\
|
||||
{"DFT", DEBUG_DFT},\
|
||||
{"ASN1", DEBUG_ASN1},\
|
||||
{"CTRLSOCKET", DEBUG_CTRLSOCKET},\
|
||||
{"SECURITY", DEBUG_SECURITY},\
|
||||
{"NAS", DEBUG_NAS},\
|
||||
{"UE_TIMING", UE_TIMING},\
|
||||
{NULL,-1}\
|
||||
}
|
||||
{"PRACH", DEBUG_PRACH},\
|
||||
{"RU", DEBUG_RU},\
|
||||
{"UE_PHYPROC", DEBUG_UE_PHYPROC},\
|
||||
{"LTEESTIM", DEBUG_LTEESTIM},\
|
||||
{"DLCELLSPEC", DEBUG_DLCELLSPEC},\
|
||||
{"ULSCH", DEBUG_ULSCH},\
|
||||
{"RRC", DEBUG_RRC},\
|
||||
{"PDCP", DEBUG_PDCP},\
|
||||
{"DFT", DEBUG_DFT},\
|
||||
{"ASN1", DEBUG_ASN1},\
|
||||
{"CTRLSOCKET", DEBUG_CTRLSOCKET},\
|
||||
{"SECURITY", DEBUG_SECURITY},\
|
||||
{"NAS", DEBUG_NAS},\
|
||||
{"RLC", DEBUG_RLC},\
|
||||
{"UE_TIMING", UE_TIMING},\
|
||||
{NULL,-1}\
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -178,46 +179,46 @@ extern "C" {
|
||||
|
||||
|
||||
typedef enum {
|
||||
MIN_LOG_COMPONENTS = 0,
|
||||
PHY = MIN_LOG_COMPONENTS,
|
||||
MAC,
|
||||
SIM,
|
||||
OCG,
|
||||
OMG,
|
||||
OPT,
|
||||
OTG,
|
||||
OTG_LATENCY,
|
||||
OTG_LATENCY_BG,
|
||||
OTG_GP,
|
||||
OTG_GP_BG,
|
||||
OTG_JITTER,
|
||||
RLC,
|
||||
PDCP,
|
||||
RRC,
|
||||
NAS,
|
||||
PERF,
|
||||
OIP,
|
||||
CLI,
|
||||
MSC,
|
||||
OCM,
|
||||
UDP_,
|
||||
GTPU,
|
||||
SPGW,
|
||||
S1AP,
|
||||
SCTP,
|
||||
HW,
|
||||
OSA,
|
||||
RAL_ENB,
|
||||
RAL_UE,
|
||||
ENB_APP,
|
||||
FLEXRAN_AGENT,
|
||||
TMR,
|
||||
USIM,
|
||||
LOCALIZE,
|
||||
X2AP,
|
||||
LOADER,
|
||||
ASN,
|
||||
MAX_LOG_PREDEF_COMPONENTS,
|
||||
MIN_LOG_COMPONENTS = 0,
|
||||
PHY = MIN_LOG_COMPONENTS,
|
||||
MAC,
|
||||
SIM,
|
||||
OCG,
|
||||
OMG,
|
||||
OPT,
|
||||
OTG,
|
||||
OTG_LATENCY,
|
||||
OTG_LATENCY_BG,
|
||||
OTG_GP,
|
||||
OTG_GP_BG,
|
||||
OTG_JITTER,
|
||||
RLC,
|
||||
PDCP,
|
||||
RRC,
|
||||
NAS,
|
||||
PERF,
|
||||
OIP,
|
||||
CLI,
|
||||
MSC,
|
||||
OCM,
|
||||
UDP_,
|
||||
GTPU,
|
||||
SPGW,
|
||||
S1AP,
|
||||
SCTP,
|
||||
HW,
|
||||
OSA,
|
||||
RAL_ENB,
|
||||
RAL_UE,
|
||||
ENB_APP,
|
||||
FLEXRAN_AGENT,
|
||||
TMR,
|
||||
USIM,
|
||||
LOCALIZE,
|
||||
X2AP,
|
||||
LOADER,
|
||||
ASN,
|
||||
MAX_LOG_PREDEF_COMPONENTS,
|
||||
}
|
||||
comp_name_t;
|
||||
|
||||
@@ -226,42 +227,42 @@ comp_name_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *name; /*!< \brief string name of item */
|
||||
int value; /*!< \brief integer value of mapping */
|
||||
char *name; /*!< \brief string name of item */
|
||||
int value; /*!< \brief integer value of mapping */
|
||||
} mapping;
|
||||
|
||||
typedef int(*log_vprint_func_t)(FILE *stream, const char *format, va_list ap );
|
||||
typedef int(*log_print_func_t)(FILE *stream, const char *format, ... );
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int level;
|
||||
int savedlevel;
|
||||
int flag;
|
||||
int filelog;
|
||||
char *filelog_name;
|
||||
FILE *stream;
|
||||
log_vprint_func_t vprint;
|
||||
log_print_func_t print;
|
||||
/* SR: make the log buffer component relative */
|
||||
char log_buffer[MAX_LOG_TOTAL];
|
||||
const char *name;
|
||||
int level;
|
||||
int savedlevel;
|
||||
int flag;
|
||||
int filelog;
|
||||
char *filelog_name;
|
||||
FILE *stream;
|
||||
log_vprint_func_t vprint;
|
||||
log_print_func_t print;
|
||||
/* SR: make the log buffer component relative */
|
||||
char log_buffer[MAX_LOG_TOTAL];
|
||||
} log_component_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
log_component_t log_component[MAX_LOG_COMPONENTS];
|
||||
char level2string[NUM_LOG_LEVEL];
|
||||
int flag;
|
||||
char* filelog_name;
|
||||
uint64_t debug_mask;
|
||||
uint64_t dump_mask;
|
||||
log_component_t log_component[MAX_LOG_COMPONENTS];
|
||||
char level2string[NUM_LOG_LEVEL];
|
||||
int flag;
|
||||
char *filelog_name;
|
||||
uint64_t debug_mask;
|
||||
uint64_t dump_mask;
|
||||
} log_t;
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
typedef enum log_instance_type_e {
|
||||
LOG_INSTANCE_UNKNOWN,
|
||||
LOG_INSTANCE_ENB,
|
||||
LOG_INSTANCE_UE,
|
||||
LOG_INSTANCE_UNKNOWN,
|
||||
LOG_INSTANCE_ENB,
|
||||
LOG_INSTANCE_UE,
|
||||
} log_instance_type_t;
|
||||
|
||||
void log_set_instance_type (log_instance_type_t instance);
|
||||
@@ -272,9 +273,9 @@ void log_set_instance_type (log_instance_type_t instance);
|
||||
log_t *g_log;
|
||||
#else
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
extern log_t *g_log;
|
||||
extern log_t *g_log;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -283,8 +284,9 @@ extern log_t *g_log;
|
||||
# include "log_if.h"
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int logInit (void);
|
||||
int isLogInitDone (void);
|
||||
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
|
||||
void log_dump(int component, void *buffer, int buffsize,int datatype, const char* format, ... );
|
||||
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... );
|
||||
int set_log(int component, int level);
|
||||
void set_glog(int level);
|
||||
|
||||
@@ -327,24 +329,26 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
#define LOG_CONFIG_DUMP_FORMAT "%s_dump"
|
||||
|
||||
#define LOG_CONFIG_HELP_OPTIONS " list of comma separated options to enable log module behavior. Available options: \n"\
|
||||
" nocolor: disable color usage in log messages\n"\
|
||||
" level: add log level indication in log messages\n"\
|
||||
" thread: add threads names in log messages\n"
|
||||
|
||||
" nocolor: disable color usage in log messages\n"\
|
||||
" level: add log level indication in log messages\n"\
|
||||
" thread: add threads names in log messages\n"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* LOG globalconfiguration parameters */
|
||||
/* optname help paramflags XXXptr defXXXval type numelt */
|
||||
/* LOG globalconfiguration parameters */
|
||||
/* optname help paramflags XXXptr defXXXval type numelt */
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define LOG_GLOBALPARAMS_DESC { \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS, LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST,0} \
|
||||
}
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:(char **)&gloglevel, defstrval:log_level_names[2].name, TYPE_STRING, 0}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \
|
||||
{LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS, LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST,0} \
|
||||
}
|
||||
|
||||
#define LOG_OPTIONS_IDX 2
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
/** @defgroup _debugging debugging macros
|
||||
* @ingroup _macro
|
||||
@@ -354,23 +358,23 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
#define LOG_DUMP_DOUBLE 1
|
||||
// debugging macros
|
||||
#define LOG_F LOG_I /* because LOG_F was originaly to dump a message or buffer but is also used as a regular level...., to dump use LOG_DUMPMSG */
|
||||
# if T_TRACER
|
||||
/* per component, level dependant macros */
|
||||
# define LOG_E(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
|
||||
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
|
||||
# if T_TRACER
|
||||
/* per component, level dependant macros */
|
||||
# define LOG_E(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
|
||||
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
|
||||
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
|
||||
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
|
||||
# define nfapi_log(FILE, FNC, LN, COMP, LVL, F...) do { if (T_stdout) { logRecord_mt(__FILE__, __FUNCTION__, __LINE__,COMP, LVL, F) ;}} while (0) /* */
|
||||
/* bitmask dependant macros, to isolate debugging code */
|
||||
/* bitmask dependant macros, to isolate debugging code */
|
||||
# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
|
||||
|
||||
/* bitmask dependant macros, to generate debug file such as matlab file or message dump */
|
||||
/* bitmask dependant macros, to generate debug file such as matlab file or message dump */
|
||||
# define LOG_DUMPFLAG(D) (g_log->dump_mask & D)
|
||||
# define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0)/* */
|
||||
/* define variable only used in LOG macro's */
|
||||
/* define variable only used in LOG macro's */
|
||||
# define LOG_VAR(A,B) A B
|
||||
# else /* T_TRACER: remove all debugging and tracing messages, except errors */
|
||||
# define LOG_I(c, x...) /* */
|
||||
@@ -380,15 +384,15 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
|
||||
# define LOG_T(c, x...) /* */
|
||||
|
||||
# define LOG_DUMPMSG(c, b, s, x...) /* */
|
||||
# define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
|
||||
# define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
|
||||
# define LOG_DEBUGFLAG(D) ( 0 )
|
||||
# define LOG_DUMPFLAG(D) ( 0 )
|
||||
# define LOG_M(file, vector, data, len, dec, format)
|
||||
# define LOG_DUMPFLAG(D) ( 0 )
|
||||
# define LOG_M(file, vector, data, len, dec, format)
|
||||
# define LOG_VAR(A,B)
|
||||
# endif /* T_TRACER */
|
||||
/* avoid warnings for variables only used in LOG macro's but set outside debug section */
|
||||
#define GCC_NOTUSED __attribute__((unused))
|
||||
#define LOG_USEDINLOG_VAR(A,B) GCC_NOTUSED A B
|
||||
#define GCC_NOTUSED __attribute__((unused))
|
||||
#define LOG_USEDINLOG_VAR(A,B) GCC_NOTUSED A B
|
||||
|
||||
/* unfiltered macros, usefull for simulators or messages at init time, before log is configured */
|
||||
#define LOG_UM(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0)
|
||||
@@ -420,78 +424,82 @@ static __inline__ uint64_t rdtsc(void) {
|
||||
|
||||
extern double cpuf;
|
||||
|
||||
static inline uint64_t checkTCPU(int timeout, char * file, int line) {
|
||||
static uint64_t __thread lastCPUTime=0;
|
||||
static uint64_t __thread last=0;
|
||||
uint64_t cur=rdtsc();
|
||||
struct timespec CPUt;
|
||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &CPUt);
|
||||
uint64_t CPUTime=CPUt.tv_sec*1000*1000+CPUt.tv_nsec/1000;
|
||||
double microCycles=(double)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
if ( last!=0 && duration > timeout ) {
|
||||
//struct timespec ts;
|
||||
//clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
printf("%s:%d lte-ue delay %d (exceed %d), CPU for this period: %lld\n", file, line,
|
||||
duration, timeout, (long long)CPUTime-lastCPUTime );
|
||||
}
|
||||
last=cur;
|
||||
lastCPUTime=CPUTime;
|
||||
return cur;
|
||||
static inline uint64_t checkTCPU(int timeout, char *file, int line) {
|
||||
static uint64_t __thread lastCPUTime=0;
|
||||
static uint64_t __thread last=0;
|
||||
uint64_t cur=rdtsc();
|
||||
struct timespec CPUt;
|
||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &CPUt);
|
||||
uint64_t CPUTime=CPUt.tv_sec*1000*1000+CPUt.tv_nsec/1000;
|
||||
double microCycles=(double)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
|
||||
if ( last!=0 && duration > timeout ) {
|
||||
//struct timespec ts;
|
||||
//clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
printf("%s:%d lte-ue delay %d (exceed %d), CPU for this period: %lld\n", file, line,
|
||||
duration, timeout, (long long)CPUTime-lastCPUTime );
|
||||
}
|
||||
|
||||
last=cur;
|
||||
lastCPUTime=CPUTime;
|
||||
return cur;
|
||||
}
|
||||
|
||||
static inline unsigned long long checkT(int timeout, char * file, int line) {
|
||||
static unsigned long long __thread last=0;
|
||||
unsigned long long cur=rdtsc();
|
||||
int microCycles=(int)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
if ( last!=0 && duration > timeout )
|
||||
printf("%s:%d lte-ue delay %d (exceed %d)\n", file, line,
|
||||
duration, timeout);
|
||||
last=cur;
|
||||
return cur;
|
||||
static inline unsigned long long checkT(int timeout, char *file, int line) {
|
||||
static unsigned long long __thread last=0;
|
||||
unsigned long long cur=rdtsc();
|
||||
int microCycles=(int)(cpuf*1000);
|
||||
int duration=(int)((cur-last)/microCycles);
|
||||
|
||||
if ( last!=0 && duration > timeout )
|
||||
printf("%s:%d lte-ue delay %d (exceed %d)\n", file, line,
|
||||
duration, timeout);
|
||||
|
||||
last=cur;
|
||||
return cur;
|
||||
}
|
||||
|
||||
typedef struct m {
|
||||
uint64_t iterations;
|
||||
uint64_t sum;
|
||||
uint64_t maxArray[11];
|
||||
uint64_t iterations;
|
||||
uint64_t sum;
|
||||
uint64_t maxArray[11];
|
||||
} Meas;
|
||||
|
||||
static inline void printMeas(char * txt, Meas *M, int period) {
|
||||
if (M->iterations%period == 0 ) {
|
||||
char txt2[512];
|
||||
sprintf(txt2,"%s avg=%" PRIu64 " iterations=%" PRIu64 " max=%"
|
||||
PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 "\n",
|
||||
txt,
|
||||
M->sum/M->iterations,
|
||||
M->iterations,
|
||||
M->maxArray[1],M->maxArray[2], M->maxArray[3],M->maxArray[4], M->maxArray[5],
|
||||
M->maxArray[6],M->maxArray[7], M->maxArray[8],M->maxArray[9],M->maxArray[10]);
|
||||
static inline void printMeas(char *txt, Meas *M, int period) {
|
||||
if (M->iterations%period == 0 ) {
|
||||
char txt2[512];
|
||||
sprintf(txt2,"%s avg=%" PRIu64 " iterations=%" PRIu64 " max=%"
|
||||
PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 ":%" PRIu64 "\n",
|
||||
txt,
|
||||
M->sum/M->iterations,
|
||||
M->iterations,
|
||||
M->maxArray[1],M->maxArray[2], M->maxArray[3],M->maxArray[4], M->maxArray[5],
|
||||
M->maxArray[6],M->maxArray[7], M->maxArray[8],M->maxArray[9],M->maxArray[10]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("%s",txt2);
|
||||
printf("%s",txt2);
|
||||
#else
|
||||
LOG_W(PHY, "%s",txt2);
|
||||
LOG_W(PHY, "%s",txt2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline int cmpint(const void* a, const void* b) {
|
||||
uint64_t* aa=(uint64_t*)a;
|
||||
uint64_t* bb=(uint64_t*)b;
|
||||
return (int)(*aa-*bb);
|
||||
static inline int cmpint(const void *a, const void *b) {
|
||||
uint64_t *aa=(uint64_t *)a;
|
||||
uint64_t *bb=(uint64_t *)b;
|
||||
return (int)(*aa-*bb);
|
||||
}
|
||||
|
||||
static inline void updateTimes(uint64_t start, Meas *M, int period, char * txt) {
|
||||
if (start!=0) {
|
||||
uint64_t end=rdtsc();
|
||||
long long diff=(end-start)/(cpuf*1000);
|
||||
M->maxArray[0]=diff;
|
||||
M->sum+=diff;
|
||||
M->iterations++;
|
||||
qsort(M->maxArray, 11, sizeof(uint64_t), cmpint);
|
||||
printMeas(txt,M,period);
|
||||
}
|
||||
static inline void updateTimes(uint64_t start, Meas *M, int period, char *txt) {
|
||||
if (start!=0) {
|
||||
uint64_t end=rdtsc();
|
||||
long long diff=(end-start)/(cpuf*1000);
|
||||
M->maxArray[0]=diff;
|
||||
M->sum+=diff;
|
||||
M->iterations++;
|
||||
qsort(M->maxArray, 11, sizeof(uint64_t), cmpint);
|
||||
printMeas(txt,M,period);
|
||||
}
|
||||
}
|
||||
|
||||
#define check(a) do { checkT(a,__FILE__,__LINE__); } while (0)
|
||||
|
||||
@@ -19,7 +19,7 @@ T_IDs.h: $(GENIDS) T_messages.txt
|
||||
./$(GENIDS) T_messages.txt T_IDs.h
|
||||
|
||||
check_vcd:
|
||||
gcc -Wall -I. -I.. -I../itti -Itracer -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
|
||||
gcc -Wall -I. -I.. -I../itti -I../../../openair2/COMMON -Itracer -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
|
||||
./_check_vcd || (rm -f ./_check_vcd ./T_IDs.h ./T_messages.txt.h && false)
|
||||
rm -f ./_check_vcd
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user