Commit a4300281 authored by laurent's avatar laurent

Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into fs6

parents 6b662a3e 0de5ff48
...@@ -44,7 +44,7 @@ pipeline { ...@@ -44,7 +44,7 @@ pipeline {
disableConcurrentBuilds() disableConcurrentBuilds()
timestamps() timestamps()
gitLabConnection('OAI GitLab') gitLabConnection('OAI GitLab')
gitlabBuilds(builds: ["Build eNb-USRP", "Build basic-sim", "Build phy-sim", "Build eNb-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13"]) 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-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-IF4p5-TDD-Band38-Multi-RRU"])
ansiColor('xterm') ansiColor('xterm')
} }
...@@ -481,6 +481,25 @@ pipeline { ...@@ -481,6 +481,25 @@ pipeline {
} }
} }
} }
stage ("Test IF4p5 - TDD - Band 38 - B210 - MultiRRU") {
steps {
script {
triggerSlaveJob ('eNB-CI-IF4p5-TDD-Band38-MultiRRU-B210', 'Test-IF4p5-TDD-Band38-Multi-RRU')
}
}
post {
always {
script {
finalizeSlaveJob('eNB-CI-IF4p5-TDD-Band38-MultiRRU-B210')
}
}
failure {
script {
currentBuild.result = 'FAILURE'
}
}
}
}
stage ("Test IF4p5 - TDD - Band 40 - B210") { stage ("Test IF4p5 - TDD - Band 40 - B210") {
steps { steps {
script { script {
......
#!/bin/groovy
/*
* 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
*/
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
// Location of the python executor node shall be in the same subnet as the others servers
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
// Name of the phone resource
def ciSmartPhoneResource = params.smartphonesResource
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
pipeline {
agent {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock (ciSmartPhoneResource)
}
stages {
stage ("Verify Parameters") {
steps {
script {
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
def allParametersPresent = true
// It is already to late to check it
if (params.pythonExecutor != null) {
echo "eNB CI executor node : ${pythonExecutor}"
}
// If not present picking a default Stage Name
if (params.pipelineTestStageName == null) {
// picking default
testStageName = 'Template Test Stage'
}
if (params.smartphonesResource == null) {
allParametersPresent = false
}
// 1st eNB parameters
if (params.eNB_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB_Credentials == null) {
allParametersPresent = false
}
// 2nd eNB parameters
if (params.eNB1_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB1_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB1_Credentials == null) {
allParametersPresent = false
}
// 3rd eNB parameters
if (params.eNB2_IPAddress == null) {
allParametersPresent = false
}
if (params.eNB2_SourceCodePath == null) {
allParametersPresent = false
}
if (params.eNB2_Credentials == null) {
allParametersPresent = false
}
// the following 4 parameters should be pushed by the master trigger
// if not present, take the job GIT variables (used for developing)
if (params.eNB_Repository == null) {
eNB_Repository = env.GIT_URL
} else {
eNB_Repository = params.eNB_Repository
}
echo "eNB_Repository : ${eNB_Repository}"
if (params.eNB_Branch == null) {
eNB_Branch = env.GIT_BRANCH
} else {
eNB_Branch = params.eNB_Branch
}
echo "eNB_Branch : ${eNB_Branch}"
if (params.eNB_CommitID == null) {
eNB_CommitID = env.GIT_COMMIT
} else {
eNB_CommitID = params.eNB_CommitID
}
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) {
allParametersPresent = false
}
if (params.EPC_Type == null) {
allParametersPresent = false
}
if (params.EPC_SourceCodePath == null) {
allParametersPresent = false
}
if (params.EPC_Credentials == null) {
allParametersPresent = false
}
if (params.ADB_IPAddress == null) {
allParametersPresent = false
}
if (params.ADB_Credentials == null) {
allParametersPresent = false
}
if (allParametersPresent) {
echo "All parameters are present"
if (eNB_AllowMergeRequestProcess) {
sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else {
sh "git fetch"
sh "git checkout -f ${eNB_CommitID}"
}
} else {
echo "Some parameters are missing"
sh "./ci-scripts/fail.sh"
}
}
}
}
stage ("Build and Test") {
steps {
script {
dir ('ci-scripts') {
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
// If not present picking a default XML file
if (params.pythonTestXmlFile == null) {
// picking default
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
echo "Test XML file(default): ${testXMLFile}"
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
} else {
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
echo "Test XML file : ${xmlFile}"
}
}
}
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_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 --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_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
}
}
}
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
}
}
}
}
}
stage('Log Collection') {
parallel {
stage('Log Collection (eNB - Build)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
}
}
}
}
stage('Log Collection (eNB - Run)') {
steps {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
]) {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
}
script {
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
}
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>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
archiveArtifacts "test_results-${JOB_NAME}.html"
}
}
}
}
}
}
}
post {
always {
script {
if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) {
echo "Archiving Jenkins console log"
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
}
}
}
}
}
}
}
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
# real_time choice in {hard, rt-preempt, no}
real_time = "no";
////////// 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 = "NGFI_RCC_IF4p5";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "TDD";
tdd_config = 1;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 38;
downlink_frequency = 2580000000L;
uplink_frequency_offset = 0;
Nid_cell = 0;
N_RB_DL = 50; #25;
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 = 32;
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 = -104; #-96;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96; #-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;
}
);
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 = "enp129s0f0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
ENB_INTERFACE_NAME_FOR_S1U = "enp129s0f0";
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; #"127.0.0.4/24";
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";
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_if_name = "enp129s0f0";
local_address = "CI_ENB_IP_ADDR";
remote_address = "CI_RRU1_IP_ADDR";
local_portc = 50002;
remote_portc = 50002;
local_portd = 50003;
remote_portd = 50003;
local_rf = "no"
tr_preference = "udp_if4p5"
nb_tx = 1
nb_rx = 1
att_tx = 20
att_rx = 20;
eNB_instances = [0];
is_slave = "no";
},
{
local_if_name = "enp129s0f0";
local_address = "CI_ENB_IP_ADDR";
remote_address = "CI_RRU2_IP_ADDR";
local_portc = 50010;
remote_portc = 50010;
local_portd = 50011;
remote_portd = 50011;
local_rf = "no"
tr_preference = "udp_if4p5"
nb_tx = 1
nb_rx = 1
att_tx = 20
att_rx = 20;
eNB_instances = [0];
is_slave = "yes";
}
);
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";
};
RUs = (
{
local_if_name = "enp1s0";
remote_address = "CI_RCC_IP_ADDR";
local_address = "CI_ENB_IP_ADDR";
local_portc = 50002;
remote_portc = 50002;
local_portd = 50003;
remote_portd = 50003;
local_rf = "yes"
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
max_pdschReferenceSignalPower = -12;
max_rxgain = 100;
bands = [38];
is_slave = "no";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#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";
};
RUs = (
{
local_if_name = "enp1s0";
remote_address = "CI_RCC_IP_ADDR";
local_address = "CI_ENB_IP_ADDR";
local_portc = 50010;
remote_portc = 50010;
local_portd = 50011;
remote_portd = 50011;
local_rf = "yes"
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
max_pdschReferenceSignalPower = -12;
max_rxgain = 100;
bands = [38];
is_slave = "yes";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#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";
};
...@@ -125,7 +125,16 @@ fi ...@@ -125,7 +125,16 @@ fi
git config user.email "jenkins@openairinterface.org" git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins" git config user.name "OAI Jenkins"
git checkout -f $SOURCE_COMMIT_ID git checkout -f $SOURCE_COMMIT_ID > checkout.txt 2>&1
STATUS=`egrep -c "fatal: reference is not a tree" checkout.txt`
rm -f checkout.txt
if [ $STATUS -ne 0 ]
then
echo "fatal: reference is not a tree --> $SOURCE_COMMIT_ID"
STATUS=-1
exit $STATUS
fi
git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG git log -n1 --pretty=format:\"%s\" > .git/CI_COMMIT_MSG
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI" git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
......
...@@ -43,6 +43,7 @@ ENB_PROCESS_SEG_FAULT = -11 ...@@ -43,6 +43,7 @@ ENB_PROCESS_SEG_FAULT = -11
ENB_PROCESS_ASSERTION = -12 ENB_PROCESS_ASSERTION = -12
ENB_PROCESS_REALTIME_ISSUE = -13 ENB_PROCESS_REALTIME_ISSUE = -13
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14 ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = -15
HSS_PROCESS_FAILED = -2 HSS_PROCESS_FAILED = -2
HSS_PROCESS_OK = +2 HSS_PROCESS_OK = +2
MME_PROCESS_FAILED = -3 MME_PROCESS_FAILED = -3
...@@ -81,18 +82,26 @@ logging.basicConfig( ...@@ -81,18 +82,26 @@ logging.basicConfig(
#----------------------------------------------------------- #-----------------------------------------------------------
class SSHConnection(): class SSHConnection():
def __init__(self): def __init__(self):
self.ranRepository = ''
self.ranBranch = ''
self.ranAllowMerge = False
self.ranCommitID = ''
self.ranTargetBranch = ''
self.eNBIPAddress = '' self.eNBIPAddress = ''
self.eNBRepository = ''
self.eNBBranch = ''
self.eNB_AllowMerge = False
self.eNBCommitID = ''
self.eNBTargetBranch = ''
self.eNBUserName = '' self.eNBUserName = ''
self.eNBPassword = '' self.eNBPassword = ''
self.eNBSourceCodePath = '' self.eNBSourceCodePath = ''
self.EPCIPAddress = '' self.EPCIPAddress = ''
self.EPCUserName = '' self.EPCUserName = ''
self.EPCPassword = '' self.EPCPassword = ''
self.eNB1IPAddress = ''
self.eNB1UserName = ''
self.eNB1Password = ''
self.eNB1SourceCodePath = ''
self.eNB2IPAddress = ''
self.eNB2UserName = ''
self.eNB2Password = ''
self.eNB2SourceCodePath = ''
self.EPCSourceCodePath = '' self.EPCSourceCodePath = ''
self.EPCType = '' self.EPCType = ''
self.EPC_PcapFileName = '' self.EPC_PcapFileName = ''
...@@ -104,12 +113,13 @@ class SSHConnection(): ...@@ -104,12 +113,13 @@ class SSHConnection():
self.nbTestXMLfiles = 0 self.nbTestXMLfiles = 0
self.desc = '' self.desc = ''
self.Build_eNB_args = '' self.Build_eNB_args = ''
self.backgroundBuild = False
self.backgroundBuildTestId = ['', '', '']
self.Initialize_eNB_args = '' self.Initialize_eNB_args = ''
self.eNBLogFile = ''
self.eNB_instance = '' self.eNB_instance = ''
self.eNBOptions = '' self.eNB_serverId = ''
self.rruOptions = '' self.eNBLogFiles = ['', '', '']
self.rruLogFile = '' self.eNBOptions = ['', '', '']
self.ping_args = '' self.ping_args = ''
self.ping_packetloss_threshold = '' self.ping_packetloss_threshold = ''
self.iperf_args = '' self.iperf_args = ''
...@@ -312,45 +322,125 @@ class SSHConnection(): ...@@ -312,45 +322,125 @@ class SSHConnection():
sys.exit('SCP failed') sys.exit('SCP failed')
def BuildeNB(self): def BuildeNB(self):
if self.eNBIPAddress == '' or self.eNBRepository == '' or self.eNBBranch == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.eNBSourceCodePath == '': if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) if self.eNB_serverId == '0':
self.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5) lIpAddr = self.eNBIPAddress
self.command('cd ' + self.eNBSourceCodePath, '\$', 5) lUserName = self.eNBUserName
self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.eNBRepository + ' .; else stdbuf -o0 git fetch; fi', '\$', 600) lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
Usage()
sys.exit('Insufficient Parameter')
self.open(lIpAddr, lUserName, lPassWord)
self.command('mkdir -p ' + lSourcePath, '\$', 5)
self.command('cd ' + lSourcePath, '\$', 5)
self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch; fi', '\$', 600)
# Raphael: here add a check if git clone or git fetch went smoothly # Raphael: here add a check if git clone or git fetch went smoothly
self.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) self.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
self.command('git config user.name "OAI Jenkins"', '\$', 5) self.command('git config user.name "OAI Jenkins"', '\$', 5)
self.command('echo ' + self.eNBPassword + ' | sudo -S git clean -x -d -ff', '\$', 30) self.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.eNBCommitID != '': if self.ranCommitID != '':
self.command('git checkout -f ' + self.eNBCommitID, '\$', 5) self.command('git checkout -f ' + self.ranCommitID, '\$', 5)
# if the branch is not develop, then it is a merge request and we need to do # if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should already been checked earlier # the potential merge. Note that merge conflicts should already been checked earlier
if (self.eNB_AllowMerge): if (self.ranAllowMerge):
if self.eNBTargetBranch == '': if self.ranTargetBranch == '':
if (self.eNBBranch != 'develop') and (self.eNBBranch != 'origin/develop'): if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5) self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
else: else:
logging.debug('Merging with the target branch: ' + self.eNBTargetBranch) logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
self.command('git merge --ff origin/' + self.eNBTargetBranch + ' -m "Temporary merge for CI"', '\$', 5) self.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
self.command('source oaienv', '\$', 5) self.command('source oaienv', '\$', 5)
self.command('cd cmake_targets', '\$', 5) self.command('cd cmake_targets', '\$', 5)
self.command('mkdir -p log', '\$', 5) self.command('mkdir -p log', '\$', 5)
self.command('chmod 777 log', '\$', 5) self.command('chmod 777 log', '\$', 5)
# no need to remove in log (git clean did the trick) # no need to remove in log (git clean did the trick)
self.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'Bypassing the Tests|build have failed', 600) if self.backgroundBuild:
self.command('echo "./build_oai ' + self.Build_eNB_args + '" > ./my-lte-softmodem-build.sh', '\$', 5)
self.command('chmod 775 ./my-lte-softmodem-build.sh', '\$', 5)
self.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=build_enb_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/compile_oai_enb.log ./my-lte-softmodem-build.sh', '\$', 5)
self.close()
self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
self.backgroundBuildTestId[int(self.eNB_instance)] = self.testCase_id
return
self.command('stdbuf -o0 ./build_oai ' + self.Build_eNB_args + ' 2>&1 | stdbuf -o0 tee compile_oai_enb.log', 'Bypassing the Tests|build have failed', 1500)
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.testCase_id)
def WaitBuildeNBisFinished(self):
if self.eNB_serverId == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
Usage()
sys.exit('Insufficient Parameter')
self.open(lIpAddr, lUserName, lPassWord)
count = 40
buildOAIprocess = True
while (count > 0) and buildOAIprocess:
self.command('ps aux | grep --color=never build_ | grep -v grep', '\$', 3)
result = re.search('build_oai', str(self.ssh.before))
if result is None:
buildOAIprocess = False
else:
count -= 1
time.sleep(30)
self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.backgroundBuildTestId[int(self.eNB_instance)])
def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId):
self.command('cd ' + lSourcePath + '/cmake_targets', '\$', 3)
self.command('ls lte_build_oai/build', '\$', 3) self.command('ls lte_build_oai/build', '\$', 3)
self.command('ls lte_build_oai/build', '\$', 3) self.command('ls lte_build_oai/build', '\$', 3)
buildStatus = True buildStatus = True
result = re.search('lte-softmodem', str(self.ssh.before)) result = re.search('lte-softmodem', str(self.ssh.before))
if result is None: if result is None:
buildStatus = False buildStatus = False
self.command('mkdir -p build_log_' + self.testCase_id, '\$', 5) self.command('mkdir -p build_log_' + testcaseId, '\$', 5)
self.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5) self.command('mv log/* ' + 'build_log_' + testcaseId, '\$', 5)
self.command('mv compile_oai_enb.log ' + 'build_log_' + self.testCase_id, '\$', 5) self.command('mv compile_oai_enb.log ' + 'build_log_' + testcaseId, '\$', 5)
self.close() if self.eNB_serverId != '0':
self.command('cd cmake_targets', '\$', 5)
self.command('if [ -e tmp_build' + testcaseId + '.zip ]; then rm -f tmp_build' + testcaseId + '.zip; fi', '\$', 5)
self.command('zip -r -qq tmp_build' + testcaseId + '.zip build_log_' + testcaseId, '\$', 5)
self.close()
if (os.path.isfile('./tmp_build' + testcaseId + '.zip')):
os.remove('./tmp_build' + testcaseId + '.zip')
self.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/tmp_build' + testcaseId + '.zip', '.')
if (os.path.isfile('./tmp_build' + testcaseId + '.zip')):
self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './tmp_build' + testcaseId + '.zip', self.eNBSourceCodePath + '/cmake_targets/.')
os.remove('./tmp_build' + testcaseId + '.zip')
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5)
self.command('unzip -qq -DD tmp_build' + testcaseId + '.zip', '\$', 5)
self.command('rm -f tmp_build' + testcaseId + '.zip', '\$', 5)
self.close()
else:
self.close()
if buildStatus: if buildStatus:
self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK) self.CreateHtmlTestRow(self.Build_eNB_args, 'OK', ALL_PROCESSES_OK)
else: else:
...@@ -360,29 +450,29 @@ class SSHConnection(): ...@@ -360,29 +450,29 @@ class SSHConnection():
sys.exit(1) sys.exit(1)
def BuildOAIUE(self): def BuildOAIUE(self):
if self.UEIPAddress == '' or self.eNBRepository == '' or self.eNBBranch == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '': if self.UEIPAddress == '' or self.ranRepository == '' or self.ranBranch == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword) self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
self.command('mkdir -p ' + self.UESourceCodePath, '\$', 5) self.command('mkdir -p ' + self.UESourceCodePath, '\$', 5)
self.command('cd ' + self.UESourceCodePath, '\$', 5) self.command('cd ' + self.UESourceCodePath, '\$', 5)
self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.eNBRepository + ' .; else stdbuf -o0 git fetch; fi', '\$', 600) self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch; fi', '\$', 600)
# here add a check if git clone or git fetch went smoothly # here add a check if git clone or git fetch went smoothly
self.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) self.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
self.command('git config user.name "OAI Jenkins"', '\$', 5) self.command('git config user.name "OAI Jenkins"', '\$', 5)
self.command('echo ' + self.UEPassword + ' | sudo -S git clean -x -d -ff', '\$', 30) self.command('echo ' + self.UEPassword + ' | sudo -S git clean -x -d -ff', '\$', 30)
# if the commit ID is provided use it to point to it # if the commit ID is provided use it to point to it
if self.eNBCommitID != '': if self.ranCommitID != '':
self.command('git checkout -f ' + self.eNBCommitID, '\$', 5) self.command('git checkout -f ' + self.ranCommitID, '\$', 5)
# if the branch is not develop, then it is a merge request and we need to do # if the branch is not develop, then it is a merge request and we need to do
# the potential merge. Note that merge conflicts should already been checked earlier # the potential merge. Note that merge conflicts should already been checked earlier
if (self.eNB_AllowMerge): if (self.ranAllowMerge):
if self.eNBTargetBranch == '': if self.ranTargetBranch == '':
if (self.eNBBranch != 'develop') and (self.eNBBranch != 'origin/develop'): if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5) self.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
else: else:
logging.debug('Merging with the target branch: ' + self.eNBTargetBranch) logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
self.command('git merge --ff origin/' + self.eNBTargetBranch + ' -m "Temporary merge for CI"', '\$', 5) self.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
self.command('source oaienv', '\$', 5) self.command('source oaienv', '\$', 5)
self.command('cd cmake_targets', '\$', 5) self.command('cd cmake_targets', '\$', 5)
self.command('mkdir -p log', '\$', 5) self.command('mkdir -p log', '\$', 5)
...@@ -498,7 +588,22 @@ class SSHConnection(): ...@@ -498,7 +588,22 @@ class SSHConnection():
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
def InitializeeNB(self): def InitializeeNB(self):
if self.eNBIPAddress == '' or self.eNBUserName == '' or self.eNBPassword == '' or self.eNBSourceCodePath == '': if self.eNB_serverId == '0':
lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
check_eNB = False check_eNB = False
...@@ -519,10 +624,10 @@ class SSHConnection(): ...@@ -519,10 +624,10 @@ class SSHConnection():
logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + '\u001B[0m') logging.debug('\u001B[1m Launching tshark on interface ' + eth_interface + '\u001B[0m')
self.EPC_PcapFileName = 'enb_' + self.testCase_id + '_s1log.pcap' self.EPC_PcapFileName = 'enb_' + self.testCase_id + '_s1log.pcap'
self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f /tmp/' + self.EPC_PcapFileName, '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f /tmp/' + self.EPC_PcapFileName, '\$', 5)
self.command('echo $USER; nohup sudo tshark -f "host ' + self.eNBIPAddress +'" -i ' + eth_interface + ' -w /tmp/' + self.EPC_PcapFileName + ' > /tmp/tshark.log 2>&1 &', self.EPCUserName, 5) self.command('echo $USER; nohup sudo tshark -f "host ' + lIpAddr +'" -i ' + eth_interface + ' -w /tmp/' + self.EPC_PcapFileName + ' > /tmp/tshark.log 2>&1 &', self.EPCUserName, 5)
self.close() self.close()
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.open(lIpAddr, lUserName, lPassWord)
self.command('cd ' + self.eNBSourceCodePath, '\$', 5) self.command('cd ' + lSourcePath, '\$', 5)
# Initialize_eNB_args usually start with -O and followed by the location in repository # Initialize_eNB_args usually start with -O and followed by the location in repository
full_config_file = self.Initialize_eNB_args.replace('-O ','') full_config_file = self.Initialize_eNB_args.replace('-O ','')
extra_options = '' extra_options = ''
...@@ -535,31 +640,34 @@ class SSHConnection(): ...@@ -535,31 +640,34 @@ class SSHConnection():
logging.debug('\u001B[1m Compiling and launching T Tracer\u001B[0m') logging.debug('\u001B[1m Compiling and launching T Tracer\u001B[0m')
self.command('cd common/utils/T/tracer', '\$', 5) self.command('cd common/utils/T/tracer', '\$', 5)
self.command('make', '\$', 10) self.command('make', '\$', 10)
self.command('echo $USER; nohup ./record -d ../T_messages.txt -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '_record.raw -ON -off VCD -off HEAVY -off LEGACY_GROUP_TRACE -off LEGACY_GROUP_DEBUG > ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '_record.log 2>&1 &', self.eNBUserName, 5) self.command('echo $USER; nohup ./record -d ../T_messages.txt -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '_record.raw -ON -off VCD -off HEAVY -off LEGACY_GROUP_TRACE -off LEGACY_GROUP_DEBUG > ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '_record.log 2>&1 &', lUserName, 5)
self.command('cd ' + self.eNBSourceCodePath, '\$', 5) self.command('cd ' + lSourcePath, '\$', 5)
full_config_file = full_config_file[:extIdx + 5] full_config_file = full_config_file[:extIdx + 5]
config_path, config_file = os.path.split(full_config_file) config_path, config_file = os.path.split(full_config_file)
else: else:
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
ci_full_config_file = config_path + '/ci-' + config_file ci_full_config_file = config_path + '/ci-' + config_file
rruCheck = False rruCheck = False
result = re.search('rru|du.band', str(config_file)) result = re.search('^rru|^rcc|^du.band', str(config_file))
if result is not None: if result is not None:
rruCheck = True rruCheck = True
# do not reset board twice in IF4.5 case # do not reset board twice in IF4.5 case
result = re.search('rru|enb|du.band', str(config_file)) result = re.search('^rru|^enb|^du.band', str(config_file))
if result is not None: if result is not None:
self.command('echo ' + self.eNBPassword + ' | sudo -S uhd_find_devices', '\$', 10) self.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 10)
result = re.search('type: b200', str(self.ssh.before)) result = re.search('type: b200', str(self.ssh.before))
if result is not None: if result is not None:
logging.debug('Found a B2xx device --> resetting it') logging.debug('Found a B2xx device --> resetting it')
self.command('echo ' + self.eNBPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10) self.command('echo ' + lPassWord + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
# Reloading FGPA bin firmware # Reloading FGPA bin firmware
self.command('echo ' + self.eNBPassword + ' | sudo -S uhd_find_devices', '\$', 15) self.command('echo ' + lPassWord + ' | sudo -S uhd_find_devices', '\$', 15)
# Make a copy and adapt to EPC / eNB IP addresses # Make a copy and adapt to EPC / eNB IP addresses
self.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5) self.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
self.command('sed -i -e \'s/CI_MME_IP_ADDR/' + self.EPCIPAddress + '/\' ' + ci_full_config_file, '\$', 2); self.command('sed -i -e \'s/CI_MME_IP_ADDR/' + self.EPCIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
self.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2); self.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
self.command('sed -i -e \'s/CI_RCC_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
self.command('sed -i -e \'s/CI_RRU1_IP_ADDR/' + self.eNB1IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
self.command('sed -i -e \'s/CI_RRU2_IP_ADDR/' + self.eNB2IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
if self.flexranCtrlInstalled and self.flexranCtrlStarted: if self.flexranCtrlInstalled and self.flexranCtrlStarted:
self.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "yes";/\' ' + ci_full_config_file, '\$', 2); self.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "yes";/\' ' + ci_full_config_file, '\$', 2);
else: else:
...@@ -567,18 +675,13 @@ class SSHConnection(): ...@@ -567,18 +675,13 @@ class SSHConnection():
# Launch eNB with the modified config file # Launch eNB with the modified config file
self.command('source oaienv', '\$', 5) self.command('source oaienv', '\$', 5)
self.command('cd cmake_targets', '\$', 5) self.command('cd cmake_targets', '\$', 5)
self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('echo "ulimit -c unlimited && ./lte_build_oai/build/lte-softmodem -O ' + lSourcePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.command('echo ' + self.eNBPassword + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5) self.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
result = re.search('rcc|enb|cu.band', str(config_file)) self.eNBLogFiles[int(self.eNB_instance)] = 'enb_' + self.testCase_id + '.log'
if result is not None: if extra_options != '':
self.eNBLogFile = 'enb_' + self.testCase_id + '.log' self.eNBOptions[int(self.eNB_instance)] = extra_options
if extra_options != '':
self.eNBOptions = extra_options
result = re.search('rru|du.band', str(config_file))
if result is not None:
self.rruLogFile = 'enb_' + self.testCase_id + '.log'
time.sleep(6) time.sleep(6)
doLoop = True doLoop = True
loopCounter = 10 loopCounter = 10
...@@ -608,7 +711,7 @@ class SSHConnection(): ...@@ -608,7 +711,7 @@ class SSHConnection():
if self.EPC_PcapFileName != '': if self.EPC_PcapFileName != '':
copyin_res = self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.') copyin_res = self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.')
if (copyin_res == 0): if (copyin_res == 0):
self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.EPC_PcapFileName, self.eNBSourceCodePath + '/cmake_targets/.') self.copyout(lIpAddr, lUserName, lPassWord, self.EPC_PcapFileName, lSourcePath + '/cmake_targets/.')
sys.exit(1) sys.exit(1)
else: else:
self.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Starting"', '\$', 4) self.command('stdbuf -o0 cat enb_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Starting"', '\$', 4)
...@@ -620,8 +723,6 @@ class SSHConnection(): ...@@ -620,8 +723,6 @@ class SSHConnection():
time.sleep(6) time.sleep(6)
else: else:
doLoop = False doLoop = False
if rruCheck and extra_options != '':
self.rruOptions = extra_options
self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', ALL_PROCESSES_OK) self.CreateHtmlTestRow('-O ' + config_file + extra_options, 'OK', ALL_PROCESSES_OK)
logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m') logging.debug('\u001B[1m Initialize eNB Completed\u001B[0m')
time.sleep(10) time.sleep(10)
...@@ -2386,13 +2487,13 @@ class SSHConnection(): ...@@ -2386,13 +2487,13 @@ class SSHConnection():
if (status < 0): if (status < 0):
result = status result = status
if result == ENB_PROCESS_FAILED: if result == ENB_PROCESS_FAILED:
fileCheck = re.search('enb_', str(self.eNBLogFile)) fileCheck = re.search('enb_', str(self.eNBLogFiles[0]))
if fileCheck is not None: if fileCheck is not None:
self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + self.eNBLogFile, '.') self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + self.eNBLogFiles[0], '.')
logStatus = self.AnalyzeLogFile_eNB(self.eNBLogFile) logStatus = self.AnalyzeLogFile_eNB(self.eNBLogFiles[0])
if logStatus < 0: if logStatus < 0:
result = logStatus result = logStatus
self.eNBLogFile = '' self.eNBLogFiles[0] = ''
if self.flexranCtrlInstalled and self.flexranCtrlStarted: if self.flexranCtrlInstalled and self.flexranCtrlStarted:
self.TerminateFlexranCtrl() self.TerminateFlexranCtrl()
return result return result
...@@ -2530,17 +2631,20 @@ class SSHConnection(): ...@@ -2530,17 +2631,20 @@ class SSHConnection():
cdrxActivationMessageCount = 0 cdrxActivationMessageCount = 0
dropNotEnoughRBs = 0 dropNotEnoughRBs = 0
self.htmleNBFailureMsg = '' self.htmleNBFailureMsg = ''
isRRU = False
isSlave = False
slaveReceivesFrameResyncCmd = False
for line in enb_log_file.readlines(): for line in enb_log_file.readlines():
if self.rruOptions != '': if self.eNBOptions[int(self.eNB_instance)] != '':
res1 = re.search('max_rxgain (?P<requested_option>[0-9]+)', self.rruOptions) res1 = re.search('max_rxgain (?P<requested_option>[0-9]+)', self.eNBOptions[int(self.eNB_instance)])
res2 = re.search('max_rxgain (?P<applied_option>[0-9]+)', str(line)) res2 = re.search('max_rxgain (?P<applied_option>[0-9]+)', str(line))
if res1 is not None and res2 is not None: if res1 is not None and res2 is not None:
requested_option = int(res1.group('requested_option')) requested_option = int(res1.group('requested_option'))
applied_option = int(res2.group('applied_option')) applied_option = int(res2.group('applied_option'))
if requested_option == applied_option: if requested_option == applied_option:
self.htmleNBFailureMsg += '<span class="glyphicon glyphicon-ok-circle"></span> Command line option(s) correctly applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.rruOptions + '\n\n' self.htmleNBFailureMsg += '<span class="glyphicon glyphicon-ok-circle"></span> Command line option(s) correctly applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n'
else: else:
self.htmleNBFailureMsg += '<span class="glyphicon glyphicon-ban-circle"></span> Command line option(s) NOT applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.rruOptions + '\n\n' self.htmleNBFailureMsg += '<span class="glyphicon glyphicon-ban-circle"></span> Command line option(s) NOT applied <span class="glyphicon glyphicon-arrow-right"></span> ' + self.eNBOptions[int(self.eNB_instance)] + '\n\n'
result = re.search('Exiting OAI softmodem', str(line)) result = re.search('Exiting OAI softmodem', str(line))
if result is not None: if result is not None:
exitSignalReceived = True exitSignalReceived = True
...@@ -2562,6 +2666,17 @@ class SSHConnection(): ...@@ -2562,6 +2666,17 @@ class SSHConnection():
if foundAssertion and (msgLine < 3): if foundAssertion and (msgLine < 3):
msgLine += 1 msgLine += 1
msgAssertion += str(line) msgAssertion += str(line)
result = re.search('Setting function for RU', str(line))
if result is not None:
isRRU = True
if isRRU:
result = re.search('RU 0 is_slave=yes', str(line))
if result is not None:
isSlave = True
if isSlave:
result = re.search('Received RRU_frame_resynch command', str(line))
if result is not None:
slaveReceivesFrameResyncCmd = True
result = re.search('LTE_RRCConnectionSetupComplete from UE', str(line)) result = re.search('LTE_RRCConnectionSetupComplete from UE', str(line))
if result is not None: if result is not None:
rrcSetupComplete += 1 rrcSetupComplete += 1
...@@ -2655,6 +2770,17 @@ class SSHConnection(): ...@@ -2655,6 +2770,17 @@ class SSHConnection():
rachMsg = 'eNB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)' rachMsg = 'eNB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)'
logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rachMsg + '\n' self.htmleNBFailureMsg += rachMsg + '\n'
if isRRU:
if isSlave:
if slaveReceivesFrameResyncCmd:
rruMsg = 'Slave RRU received the RRU_frame_resynch command from RAU'
logging.debug('\u001B[1;30;43m ' + rruMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rruMsg + '\n'
else:
rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU'
logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rruMsg + '\n'
return ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
if foundSegFault: if foundSegFault:
logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m') logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m')
return ENB_PROCESS_SEG_FAULT return ENB_PROCESS_SEG_FAULT
...@@ -2842,18 +2968,36 @@ class SSHConnection(): ...@@ -2842,18 +2968,36 @@ class SSHConnection():
return 0 return 0
def TerminateeNB(self): def TerminateeNB(self):
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) if self.eNB_serverId == '0':
self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5) lIpAddr = self.eNBIPAddress
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
elif self.eNB_serverId == '1':
lIpAddr = self.eNB1IPAddress
lUserName = self.eNB1UserName
lPassWord = self.eNB1Password
lSourcePath = self.eNB1SourceCodePath
elif self.eNB_serverId == '2':
lIpAddr = self.eNB2IPAddress
lUserName = self.eNB2UserName
lPassWord = self.eNB2Password
lSourcePath = self.eNB2SourceCodePath
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
Usage()
sys.exit('Insufficient Parameter')
self.open(lIpAddr, lUserName, lPassWord)
self.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
self.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5) self.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5)
result = re.search('lte-softmodem', str(self.ssh.before)) result = re.search('lte-softmodem', str(self.ssh.before))
if result is not None: if result is not None:
self.command('echo ' + self.eNBPassword + ' | sudo -S daemon --name=enb' + str(self.eNB_instance) + '_daemon --stop', '\$', 5) self.command('echo ' + lPassWord + ' | sudo -S daemon --name=enb' + str(self.eNB_instance) + '_daemon --stop', '\$', 5)
self.command('echo ' + self.eNBPassword + ' | sudo -S killall --signal SIGINT lte-softmodem || true', '\$', 5) self.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGINT lte-softmodem || true', '\$', 5)
time.sleep(5) time.sleep(5)
self.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5) self.command('stdbuf -o0 ps -aux | grep --color=never softmodem | grep -v grep', '\$', 5)
result = re.search('lte-softmodem', str(self.ssh.before)) result = re.search('lte-softmodem', str(self.ssh.before))
if result is not None: if result is not None:
self.command('echo ' + self.eNBPassword + ' | sudo -S killall --signal SIGKILL lte-softmodem || true', '\$', 5) self.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL lte-softmodem || true', '\$', 5)
time.sleep(2) time.sleep(2)
self.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.close() self.close()
...@@ -2867,44 +3011,40 @@ class SSHConnection(): ...@@ -2867,44 +3011,40 @@ class SSHConnection():
if self.EPC_PcapFileName != '': if self.EPC_PcapFileName != '':
self.command('echo ' + self.EPCPassword + ' | sudo -S chmod 666 /tmp/' + self.EPC_PcapFileName, '\$', 5) self.command('echo ' + self.EPCPassword + ' | sudo -S chmod 666 /tmp/' + self.EPC_PcapFileName, '\$', 5)
self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.') self.copyin(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, '/tmp/' + self.EPC_PcapFileName, '.')
self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.EPC_PcapFileName, self.eNBSourceCodePath + '/cmake_targets/.') self.copyout(lIpAddr, lUserName, lPassWord, self.EPC_PcapFileName, lSourcePath + '/cmake_targets/.')
self.close() self.close()
logging.debug('\u001B[1m Replaying RAW record file\u001B[0m') logging.debug('\u001B[1m Replaying RAW record file\u001B[0m')
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword) self.open(lIpAddr, lUserName, lPassWord)
self.command('cd ' + self.eNBSourceCodePath + '/common/utils/T/tracer/', '\$', 5) self.command('cd ' + lSourcePath + '/common/utils/T/tracer/', '\$', 5)
raw_record_file = self.eNBLogFile.replace('.log', '_record.raw') enbLogFile = self.eNBLogFiles[int(self.eNB_instance)]
replay_log_file = self.eNBLogFile.replace('.log', '_replay.log') raw_record_file = enbLogFile.replace('.log', '_record.raw')
extracted_txt_file = self.eNBLogFile.replace('.log', '_extracted_messages.txt') replay_log_file = enbLogFile.replace('.log', '_replay.log')
extracted_log_file = self.eNBLogFile.replace('.log', '_extracted_messages.log') extracted_txt_file = enbLogFile.replace('.log', '_extracted_messages.txt')
self.command('./extract_config -i ' + self.eNBSourceCodePath + '/cmake_targets/' + raw_record_file + ' > ' + self.eNBSourceCodePath + '/cmake_targets/' + extracted_txt_file, '\$', 5) extracted_log_file = enbLogFile.replace('.log', '_extracted_messages.log')
self.command('echo $USER; nohup ./replay -i ' + self.eNBSourceCodePath + '/cmake_targets/' + raw_record_file + ' > ' + self.eNBSourceCodePath + '/cmake_targets/' + replay_log_file + ' 2>&1 &', self.eNBUserName, 5) self.command('./extract_config -i ' + lSourcePath + '/cmake_targets/' + raw_record_file + ' > ' + lSourcePath + '/cmake_targets/' + extracted_txt_file, '\$', 5)
self.command('./textlog -d ' + self.eNBSourceCodePath + '/cmake_targets/' + extracted_txt_file + ' -no-gui -ON -full > ' + self.eNBSourceCodePath + '/cmake_targets/' + extracted_log_file, '\$', 5) self.command('echo $USER; nohup ./replay -i ' + lSourcePath + '/cmake_targets/' + raw_record_file + ' > ' + lSourcePath + '/cmake_targets/' + replay_log_file + ' 2>&1 &', lUserName, 5)
self.command('./textlog -d ' + lSourcePath + '/cmake_targets/' + extracted_txt_file + ' -no-gui -ON -full > ' + lSourcePath + '/cmake_targets/' + extracted_log_file, '\$', 5)
self.close() self.close()
self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + extracted_log_file, '.') self.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + extracted_log_file, '.')
logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m') logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m')
logStatus = self.AnalyzeLogFile_eNB(extracted_log_file) logStatus = self.AnalyzeLogFile_eNB(extracted_log_file)
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK) self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
self.eNBLogFile = '' self.eNBLogFiles[int(self.eNB_instance)] = ''
else: else:
result = re.search('enb_', str(self.eNBLogFile))
analyzeFile = False analyzeFile = False
if result is not None: if self.eNBLogFiles[int(self.eNB_instance)] != '':
analyzeFile = True analyzeFile = True
fileToAnalyze = str(self.eNBLogFile) fileToAnalyze = self.eNBLogFiles[int(self.eNB_instance)]
self.eNBLogFile = '' self.eNBLogFiles[int(self.eNB_instance)] = ''
else:
result = re.search('enb_', str(self.rruLogFile))
if result is not None:
analyzeFile = True
fileToAnalyze = str(self.rruLogFile)
self.rruLogFile = ''
if analyzeFile: if analyzeFile:
copyin_res = self.copyin(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, self.eNBSourceCodePath + '/cmake_targets/' + fileToAnalyze, '.') copyin_res = self.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/' + fileToAnalyze, '.')
if (copyin_res == -1): if (copyin_res == -1):
logging.debug('\u001B[1;37;41m Could not copy eNB logfile to analyze it! \u001B[0m') logging.debug('\u001B[1;37;41m Could not copy eNB logfile to analyze it! \u001B[0m')
self.htmleNBFailureMsg = 'Could not copy eNB logfile to analyze it!' self.htmleNBFailureMsg = 'Could not copy eNB logfile to analyze it!'
self.CreateHtmlTestRow('N/A', 'KO', ENB_PROCESS_NOLOGFILE_TO_ANALYZE) self.CreateHtmlTestRow('N/A', 'KO', ENB_PROCESS_NOLOGFILE_TO_ANALYZE)
return return
if self.eNB_serverId != '0':
self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './' + fileToAnalyze, self.eNBSourceCodePath + '/cmake_targets/')
logging.debug('\u001B[1m Analyzing eNB logfile \u001B[0m ' + fileToAnalyze) logging.debug('\u001B[1m Analyzing eNB logfile \u001B[0m ' + fileToAnalyze)
logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze) logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze)
if (logStatus < 0): if (logStatus < 0):
...@@ -3276,46 +3416,46 @@ class SSHConnection(): ...@@ -3276,46 +3416,46 @@ class SSHConnection():
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-cloud-upload"></span> GIT Repository </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-cloud-upload"></span> GIT Repository </td>\n')
self.htmlFile.write(' <td><a href="' + self.eNBRepository + '">' + self.eNBRepository + '</a></td>\n') self.htmlFile.write(' <td><a href="' + self.ranRepository + '">' + self.ranRepository + '</a></td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-wrench"></span> Job Trigger </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-wrench"></span> Job Trigger </td>\n')
if (self.eNB_AllowMerge): if (self.ranAllowMerge):
self.htmlFile.write(' <td>Merge-Request</td>\n') self.htmlFile.write(' <td>Merge-Request</td>\n')
else: else:
self.htmlFile.write(' <td>Push to Branch</td>\n') self.htmlFile.write(' <td>Push to Branch</td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
if (self.eNB_AllowMerge): if (self.ranAllowMerge):
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch </td>\n')
else: else:
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tree-deciduous"></span> Branch</td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tree-deciduous"></span> Branch</td>\n')
self.htmlFile.write(' <td>' + self.eNBBranch + '</td>\n') self.htmlFile.write(' <td>' + self.ranBranch + '</td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
if (self.eNB_AllowMerge): if (self.ranAllowMerge):
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Source Commit ID </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Source Commit ID </td>\n')
else: else:
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
self.htmlFile.write(' <td>' + self.eNBCommitID + '</td>\n') self.htmlFile.write(' <td>' + self.ranCommitID + '</td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
if self.eNB_AllowMerge != '': if self.ranAllowMerge != '':
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.eNBCommitID, shell=True, universal_newlines=True) commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
commit_message = commit_message.strip() commit_message = commit_message.strip()
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
if (self.eNB_AllowMerge): if (self.ranAllowMerge):
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Source Commit Message </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Source Commit Message </td>\n')
else: else:
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Commit Message </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Commit Message </td>\n')
self.htmlFile.write(' <td>' + commit_message + '</td>\n') self.htmlFile.write(' <td>' + commit_message + '</td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
if (self.eNB_AllowMerge): if (self.ranAllowMerge):
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-in"></span> Target Branch </td>\n') self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-in"></span> Target Branch </td>\n')
if (self.eNBTargetBranch == ''): if (self.ranTargetBranch == ''):
self.htmlFile.write(' <td>develop</td>\n') self.htmlFile.write(' <td>develop</td>\n')
else: else:
self.htmlFile.write(' <td>' + self.eNBTargetBranch + '</td>\n') self.htmlFile.write(' <td>' + self.ranTargetBranch + '</td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n') self.htmlFile.write(' </table>\n')
...@@ -3468,6 +3608,8 @@ class SSHConnection(): ...@@ -3468,6 +3608,8 @@ class SSHConnection():
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process faced Real Time issue(s)</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process faced Real Time issue(s)</td>\n')
elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE) or (processesStatus == OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE): elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE) or (processesStatus == OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE):
self.htmlFile.write(' <td bgcolor = "orange" >OK?</td>\n') self.htmlFile.write(' <td bgcolor = "orange" >OK?</td>\n')
elif (processesStatus == ENB_PROCESS_SLAVE_RRU_NOT_SYNCED):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' Slave RRU could not synch</td>\n')
elif (processesStatus == OAI_UE_PROCESS_COULD_NOT_SYNC): elif (processesStatus == OAI_UE_PROCESS_COULD_NOT_SYNC):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - UE could not sync</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - UE could not sync</td>\n')
elif (processesStatus == HSS_PROCESS_FAILED): elif (processesStatus == HSS_PROCESS_FAILED):
...@@ -3563,12 +3705,12 @@ def Usage(): ...@@ -3563,12 +3705,12 @@ def Usage():
print(' InitiateHtml, FinalizeHtml') print(' InitiateHtml, FinalizeHtml')
print(' TerminateeNB, TerminateUE, TerminateHSS, TerminateMME, TerminateSPGW') print(' TerminateeNB, TerminateUE, TerminateHSS, TerminateMME, TerminateSPGW')
print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf') print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf')
print(' --eNBRepository=[eNB\'s Repository URL] or --ranRepository=[OAI RAN Repository URL]')
print(' --eNBBranch=[eNB\'s Branch Name] or --ranBranch=[OAI RAN Repository Branch')
print(' --eNBCommitID=[eNB\'s Commit Number] or --ranCommitID=[OAI RAN Repository Commit SHA-1')
print(' --eNB_AllowMerge=[eNB\'s Allow Merge Request (with target branch)] or --ranAllowMerge=true/false')
print(' --eNBTargetBranch=[eNB\'s Target Branch in case of a Merge Request] or --ranTargetBranch=[Target Branch]')
print(' --eNBIPAddress=[eNB\'s IP Address]') print(' --eNBIPAddress=[eNB\'s IP Address]')
print(' --eNBRepository=[eNB\'s Repository URL]')
print(' --eNBBranch=[eNB\'s Branch Name]')
print(' --eNBCommitID=[eNB\'s Commit Number]')
print(' --eNB_AllowMerge=[eNB\'s Allow Merge Request (with target branch)]')
print(' --eNBTargetBranch=[eNB\'s Target Branch in case of a Merge Request]')
print(' --eNBUserName=[eNB\'s Login User Name]') print(' --eNBUserName=[eNB\'s Login User Name]')
print(' --eNBPassword=[eNB\'s Login Password]') print(' --eNBPassword=[eNB\'s Login Password]')
print(' --eNBSourceCodePath=[eNB\'s Source Code Path]') print(' --eNBSourceCodePath=[eNB\'s Source Code Path]')
...@@ -3584,7 +3726,7 @@ def Usage(): ...@@ -3584,7 +3726,7 @@ def Usage():
print('------------------------------------------------------------') print('------------------------------------------------------------')
def CheckClassValidity(action,id): def CheckClassValidity(action,id):
if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'DataDisable_UE' and action != 'DataEnable_UE' and action != 'CheckStatusUE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_FlexranCtrl' and action != 'Terminate_FlexranCtrl' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep': if action != 'Build_eNB' and action != 'WaitEndBuild_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'DataDisable_UE' and action != 'DataEnable_UE' and action != 'CheckStatusUE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_FlexranCtrl' and action != 'Terminate_FlexranCtrl' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action) logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action)
return False return False
return True return True
...@@ -3592,17 +3734,46 @@ def CheckClassValidity(action,id): ...@@ -3592,17 +3734,46 @@ def CheckClassValidity(action,id):
def GetParametersFromXML(action): def GetParametersFromXML(action):
if action == 'Build_eNB': if action == 'Build_eNB':
SSH.Build_eNB_args = test.findtext('Build_eNB_args') SSH.Build_eNB_args = test.findtext('Build_eNB_args')
SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None):
SSH.eNB_instance = '0'
SSH.eNB_serverId = test.findtext('eNB_serverId')
if (SSH.eNB_serverId is None):
SSH.eNB_serverId = '0'
xmlBgBuildField = test.findtext('backgroundBuild')
if (xmlBgBuildField is None):
SSH.backgroundBuild = False
else:
if re.match('true', xmlBgBuildField, re.IGNORECASE):
SSH.backgroundBuild = True
else:
SSH.backgroundBuild = False
if action == 'WaitEndBuild_eNB':
SSH.Build_eNB_args = test.findtext('Build_eNB_args')
SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None):
SSH.eNB_instance = '0'
SSH.eNB_serverId = test.findtext('eNB_serverId')
if (SSH.eNB_serverId is None):
SSH.eNB_serverId = '0'
if action == 'Initialize_eNB': if action == 'Initialize_eNB':
SSH.Initialize_eNB_args = test.findtext('Initialize_eNB_args') SSH.Initialize_eNB_args = test.findtext('Initialize_eNB_args')
SSH.eNB_instance = test.findtext('eNB_instance') SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None): if (SSH.eNB_instance is None):
SSH.eNB_instance = '0' SSH.eNB_instance = '0'
SSH.eNB_serverId = test.findtext('eNB_serverId')
if (SSH.eNB_serverId is None):
SSH.eNB_serverId = '0'
if action == 'Terminate_eNB': if action == 'Terminate_eNB':
SSH.eNB_instance = test.findtext('eNB_instance') SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None): if (SSH.eNB_instance is None):
SSH.eNB_instance = '0' SSH.eNB_instance = '0'
SSH.eNB_serverId = test.findtext('eNB_serverId')
if (SSH.eNB_serverId is None):
SSH.eNB_serverId = '0'
if action == 'Attach_UE': if action == 'Attach_UE':
nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach') nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach')
...@@ -3684,35 +3855,78 @@ while len(argvs) > 1: ...@@ -3684,35 +3855,78 @@ while len(argvs) > 1:
elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
mode = matchReg.group(1) mode = matchReg.group(1)
elif re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-eNBRepository=(.+)$|^\-\-ranRepository(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE) if re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE):
SSH.eNBIPAddress = matchReg.group(1) matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE)
elif re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE): else:
matchReg = re.match('^\-\-eNBRepository=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-ranRepository=(.+)$', myArgv, re.IGNORECASE)
SSH.eNBRepository = matchReg.group(1) SSH.ranRepository = matchReg.group(1)
elif re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE) if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
else:
matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
doMerge = matchReg.group(1) doMerge = matchReg.group(1)
if ((doMerge == 'true') or (doMerge == 'True')): if ((doMerge == 'true') or (doMerge == 'True')):
SSH.eNB_AllowMerge = True SSH.ranAllowMerge = True
elif re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE) if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
SSH.eNBBranch = matchReg.group(1) matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
elif re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE): else:
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE)
SSH.eNBCommitID = matchReg.group(1) SSH.ranBranch = matchReg.group(1)
elif re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE): elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE) if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
SSH.eNBTargetBranch = matchReg.group(1) matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
elif re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE): else:
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE)
SSH.eNBUserName = matchReg.group(1) SSH.ranCommitID = matchReg.group(1)
elif re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE) if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
SSH.eNBPassword = matchReg.group(1) matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
elif re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE): else:
matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE)
SSH.eNBSourceCodePath = matchReg.group(1) SSH.ranTargetBranch = matchReg.group(1)
elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
SSH.eNBIPAddress = matchReg.group(1)
elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB1IPAddress = matchReg.group(1)
elif re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB2IPAddress = matchReg.group(1)
elif re.match('^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
SSH.eNBUserName = matchReg.group(1)
elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB1UserName = matchReg.group(1)
elif re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB2UserName = matchReg.group(1)
elif re.match('^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
SSH.eNBPassword = matchReg.group(1)
elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB1Password = matchReg.group(1)
elif re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB2Password = matchReg.group(1)
elif re.match('^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
SSH.eNBSourceCodePath = matchReg.group(1)
elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB1SourceCodePath = matchReg.group(1)
elif re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
SSH.eNB2SourceCodePath = matchReg.group(1)
elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-EPCIPAddress=(.+)$', myArgv, re.IGNORECASE)
SSH.EPCIPAddress = matchReg.group(1) SSH.EPCIPAddress = matchReg.group(1)
...@@ -3772,6 +3986,9 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE): ...@@ -3772,6 +3986,9 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
if SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '': if SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '':
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
SSH.eNB_serverId = '0'
SSH.eNB_instance = '0'
SSH.eNBSourceCodePath = '/tmp/'
SSH.TerminateeNB() SSH.TerminateeNB()
elif re.match('^TerminateUE$', mode, re.IGNORECASE): elif re.match('^TerminateUE$', mode, re.IGNORECASE):
if (SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == ''): if (SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == ''):
...@@ -3864,15 +4081,15 @@ elif re.match('^FinalizeHtml$', mode, re.IGNORECASE): ...@@ -3864,15 +4081,15 @@ elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
SSH.CreateHtmlFooter(SSH.finalStatus) SSH.CreateHtmlFooter(SSH.finalStatus)
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE): elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
if re.match('^TesteNB$', mode, re.IGNORECASE): if re.match('^TesteNB$', mode, re.IGNORECASE):
if SSH.eNBIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '' or SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '': if SSH.eNBIPAddress == '' or SSH.ranRepository == '' or SSH.ranBranch == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '' or SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
Usage() Usage()
sys.exit('Insufficient Parameter') sys.exit('Insufficient Parameter')
if (SSH.EPCIPAddress != ''): if (SSH.EPCIPAddress != '') and (SSH.EPCIPAddress != 'none'):
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/tcp_iperf_stats.awk", "/tmp") SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/tcp_iperf_stats.awk", "/tmp")
SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/active_net_interfaces.awk", "/tmp") SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/active_net_interfaces.awk", "/tmp")
else: else:
if SSH.UEIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '': if SSH.UEIPAddress == '' or SSH.ranRepository == '' or SSH.ranBranch == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '':
Usage() Usage()
sys.exit('UE: Insufficient Parameter') sys.exit('UE: Insufficient Parameter')
...@@ -3915,7 +4132,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -3915,7 +4132,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
else: else:
logging.debug('ERROR: requested test is invalidly formatted: ' + test) logging.debug('ERROR: requested test is invalidly formatted: ' + test)
sys.exit(1) sys.exit(1)
SSH.CheckFlexranCtrlInstallation() if (SSH.EPCIPAddress != '') and (SSH.EPCIPAddress != 'none'):
SSH.CheckFlexranCtrlInstallation()
#get the list of tests to be done #get the list of tests to be done
todo_tests=[] todo_tests=[]
...@@ -3948,6 +4166,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -3948,6 +4166,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
SSH.GetAllUEDevices(terminate_ue_flag) SSH.GetAllUEDevices(terminate_ue_flag)
if action == 'Build_eNB': if action == 'Build_eNB':
SSH.BuildeNB() SSH.BuildeNB()
elif action == 'WaitEndBuild_eNB':
SSH.WaitBuildeNBisFinished()
elif action == 'Initialize_eNB': elif action == 'Initialize_eNB':
SSH.InitializeeNB() SSH.InitializeeNB()
elif action == 'Terminate_eNB': elif action == 'Terminate_eNB':
......
<!--
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 010102 010103
000101 000102 000103
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010101">
<class>Build_eNB</class>
<desc>Build RCC</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<backgroundBuild>True</backgroundBuild>
</testCase>
<testCase id="000101">
<class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build RCC</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="010102">
<class>Build_eNB</class>
<desc>Build Master RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<backgroundBuild>True</backgroundBuild>
</testCase>
<testCase id="000102">
<class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build Master RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
<testCase id="010103">
<class>Build_eNB</class>
<desc>Build Slave RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>2</eNB_instance>
<eNB_serverId>2</eNB_serverId>
<backgroundBuild>True</backgroundBuild>
</testCase>
<testCase id="000103">
<class>WaitEndBuild_eNB</class>
<desc>Wait for end of Build Slave RRU</desc>
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
<eNB_instance>2</eNB_instance>
<eNB_serverId>2</eNB_serverId>
</testCase>
</testCaseList>
<!--
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-full-termintation</htmlTabRef>
<htmlTabName>Test-RCC-RRUs-Termination</htmlTabName>
<htmlTabIcon>off</htmlTabIcon>
<TestCaseRequestedList>
030211 030212 030213
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030211">
<class>Terminate_eNB</class>
<desc>Terminate RCC</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="030212">
<class>Terminate_eNB</class>
<desc>Terminate Master RRU</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
<testCase id="030213">
<class>Terminate_eNB</class>
<desc>Terminate Slave RRU</desc>
<eNB_instance>2</eNB_instance>
<eNB_serverId>2</eNB_serverId>
</testCase>
</testCaseList>
<!--
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-multi-rru-10</htmlTabRef>
<htmlTabName>Test-Multi-RRU-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030211 030212 030213
030111 030112 030113
000001
030211 030212 030213
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
</testCase>
<testCase id="030111">
<class>Initialize_eNB</class>
<desc>Initialize RCC (TDD/Band38/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band38.tm1.50PRB.multi.rru.conf --noS1</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="030112">
<class>Initialize_eNB</class>
<desc>Initialize Master RRU (TDD/Band38/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.band38.tm1.master.conf --noS1</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
<testCase id="030113">
<class>Initialize_eNB</class>
<desc>Initialize Slave RRU (TDD/Band38/10MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rru.band38.tm1.slave.conf --noS1</Initialize_eNB_args>
<eNB_instance>2</eNB_instance>
<eNB_serverId>2</eNB_serverId>
</testCase>
<testCase id="030211">
<class>Terminate_eNB</class>
<desc>Terminate RCC</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="030212">
<class>Terminate_eNB</class>
<desc>Terminate Master RRU</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
<testCase id="030213">
<class>Terminate_eNB</class>
<desc>Terminate Slave RRU</desc>
<eNB_instance>2</eNB_instance>
<eNB_serverId>2</eNB_serverId>
</testCase>
</testCaseList>
...@@ -52,6 +52,7 @@ typedef struct { ...@@ -52,6 +52,7 @@ typedef struct {
int max_mib; int max_mib;
int max_sib; int max_sib;
int live; int live;
int no_bind;
/* runtime vars */ /* runtime vars */
int cur_mib; int cur_mib;
int cur_sib; int cur_sib;
...@@ -264,9 +265,11 @@ void *receiver(void *_d) { ...@@ -264,9 +265,11 @@ void *receiver(void *_d) {
abort(); abort();
} }
if (bind(s, (struct sockaddr *)&d->to, sizeof(struct sockaddr_in)) == -1) { if (d->no_bind == 0) {
perror("bind"); if (bind(s, (struct sockaddr *)&d->to, sizeof(struct sockaddr_in)) == -1) {
abort(); perror("bind");
abort();
}
} }
while (1) { while (1) {
...@@ -290,6 +293,7 @@ void usage(void) { ...@@ -290,6 +293,7 @@ void usage(void) {
" -live run live\n" " -live run live\n"
" -live-ip <IP address> tracee's IP address (default %s)\n" " -live-ip <IP address> tracee's IP address (default %s)\n"
" -live-port <port> tracee's port (default %d)\n" " -live-port <port> tracee's port (default %d)\n"
" -no-bind don't bind to IP address (for remote logging)\n"
"-i and -live are mutually exclusive options. One of them must be provided\n" "-i and -live are mutually exclusive options. One of them must be provided\n"
"but not both.\n", "but not both.\n",
DEFAULT_IP, DEFAULT_IP,
...@@ -318,78 +322,18 @@ int main(int n, char **v) { ...@@ -318,78 +322,18 @@ int main(int n, char **v) {
for (i = 1; i < n; i++) { for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage(); if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
if (!strcmp(v[i], "-d")) { if(i>n-2)usage(); database_filename = v[++i]; continue; }
if (!strcmp(v[i], "-d")) { if (!strcmp(v[i], "-i")) { if(i>n-2)usage(); input_filename = v[++i]; continue; }
if (i > n-2) usage(); if (!strcmp(v[i], "-ip")) { if(i>n-2)usage(); ip = v[++i]; continue; }
if (!strcmp(v[i], "-p")) { if(i>n-2)usage(); port = atoi(v[++i]); continue; }
database_filename = v[++i]; if (!strcmp(v[i], "-no-mib")) { d.no_mib = 1; continue; }
continue; if (!strcmp(v[i], "-no-sib")) { d.no_sib = 1; continue; }
} if (!strcmp(v[i], "-max-mib")) { if(i>n-2)usage(); d.max_mib = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-max-sib")) { if(i>n-2)usage(); d.max_sib = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-i")) { if (!strcmp(v[i], "-live")) { live = 1; continue; }
if (i > n-2) usage(); if (!strcmp(v[i], "-live-ip")) { if(i>n-2)usage(); live_ip = v[++i]; continue; }
if (!strcmp(v[i], "-live-port")) { if(i>n-2)usage(); live_port = atoi(v[++i]); continue; }
input_filename = v[++i]; if (!strcmp(v[i], "-no-bind")) { d.no_bind = 1; continue; }
continue;
}
if (!strcmp(v[i], "-ip")) {
if (i > n-2) usage();
ip = v[++i];
continue;
}
if (!strcmp(v[i], "-p")) {
if(i>n-2)usage();
port=atoi(v[++i]);
continue;
}
if (!strcmp(v[i], "-no-mib")) {
d.no_mib = 1;
continue;
}
if (!strcmp(v[i], "-no-sib")) {
d.no_sib = 1;
continue;
}
if (!strcmp(v[i], "-max-mib")) {
if (i > n-2) usage();
d.max_mib = atoi(v[++i]);
continue;
}
if (!strcmp(v[i], "-max-sib")) {
if (i > n-2) usage();
d.max_sib = atoi(v[++i]);
continue;
}
if (!strcmp(v[i], "-live")) {
live = 1;
continue;
}
if (!strcmp(v[i], "-live-ip")) {
if (i > n-2) usage();
live_ip = v[++i];
continue;
}
if (!strcmp(v[i], "-live-port")) {
if (i > n-2) usage();
live_port = atoi(v[++i]);
continue;
}
usage(); usage();
} }
......
...@@ -291,24 +291,8 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols, ...@@ -291,24 +291,8 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
y[0] = &yseq0[0]; y[0] = &yseq0[0];
y[1] = &yseq1[0]; y[1] = &yseq1[0];
if (IS_SOFTMODEM_BASICSIM) { /* reset all bits to <NIL>, here we set <NIL> elements as 2 */
/* this should be the normal case memset(e, 2, DCI_BITS_MAX);
* but it has to be validated for all the various cases
* so let's just do it for the basic simulator
*/
// memset(e, 2, DCI_BITS_MAX);
} else {
// reset all bits to <NIL>, here we set <NIL> elements as 2
// memset(e, 2, DCI_BITS_MAX);
// here we interpret NIL as a random QPSK sequence. That makes power estimation easier.
for (i=0; i<DCI_BITS_MAX; i++)
e[i]=taus()&1;
/* clear all bits, the above code may generate too much false detections
* (not sure about this, to be checked somehow)
*/
//memset(e, 0, DCI_BITS_MAX);
}/* BASIC_SIMULATOR */
e_ptr = e; e_ptr = e;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DCI0,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DCI0,1);
......
...@@ -230,13 +230,11 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) { ...@@ -230,13 +230,11 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
void pdsch_procedures(PHY_VARS_eNB *eNB, bool dlsch_procedures(PHY_VARS_eNB *eNB,
L1_rxtx_proc_t *proc, L1_rxtx_proc_t *proc,
int harq_pid, int harq_pid,
LTE_eNB_DLSCH_t *dlsch, LTE_eNB_DLSCH_t *dlsch,
LTE_eNB_DLSCH_t *dlsch1, LTE_eNB_UE_stats *ue_stats) {
LTE_eNB_UE_stats *ue_stats,
int ra_flag) {
int frame=proc->frame_tx; int frame=proc->frame_tx;
int subframe=proc->subframe_tx; int subframe=proc->subframe_tx;
LTE_DL_eNB_HARQ_t *dlsch_harq=dlsch->harq_processes[harq_pid]; LTE_DL_eNB_HARQ_t *dlsch_harq=dlsch->harq_processes[harq_pid];
...@@ -265,27 +263,6 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, ...@@ -265,27 +263,6 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
dlsch_harq->round); dlsch_harq->round);
} }
MSC_LOG_TX_MESSAGE(
MSC_PHY_ENB,MSC_PHY_UE,
NULL,0,
"%05u:%02u PDSCH/DLSCH input size = %"PRIu16", G %d, nb_rb %"PRIu16", TBS %"PRIu16", pmi_alloc %"PRIx16", rv %"PRIu8" (round %"PRIu8")",
frame, subframe,
dlsch_harq->TBS/8,
get_G(fp,
dlsch_harq->nb_rb,
dlsch_harq->rb_alloc,
dlsch_harq->Qm,
dlsch_harq->Nl,
dlsch_harq->pdsch_start,
frame,
subframe,
dlsch_harq->mimo_mode==TM7?7:0),
dlsch_harq->nb_rb,
dlsch_harq->TBS,
pmi2hex_2Ar1(dlsch_harq->pmi_alloc),
dlsch_harq->rvidx,
dlsch_harq->round);
if (ue_stats) ue_stats->dlsch_sliding_cnt++; if (ue_stats) ue_stats->dlsch_sliding_cnt++;
if (dlsch_harq->round == 0) { if (dlsch_harq->round == 0) {
...@@ -300,15 +277,17 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, ...@@ -300,15 +277,17 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
#endif #endif
} }
if (dlsch->rnti!=0xffff) LOG_D(PHY,"Generating DLSCH/PDSCH pdu:%p pdsch_start:%d frame:%d subframe:%d nb_rb:%d rb_alloc:%d Qm:%d Nl:%d round:%d\n", if (dlsch->rnti!=0xffff)
dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round); LOG_D(PHY,"Generating DLSCH/PDSCH pdu:%p pdsch_start:%d frame:%d subframe:%d nb_rb:%d rb_alloc:%d Qm:%d Nl:%d round:%d\n",
dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],
dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
// 36-212 // 36-212
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { // monolthic OR PNF - do not need turbo encoding on VNF if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { // monolthic OR PNF - do not need turbo encoding on VNF
if (dlsch_harq->pdu==NULL) { if (dlsch_harq->pdu==NULL) {
LOG_E(PHY,"dlsch_harq->pdu == NULL SFN/SF:%04d%d dlsch[rnti:%x] dlsch_harq[pdu:%p pdsch_start:%d Qm:%d Nl:%d round:%d nb_rb:%d rb_alloc[0]:%d]\n", frame,subframe,dlsch->rnti, dlsch_harq->pdu, LOG_E(PHY,"dlsch_harq->pdu == NULL SFN/SF:%04d%d dlsch[rnti:%x] dlsch_harq[pdu:%p pdsch_start:%d Qm:%d Nl:%d round:%d nb_rb:%d rb_alloc[0]:%d]\n", frame,subframe,dlsch->rnti, dlsch_harq->pdu,
dlsch_harq->pdsch_start,dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0]); dlsch_harq->pdsch_start,dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0]);
return; return false;
} }
start_meas(&eNB->dlsch_encoding_stats); start_meas(&eNB->dlsch_encoding_stats);
...@@ -330,44 +309,57 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, ...@@ -330,44 +309,57 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1) { if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1) {
print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr); print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr);
} }
// 36-211
start_meas(&eNB->dlsch_scrambling_stats);
dlsch_scrambling(fp,
0,
dlsch,
harq_pid,
get_G(fp,
dlsch_harq->nb_rb,
dlsch_harq->rb_alloc,
dlsch_harq->Qm,
dlsch_harq->Nl,
dlsch_harq->pdsch_start,
frame,subframe,
0),
0,
frame,
subframe<<1);
stop_meas(&eNB->dlsch_scrambling_stats);
start_meas(&eNB->dlsch_modulation_stats);
dlsch_modulation(eNB,
eNB->common_vars.txdataF,
AMP,
frame,
subframe,
dlsch_harq->pdsch_start,
dlsch,
dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
stop_meas(&eNB->dlsch_modulation_stats);
}
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
dlsch->active[subframe] = 0; dlsch->active[subframe] = 0;
#else #else
dlsch->active = 0; dlsch->active = 0;
#endif #endif
dlsch_harq->round++; dlsch_harq->round++;
LOG_D(PHY,"Generating DLSCH/PDSCH dlsch_harq[round:%d]\n",dlsch_harq->round); LOG_D(PHY,"Generated DLSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
return true;
}
return false;
}
void pdsch_procedures(PHY_VARS_eNB *eNB,
L1_rxtx_proc_t *proc,
int harq_pid,
LTE_eNB_DLSCH_t *dlsch,
LTE_eNB_DLSCH_t *dlsch1) {
int frame=proc->frame_tx;
int subframe=proc->subframe_tx;
LTE_DL_eNB_HARQ_t *dlsch_harq=dlsch->harq_processes[harq_pid];
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
// 36-211
start_meas(&eNB->dlsch_scrambling_stats);
dlsch_scrambling(fp,
0,
dlsch,
harq_pid,
get_G(fp,
dlsch_harq->nb_rb,
dlsch_harq->rb_alloc,
dlsch_harq->Qm,
dlsch_harq->Nl,
dlsch_harq->pdsch_start,
frame,subframe,
0),
0,
frame,
subframe<<1);
stop_meas(&eNB->dlsch_scrambling_stats);
start_meas(&eNB->dlsch_modulation_stats);
dlsch_modulation(eNB,
eNB->common_vars.txdataF,
AMP,
frame,
subframe,
dlsch_harq->pdsch_start,
dlsch,
dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
stop_meas(&eNB->dlsch_modulation_stats);
LOG_D(PHY,"Generated PDSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
} }
...@@ -531,14 +523,18 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -531,14 +523,18 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
dlsch0->harq_ids[frame%2][6], dlsch0->harq_ids[frame%2][6],
dlsch0->harq_ids[frame%2][7]); dlsch0->harq_ids[frame%2][7]);
} else { } else {
// generate pdsch if (dlsch_procedures(eNB,
pdsch_procedures(eNB,
proc, proc,
harq_pid, harq_pid,
dlsch0, dlsch0,
dlsch1, &eNB->UE_stats[(uint32_t)UE_id])) {
&eNB->UE_stats[(uint32_t)UE_id], // if we generate dlsch, we must generate pdsch
0); pdsch_procedures(eNB,
proc,
harq_pid,
dlsch0,
dlsch1);
}
} }
} else if ((dlsch0)&&(dlsch0->rnti>0)&& } else if ((dlsch0)&&(dlsch0->rnti>0)&&
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
......
...@@ -100,7 +100,7 @@ void feptx0(RU_t *ru,int slot) { ...@@ -100,7 +100,7 @@ void feptx0(RU_t *ru,int slot) {
*/ */
int num_symb = 7; int num_symb = 7;
if (subframe_select(fp,subframe) == SF_S) num_symb=fp->dl_symbols_in_S_subframe; if (subframe_select(fp,subframe) == SF_S) num_symb=fp->dl_symbols_in_S_subframe+1;
if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) { if (ru->generate_dmrs_sync == 1 && slot == 0 && subframe == 1 && aa==0) {
//int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32))); //int32_t dmrs[ru->frame_parms.ofdm_symbol_size*14] __attribute__((aligned(32)));
......
...@@ -205,7 +205,7 @@ typedef struct x2ap_handover_req_s { ...@@ -205,7 +205,7 @@ typedef struct x2ap_handover_req_s {
x2ap_lastvisitedcell_info_t lastvisitedcell_info; x2ap_lastvisitedcell_info_t lastvisitedcell_info;
uint8_t rrc_buffer[1024 /* arbitrary, big enough */]; uint8_t rrc_buffer[8192 /* arbitrary, big enough */];
int rrc_buffer_size; int rrc_buffer_size;
int target_assoc_id; int target_assoc_id;
......
...@@ -116,6 +116,10 @@ extern int rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP, rrc_eN ...@@ -116,6 +116,10 @@ extern int rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP, rrc_eN
extern void process_eNB_security_key (const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t *security_key_pP); extern void process_eNB_security_key (const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t *security_key_pP);
extern int derive_keNB_star(const uint8_t *kenb_32, const uint16_t pci, const uint32_t earfcn_dl, const bool is_rel8_only, uint8_t * kenb_star); extern int derive_keNB_star(const uint8_t *kenb_32, const uint16_t pci, const uint32_t earfcn_dl, const bool is_rel8_only, uint8_t * kenb_star);
pthread_mutex_t rrc_release_freelist;
RRC_release_list_t rrc_release_info;
pthread_mutex_t lock_ue_freelist;
void void
openair_rrc_on( openair_rrc_on(
const protocol_ctxt_t *const ctxt_pP const protocol_ctxt_t *const ctxt_pP
...@@ -4610,10 +4614,10 @@ rrc_eNB_generate_HandoverPreparationInformation( ...@@ -4610,10 +4614,10 @@ rrc_eNB_generate_HandoverPreparationInformation(
uint8_t *buffer, uint8_t *buffer,
int *_size int *_size
) { ) {
memset(buffer, 0, RRC_BUF_SIZE); memset(buffer, 0, 8192);
char *ho_buf = (char *) buffer; char *ho_buf = (char *) buffer;
int ho_size; int ho_size;
ho_size = do_HandoverPreparation(ho_buf, 1024, ue_context_pP->ue_context.UE_Capability, ue_context_pP->ue_context.UE_Capability_size); ho_size = do_HandoverPreparation(ho_buf, 8192, ue_context_pP->ue_context.UE_Capability, ue_context_pP->ue_context.UE_Capability_size);
*_size = ho_size; *_size = ho_size;
} }
......
...@@ -667,9 +667,11 @@ void openair_rrc_top_init_ue( ...@@ -667,9 +667,11 @@ void openair_rrc_top_init_ue(
uint8_t cba_group_active, uint8_t cba_group_active,
uint8_t HO_active uint8_t HO_active
); );
pthread_mutex_t rrc_release_freelist;
RRC_release_list_t rrc_release_info; extern pthread_mutex_t rrc_release_freelist;
pthread_mutex_t lock_ue_freelist; extern RRC_release_list_t rrc_release_info;
extern pthread_mutex_t lock_ue_freelist;
void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti); void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti);
void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag); void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag);
void release_UE_in_freeList(module_id_t mod_id); void release_UE_in_freeList(module_id_t mod_id);
......
...@@ -730,7 +730,7 @@ int x2ap_eNB_handle_handover_preparation (instance_t instance, ...@@ -730,7 +730,7 @@ int x2ap_eNB_handle_handover_preparation (instance_t instance,
X2AP_RRC_Context_t *c = &ie->value.choice.UE_ContextInformation.rRC_Context; X2AP_RRC_Context_t *c = &ie->value.choice.UE_ContextInformation.rRC_Context;
if (c->size > 1024 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_ack_s*/) if (c->size > 8192 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_s */)
{ printf("%s:%d: fatal: buffer too big\n", __FILE__, __LINE__); abort(); } { printf("%s:%d: fatal: buffer too big\n", __FILE__, __LINE__); abort(); }
memcpy(X2AP_HANDOVER_REQ(msg).rrc_buffer, c->buf, c->size); memcpy(X2AP_HANDOVER_REQ(msg).rrc_buffer, c->buf, c->size);
...@@ -821,7 +821,7 @@ int x2ap_eNB_handle_handover_response (instance_t instance, ...@@ -821,7 +821,7 @@ int x2ap_eNB_handle_handover_response (instance_t instance,
X2AP_TargeteNBtoSource_eNBTransparentContainer_t *c = &ie->value.choice.TargeteNBtoSource_eNBTransparentContainer; X2AP_TargeteNBtoSource_eNBTransparentContainer_t *c = &ie->value.choice.TargeteNBtoSource_eNBTransparentContainer;
if (c->size > 1024 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_ack_s*/) if (c->size > 1024 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_ack_s */)
{ printf("%s:%d: fatal: buffer too big\n", __FILE__, __LINE__); abort(); } { printf("%s:%d: fatal: buffer too big\n", __FILE__, __LINE__); abort(); }
memcpy(X2AP_HANDOVER_REQ_ACK(msg).rrc_buffer, c->buf, c->size); memcpy(X2AP_HANDOVER_REQ_ACK(msg).rrc_buffer, c->buf, c->size);
......
...@@ -26,6 +26,6 @@ ...@@ -26,6 +26,6 @@
#define SCTP_IN_STREAMS (16) #define SCTP_IN_STREAMS (16)
#define SCTP_MAX_ATTEMPTS (2) #define SCTP_MAX_ATTEMPTS (2)
#define SCTP_TIMEOUT (5) #define SCTP_TIMEOUT (5)
#define SCTP_RECV_BUFFER_SIZE (1024) #define SCTP_RECV_BUFFER_SIZE (8192)
#endif /* SCTP_DEFAULT_VALUES_H_ */ #endif /* SCTP_DEFAULT_VALUES_H_ */
...@@ -955,6 +955,11 @@ sctp_eNB_read_from_socket( ...@@ -955,6 +955,11 @@ sctp_eNB_read_from_socket(
return; return;
} }
if (!(flags & MSG_EOR)) {
SCTP_ERROR("fatal: partial SCTP messages are not handled\n");
exit(1);
}
if (flags & MSG_NOTIFICATION) { if (flags & MSG_NOTIFICATION) {
union sctp_notification *snp; union sctp_notification *snp;
snp = (union sctp_notification *)buffer; snp = (union sctp_notification *)buffer;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <libbladeRF.h> #include <libbladeRF.h>
#include "common_lib.h" #include "common_lib.h"
#include "log.h" #include "LOG/log.h"
/** @addtogroup _BLADERF_PHY_RF_INTERFACE_ /** @addtogroup _BLADERF_PHY_RF_INTERFACE_
* @{ * @{
......
...@@ -635,15 +635,12 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) { ...@@ -635,15 +635,12 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU_PRACH))==0,"mutex_lock return %d\n",ret); AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU_PRACH))==0,"mutex_lock return %d\n",ret);
for (i=0; i<eNB->num_RU; i++) { for (i=0; i<eNB->num_RU; i++) {
if (ru == eNB->RU_list[i]) { if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
LOG_D(PHY,"frame %d, subframe %d: RU %d for eNB %d signals PRACH (mask %x, num_RU %d)\n",frame,subframe,i,eNB->Mod_id,proc->RU_mask_prach,eNB->num_RU); LOG_D(PHY,"frame %d, subframe %d: RU %d for eNB %d signals PRACH (mask %x, num_RU %d)\n",frame,subframe,i,eNB->Mod_id,proc->RU_mask_prach,eNB->num_RU);
proc->RU_mask_prach |= (1<<i);
if ((proc->RU_mask_prach&(1<<i)) > 0) } else if (eNB->RU_list[i]->state == RU_SYNC || eNB->RU_list[i]->wait_cnt > 0) {
LOG_E(PHY,"eNB %d frame %d, subframe %d : previous information (PRACH) from RU %d (num_RU %d, mask %x) has not been served yet!\n", proc->RU_mask_prach |= (1<<i);
eNB->Mod_id,frame,subframe,ru->idx,eNB->num_RU,proc->RU_mask_prach); }
proc->RU_mask_prach |= (1<<i);
}
} }
if (proc->RU_mask_prach != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return if (proc->RU_mask_prach != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return
......
...@@ -217,6 +217,7 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) { ...@@ -217,6 +217,7 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished if (proc->symbol_mask[*subframe]==0) { // this is normal case, if not true then we received a PULTICK before the previous subframe was finished
do { do {
recv_IF4p5(ru, &f, &sf, &packet_type, &symbol_number); recv_IF4p5(ru, &f, &sf, &packet_type, &symbol_number);
LOG_D(PHY,"fh_if4p5_south_in: RU %d, frame %d, subframe %d, f %d, sf %d\n",ru->idx,*frame,*subframe,f,sf);
if (oai_exit == 1 || ru->cmd== STOP_RU) break; if (oai_exit == 1 || ru->cmd== STOP_RU) break;
if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<<symbol_number); if (packet_type == IF4p5_PULFFT) proc->symbol_mask[sf] = proc->symbol_mask[sf] | (1<<symbol_number);
else if (packet_type == IF4p5_PULTICK) { else if (packet_type == IF4p5_PULTICK) {
...@@ -230,8 +231,8 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) { ...@@ -230,8 +231,8 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
} else if (packet_type == IF4p5_PRACH) { } else if (packet_type == IF4p5_PRACH) {
// nothing in RU for RAU // nothing in RU for RAU
} }
LOG_D(PHY,"rx_fh_if4p5: subframe %d symbol mask %x\n",*subframe,proc->symbol_mask[*subframe]); LOG_D(PHY,"rx_fh_if4p5 for RU %d: subframe %d, sf %d, symbol mask %x\n",ru->idx,*subframe,sf,proc->symbol_mask[sf]);
} while(proc->symbol_mask[*subframe] != symbol_mask_full); } while(proc->symbol_mask[sf] != symbol_mask_full);
} }
else { else {
f = *frame; f = *frame;
...@@ -437,10 +438,13 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *subframe) { ...@@ -437,10 +438,13 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *subframe) {
proc->first_tx = 0; proc->first_tx = 0;
symbol_mask_full = ((subframe_select(fp,*subframe) == SF_S) ? (1<<fp->dl_symbols_in_S_subframe) : (1<<fp->symbols_per_tti))-1; symbol_mask_full = ((subframe_select(fp,*subframe) == SF_S) ? (1<<fp->dl_symbols_in_S_subframe) : (1<<fp->symbols_per_tti))-1;
} else { } else {
AssertFatal(frame_tx == *frame, /* AssertFatal(frame_tx == *frame,
"frame_tx %d is not what we expect %d\n",frame_tx,*frame); "frame_tx %d is not what we expect %d\n",frame_tx,*frame);
AssertFatal(subframe_tx == *subframe, AssertFatal(subframe_tx == *subframe,
"In frame_tx %d : subframe_tx %d is not what we expect %d\n",frame_tx,subframe_tx,*subframe); "In frame_tx %d : subframe_tx %d is not what we expect %d\n",frame_tx,subframe_tx,*subframe);
*/
*frame = frame_tx;
*subframe = subframe_tx;
} }
if (packet_type == IF4p5_PDLFFT) { if (packet_type == IF4p5_PDLFFT) {
...@@ -1661,7 +1665,7 @@ void *ru_thread( void *param ) { ...@@ -1661,7 +1665,7 @@ void *ru_thread( void *param ) {
proc->instance_cnt_asynch_rxtx=0; proc->instance_cnt_asynch_rxtx=0;
pthread_cond_signal(&proc->cond_asynch_rxtx); pthread_cond_signal(&proc->cond_asynch_rxtx);
AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_asynch_rxtx))==0,"mutex_unlock returns %d\n",ret); AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_asynch_rxtx))==0,"mutex_unlock returns %d\n",ret);
} else LOG_I(PHY,"RU %d no asynch_south interface\n",ru->idx); } else LOG_D(PHY,"RU %d no asynch_south interface\n",ru->idx);
// if this is a slave RRU, try to synchronize on the DL frequency // if this is a slave RRU, try to synchronize on the DL frequency
if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru); if ((ru->is_slave == 1) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
...@@ -1872,7 +1876,8 @@ void *ru_thread_synch(void *arg) { ...@@ -1872,7 +1876,8 @@ void *ru_thread_synch(void *arg) {
&avg); &avg);
LOG_I(PHY,"RU synch cnt %d: %d, val %llu (%d dB,%d dB)\n",cnt,ru->rx_offset,(unsigned long long)peak_val,dB_fixed64(peak_val),dB_fixed64(avg)); LOG_I(PHY,"RU synch cnt %d: %d, val %llu (%d dB,%d dB)\n",cnt,ru->rx_offset,(unsigned long long)peak_val,dB_fixed64(peak_val),dB_fixed64(avg));
cnt++; cnt++;
if (/*ru->rx_offset >= 0*/dB_fixed(peak_val)>=85 && cnt>10) { //if (/*ru->rx_offset >= 0*/dB_fixed(peak_val)>=85 && cnt>10) {
if (ru->rx_offset >= 0 && avg>0 && dB_fixed(peak_val/avg)>=15 && cnt>10) {
LOG_I(PHY,"Estimated peak_val %d dB, avg %d => timing offset %llu\n",dB_fixed(peak_val),dB_fixed(avg),(unsigned long long int)ru->rx_offset); LOG_I(PHY,"Estimated peak_val %d dB, avg %d => timing offset %llu\n",dB_fixed(peak_val),dB_fixed(avg),(unsigned long long int)ru->rx_offset);
ru->in_synch = 1; ru->in_synch = 1;
/* /*
...@@ -2628,7 +2633,7 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti ...@@ -2628,7 +2633,7 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti
// NOTE: multiple CC_id are not handled here yet! // NOTE: multiple CC_id are not handled here yet!
ru->openair0_cfg.clock_source = clock_source; ru->openair0_cfg.clock_source = clock_source;
ru->openair0_cfg.time_source = time_source; ru->openair0_cfg.time_source = time_source;
// ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0; ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
if (ru->generate_dmrs_sync == 1) { if (ru->generate_dmrs_sync == 1) {
generate_ul_ref_sigs(); generate_ul_ref_sigs();
ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms.ofdm_symbol_size*2*sizeof(int16_t)); ru->dmrssync = (int16_t*)malloc16_clear(ru->frame_parms.ofdm_symbol_size*2*sizeof(int16_t));
...@@ -2919,6 +2924,8 @@ void RCconfig_RU(void) { ...@@ -2919,6 +2924,8 @@ void RCconfig_RU(void) {
RC.ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);; RC.ru[j]->max_pdschReferenceSignalPower = *(RUParamList.paramarray[j][RU_MAX_RS_EPRE_IDX].uptr);;
RC.ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr); RC.ru[j]->max_rxgain = *(RUParamList.paramarray[j][RU_MAX_RXGAIN_IDX].uptr);
RC.ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt; RC.ru[j]->num_bands = RUParamList.paramarray[j][RU_BAND_LIST_IDX].numelt;
/* sf_extension is in unit of samples for 30.72MHz here, has to be scaled later */
RC.ru[j]->sf_extension = *(RUParamList.paramarray[j][RU_SF_EXTENSION_IDX].uptr);
for (i=0;i<RC.ru[j]->num_bands;i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i]; for (i=0;i<RC.ru[j]->num_bands;i++) RC.ru[j]->band[i] = RUParamList.paramarray[j][RU_BAND_LIST_IDX].iptr[i];
} //strcmp(local_rf, "yes") == 0 } //strcmp(local_rf, "yes") == 0
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment