Commit c53171a9 authored by nikaeinn's avatar nikaeinn

*add eNB app to the oaisim

*update target and ASN1 readmes
*update oai test cases



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4513 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b2e4d83e
......@@ -2,7 +2,8 @@ ASN1 message from S1AP TS 36.413-8a0
To successfully parse messages, the asn1c util should be patched with the patch provided (asn1cpatch.p0).
To do so:
1) Get the last revision of asn1c: svn co https://github.com/vlm/asn1c/trunk -r 1516
0) create asn1c directory
1) Get the last revision of asn1c: svn co https://github.com/vlm/asn1c/trunk asn1c -r 1516
2) Go to asn1c directory
3) patch -p0 < ../asn1cpatch.p0
......
......@@ -25,7 +25,10 @@ http://lionet.info/asn1c/blog/
or via svn from sourceforge (version 0.9.22)
For version 0.9.2:
svn co https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk asn1c
For the latest version:
svn co https://github.com/vlm/asn1c/trunk asn1c
and put it in the asn1c directory (you should have a second asn1c directory now). Compile it and install it locally
(or make sure your $PATH can find the asn1c executable) according to the instructions given (see INSTALL file)
......
......@@ -52,7 +52,7 @@ The 3 folders have the following structures
follow the README.txt in OPENAIR2_DIR/RRC/LITE/MESSAGES to checkou the ASN.1 RRC messages
follow the OPENAIR2_DIR/RRC/LITE/MESSAGE/asn1c/asn1c/INSTALL to install the asn1c
go back to $OPENAIR_TARGET and "make install" if you have not used the shell script to install asn1c
- cd $OPENAIR_TARGET, and make a sanity check by doing make check
- cd $OPENAIR_TARGET/SIMU/USER, and make a sanity check by doing make pre-ci (require 15 minutes)
- Check out simple examples in $OPENAIR_TARGET/SIMU/EXAMPLES
4. to automatically bring up the oai interfaces and configure the default radio beares (usefull when sending data traffic):
......
......@@ -202,8 +202,8 @@ include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
include $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/Makefile.inc
include $(OPENAIR2_DIR)/RRC/NAS/Makefile.inc
include $(OPENAIR2_DIR)/UTIL/Makefile.inc
include $(OPENAIR2_DIR)/S1AP/Makefile.inc
include $(OPENAIR2_DIR)/S1AP/MESSAGES/Makefile.inc
#include $(OPENAIR2_DIR)/S1AP/Makefile.inc
#include $(OPENAIR2_DIR)/S1AP/MESSAGES/Makefile.inc
ITTI_MESSAGES_H = messages_xml.h
......
......@@ -372,6 +372,123 @@ static s32 UE_id = 0, eNB_id = 0;
static s32 RN_id=0;
#endif
int itti_create_task_successful(void){
#if defined(ENABLE_ITTI)
# if defined(ENABLE_USE_MME)
if (itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing SCTP task interface: FAILED\n");
return -1;
}
if (itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing S1AP task interface: FAILED\n");
return -1;
}
# endif
if (itti_create_task(TASK_ENB_APP, eNB_app_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing eNB APP task interface: FAILED\n");
return -1;
}
if (itti_create_task(TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing L2L1 task interface: FAILED\n");
return -1;
}
#endif
return 1;
}
/*
* later, the enb task will be moved from here
*/
void *eNB_app_task(void *args_p) {
#if defined(ENABLE_ITTI)
MessageDef *message_p;
# if defined(ENABLE_USE_MME)
/* Trying to register each eNB */
for (eNB_id = oai_emulation.info.first_enb_local;
(eNB_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.cli_start_enb[eNB_id] == 1);
eNB_id++) {
char *mme_address_v4;
if (EPC_MODE_ENABLED){
mme_address_v4 = EPC_MODE_MME_ADDRESS;
}else {
mme_address_v4 = "192.168.12.87";
}
char *mme_address_v6 = "2001:660:5502:12:30da:829a:2343:b6cf";
s1ap_register_eNB_t *s1ap_register_eNB;
uint32_t hash;
//note: there is an implicit relationship between the data struct and the message name
message_p = itti_alloc_new_message(TASK_ENB_APP, S1AP_REGISTER_ENB);
s1ap_register_eNB = &message_p->msg.s1ap_register_eNB;
hash = s1ap_generate_eNB_id();
/* Some default/random parameters */
s1ap_register_eNB->eNB_id = eNB_id + (hash & 0xFFFF8);
s1ap_register_eNB->cell_type = CELL_MACRO_ENB;
s1ap_register_eNB->tac = 0;
s1ap_register_eNB->mcc = 208;
s1ap_register_eNB->mnc = 34;
s1ap_register_eNB->default_drx = PAGING_DRX_256;
s1ap_register_eNB->nb_mme = 1;
s1ap_register_eNB->mme_ip_address[0].ipv4 = 1;
s1ap_register_eNB->mme_ip_address[0].ipv6 = 0;
memcpy(s1ap_register_eNB->mme_ip_address[0].ipv4_address, mme_address_v4,
strlen(mme_address_v4));
memcpy(s1ap_register_eNB->mme_ip_address[0].ipv6_address, mme_address_v6,
strlen(mme_address_v6));
itti_send_msg_to_task(TASK_S1AP, eNB_id, message_p);
}
# endif
itti_mark_task_ready (TASK_ENB_APP); // at the end of init for the current task
do {
// Checks if a message has been sent to L2L1 task
itti_receive_msg (TASK_ENB_APP, &message_p);
if (message_p != NULL) {
switch (ITTI_MSG_ID(message_p)) {
case TERMINATE_MESSAGE:
itti_exit_task ();
break;
case MESSAGE_TEST:
LOG_D(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
break;
/* case MME_REGISTERED:
LOG_D(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
itti_mark_task_ready (TASK_L2L1);
break;
*/
default:
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
break;
}
free (message_p);
}
} while(1);
itti_terminate_tasks(TASK_ENB_APP);
return NULL;
#endif
}
void *l2l1_task(void *args_p) {
// Framing variables
s32 slot, last_slot, next_slot;
......@@ -388,13 +505,6 @@ void *l2l1_task(void *args_p) {
MessageDef *message_p;
itti_mark_task_ready (TASK_L2L1);
# if defined(ENABLE_USE_MME)
/* Trying to register each eNB */
for (eNB_id = oai_emulation.info.first_enb_local;
(eNB_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.cli_start_enb[eNB_id] == 1);
eNB_id++)
{
char *mme_address_v4;
if (EPC_MODE_ENABLED)
{
......@@ -433,7 +543,6 @@ void *l2l1_task(void *args_p) {
itti_send_msg_to_task(TASK_S1AP, eNB_id, message_p);
}
# endif
#endif
for (frame = 0; frame < oai_emulation.info.n_frames; frame++) {
......@@ -928,7 +1037,7 @@ int main(int argc, char **argv) {
// get command-line options
get_simulation_options (argc, argv); //Command-line options
#if defined(ENABLE_ITTI)
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, oai_emulation.info.itti_dump_file);
#endif
......@@ -1044,40 +1153,25 @@ int main(int argc, char **argv) {
init_slot_isr ();
t = clock ();
LOG_N(EMU, "\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU initialization done <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
LOG_N(EMU, ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU initialization done <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
#if defined(ENABLE_ITTI)
# if defined(ENABLE_USE_MME)
if (itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing SCTP task interface: FAILED\n");
return -1;
}
if (itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing S1AP task interface: FAILED\n");
return -1;
}
# endif
if (itti_create_task(TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing L2L1 task interface: FAILED\n");
return -1;
}
// Handle signals until all tasks are terminated
itti_wait_tasks_end();
if (itti_create_task_successful())
itti_wait_tasks_end();
else
exit(-1);
#else
eNB_app_task(NULL); // do nothing for the moment
l2l1_task (NULL);
#endif
t = clock () - t;
printf ("rrc Duration of the simulation: %f seconds\n", ((float) t) / CLOCKS_PER_SEC);
LOG_I (EMU,"Duration of the simulation: %f seconds\n", ((float) t) / CLOCKS_PER_SEC);
// fclose(SINRpost);
LOG_I(EMU, ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU Ending <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
LOG_N(EMU, ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU Ending <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
free (otg_pdcp_buffer);
......
......@@ -41,6 +41,12 @@ int ulsch_abstraction(double* sinr_dB,u8 TM, u8 mcs,u16 nb_rb, u16 first_rb);
void calc_path_loss(node_desc_t* node_tx, node_desc_t* node_rx, channel_desc_t *ch_desc, Environment_System_Config env_desc, double **SF);
void do_OFDM_mod(mod_sym_t **txdataF, s32 **txdata, uint32_t frame, u16 next_slot, LTE_DL_FRAME_PARMS *frame_parms);
#ifdef ENABLE_ITTI
int itti_create_task_successful(void);
void *eNB_app_task(void *args_p);
void *l2l1_task(void *args_p);
#endif
#ifdef OPENAIR2
int omv_write (int pfd, Node_list enb_node_list, Node_list ue_node_list, Data_Flow_Unit omv_data);
void omv_end (int pfd, Data_Flow_Unit omv_data);
......
......@@ -418,6 +418,7 @@ int olg_config() {
int ocg_log_level = map_str_to_int(log_level_names, oai_emulation.emulation_config.log_emu.level);
int ocg_log_verbosity= map_str_to_int(log_verbosity_names, oai_emulation.emulation_config.log_emu.verbosity);
LOG_I(EMU, "ocg log level %d, oai log level%d \n ",ocg_log_level, oai_emulation.info.g_log_level);
// fix me:
oai_emulation.info.g_log_level = ((oai_emulation.info.ocg_enabled == 1) && (ocg_log_level != -1)) ? ocg_log_level : oai_emulation.info.g_log_level;
oai_emulation.info.g_log_verbosity = (((oai_emulation.info.ocg_enabled == 1) && (ocg_log_verbosity != -1)) ? ocg_log_verbosity :
map_str_to_int(log_verbosity_names, oai_emulation.info.g_log_verbosity));
......
......@@ -375,7 +375,7 @@ void get_simulation_options(int argc, char *argv[]) {
ip_length > 16 ? 16 : ip_length);
}
#else
printf("You enabled MME mode without MME support...\n");
printf("You enabled MME mode without compiling using ENABLE_USE_MME=1 ...\n");
#endif
break;
case 'o':
......
......@@ -41,10 +41,9 @@ import core
makerr1 = '***'
makerr2 = 'Error 1'
def execute(oai, user, pw, logfile):
def execute(oai, user, pw, logfile,logdir):
case = '01'
logs_dir = 'pre-ci-logs';
oai.send('cd $OPENAIR_TARGETS;')
try:
......@@ -65,13 +64,14 @@ def execute(oai, user, pw, logfile):
log.ok(case, test, name, conf, '', logfile)
oai.send('cd SIMU/USER;')
oai.send('mkdir ' + logs_dir + ';')
oai.send('mkdir ' + logdir + ';')
try:
test = '01'
name = 'Compile oai.rel8.make'
conf = 'make'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = "check the compilation errors for oai"
oai.send('make cleanall;')
oai.send('make cleanasn1;')
......@@ -79,7 +79,7 @@ def execute(oai, user, pw, logfile):
oai.send_expect_false('make -j4' + tee, makerr1, 1500)
oai.send('cp ./oaisim ./oaisim.rel8;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -92,14 +92,16 @@ def execute(oai, user, pw, logfile):
oai.send('rm -f ./oaisim.rel8.nas;')
oai.send('rm -f ./nasmesh;')
oai.send('make nasmesh_clean;')
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_1.txt;'
trace = logdir + '/log_' + case + test + '_1.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('make nasmesh_fix' + tee, makerr1, 60)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_2.txt;'
trace = logdir + '/log_' + case + test + '_2.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('make NAS=1 -j4' + tee, makerr1, 1500)
oai.send('cp ./oaisim ./oaisim.rel8.nas;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -110,14 +112,15 @@ def execute(oai, user, pw, logfile):
test = '03'
name = 'Compile oai.rel8.rf.make'
conf = 'make RTAI=0 Rel8=1'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for Rel8'
oai.send('make cleanall;')
oai.send('rm -f ./oaisim.rel8.rf;')
oai.send_expect_false('make RTAI=0 -j4' + tee, makerr1, 1500)
oai.send('cp ./oaisim ./oaisim.rel8.rf;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -128,14 +131,15 @@ def execute(oai, user, pw, logfile):
test = '04'
name = 'Compile oai.rel8.phy.dlsim.make'
conf = 'make dlsim'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for dlsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
oai.send('make clean;')
oai.send('rm -f ./dlsim.rel8;')
oai.send_expect_false('make dlsim -j4' + tee, makerr1, 1500)
oai.send('cp ./dlsim ./dlsim.rel8;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -143,14 +147,15 @@ def execute(oai, user, pw, logfile):
test = '05'
name = 'Compile oai.rel8.phy.ulsim.make'
conf = 'make ulsim'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for dlsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
oai.send('make clean;')
oai.send('rm -f ./ulsim.rel8;')
oai.send_expect_false('make ulsim -j4' + tee, makerr1, 1500)
oai.send('cp ./ulsim ./ulsim.rel8;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -161,7 +166,8 @@ def execute(oai, user, pw, logfile):
test = '06'
name = 'Compile oai.rel10.make'
conf = 'make Rel10=1'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for Rel10'
oai.send('make clean;')
oai.send('make cleanall;')
......@@ -170,7 +176,7 @@ def execute(oai, user, pw, logfile):
oai.send_expect_false('make Rel10=1 -j4' + tee, makerr1, 1500)
oai.send('cp ./oaisim ./oaisim.rel10;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -178,7 +184,7 @@ def execute(oai, user, pw, logfile):
#test = '07'
#name = 'Compile oai.rel8.cellular.eNB.make'
#conf = 'make rrc_cellular=1 eNB_flag=1'
#tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
#tee = ' | tee ' + logdir + '/log_' + case + test + '.txt;'
#diag = 'check the compilation errors for eNB/RG RRC Cellular'
#oai.send('make clean;')
#oai.send('make cleanall;')
......@@ -197,7 +203,7 @@ def execute(oai, user, pw, logfile):
#test = '08'
#name = 'Compile oai.rel8.cellular.UE.make'
#conf = 'make rrc_cellular=1 UE_flag=1'
#tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
#tee = ' | tee ' + logdir + '/log_' + case + test + '.txt;'
#diag = 'check the compilation errors for UE/MT RRC Cellular'
#oai.send('make clean;')
#oai.send('make cleanall;')
......@@ -216,7 +222,7 @@ def execute(oai, user, pw, logfile):
#test = '09'
#name = 'Compile oai.rel8.cellular.nas.eNB'
#conf = 'make nas_sim_rg_cellular'
#tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
#tee = ' | tee ' + logdir + '/log_' + case + test + '.txt;'
#diag = 'check the compilation errors for NAS SIM RRC Cellular (node RG)'
#oai.send('make clean;')
#oai.send('make cleanall;')
......@@ -235,7 +241,7 @@ def execute(oai, user, pw, logfile):
#test = '10'
#name = 'Compile oai.rel8.cellular.nas.UE'
#conf = 'make nas_sim_mt_cellular'
#tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
#tee = ' | tee ' + logdir + '/log_' + case + test + '.txt;'
#diag = 'check the compilation errors for NAS SIM RRC Cellular (node MT)'
#oai.send('make clean;')
#oai.send('make cleanall;')
......@@ -254,7 +260,8 @@ def execute(oai, user, pw, logfile):
test = '11'
name = 'Compile oai.rel8.itti.make'
conf = 'make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 Rel8=1'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for ITTI Rel8'
oai.send('make clean;')
oai.send('make cleanall;')
......@@ -263,14 +270,15 @@ def execute(oai, user, pw, logfile):
oai.send_expect_false('make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 Rel8=1 -j4' + tee, makerr1, 1500)
oai.send('cp ./oaisim ./oaisim.rel8.itti;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
try:
test = '12'
name = 'Compile oai.rel10.itti.make'
conf = 'make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 Rel10=1'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt;'
trace = logdir + '/log_' + case + test + '.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'check the compilation errors for ITTI Rel10'
oai.send('make clean;')
oai.send('make cleanall;')
......@@ -279,7 +287,7 @@ def execute(oai, user, pw, logfile):
oai.send_expect_false('make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 Rel10=1 -j4' + tee, makerr1, 1500)
oai.send('cp ./oaisim ./oaisim.rel10.itti;')
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -44,28 +44,29 @@ NUM_UE=2
NUM_eNB=1
NUM_TRIALS=3
def execute(oai, user, pw, logfile):
def execute(oai, user, pw, logfile,logdir):
case = '02'
logs_dir = 'pre-ci-logs';
oai.send('cd $OPENAIR_TARGETS;')
oai.send('cd SIMU/USER;')
oai.send('mkdir ' + logs_dir + ';')
try:
test = '00'
name = 'Run oai.rel8.sf'
conf = '-a -A AWGN -n 100'
diag = 'OAI is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_1.txt'
trace = logdir + '/log_' + case + test + '_1.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./oaisim.rel8 ' + conf + tee, 'Segmentation fault', 30)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_2.txt'
trace = logdir + '/log_' + case + test + '_2.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./oaisim.rel8 ' + conf + tee, 'Exiting', 30)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_3.txt'
trace = logdir + '/log_' + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./oaisim.rel8 ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -73,7 +74,8 @@ def execute(oai, user, pw, logfile):
test = '01'
name = 'Run oai.rel8.err'
conf = '-a -A AWGN -n 100'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt'
trace = logdir + '/log_' + case + test + '_3.txt;'
tee = ' 2>&1 | tee ' + trace
diag = 'Error(s) found in the execution, check the execution logs'
oai.send_expect_false('./oaisim.rel8 ' + conf, '[E]', 30)
......@@ -89,10 +91,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-a -A AWGN -n' + str((i+1+j) * 40) + ' -u' + str(i+1) +' -b'+ str(j+1)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 50)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -104,7 +107,8 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-a -A AWGN -u' + str(i+1) +' -b'+ str(j+1)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
if user == 'root' :
oai.send_nowait('./oaisim.rel8.nas ' + conf + ' > /dev/null &')
else :
......@@ -124,7 +128,7 @@ def execute(oai, user, pw, logfile):
oai.rm_driver(oai,user,pw)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -135,10 +139,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-A AWGN -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -s15 -x1'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -149,10 +154,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-A AWGN -F -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -s15 -x1'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel8 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -163,10 +169,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-a -A AWGN -n' + str((i+1+j) * 40) + ' -u' + str(i+1) +' -b'+ str(j+1)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel8.itti ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 50)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......
......@@ -44,28 +44,29 @@ NUM_UE=2
NUM_eNB=1
NUM_TRIALS=3
def execute(oai, user, pw, logfile):
def execute(oai, user, pw, logfile,logdir):
case = '03'
logs_dir = 'pre-ci-logs';
oai.send('cd $OPENAIR_TARGETS;')
oai.send('cd SIMU/USER;')
oai.send('mkdir ' + logs_dir + ';')
try:
test = '00'
name = 'Run oai.rel10.sf'
conf = '-a -A AWGN -n 100'
diag = 'OAI is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_1.txt'
trace = logdir + '/log_' + case + test + '_1.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./oaisim.rel10 ' + conf + tee, 'Segmentation fault', 30)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_2.txt'
trace = logdir + '/log_' + case + test + '_2.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./oaisim.rel10 ' + conf + tee, 'Exiting', 30)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_3.txt'
trace = logdir + '/log_' + case + test + '_3.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect_false('./oaisim.rel10 ' + conf + tee, 'FATAL', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, di69ag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -73,12 +74,13 @@ def execute(oai, user, pw, logfile):
test = '01'
name = 'Run oai.rel10.err'
conf = '-a -A AWGN -n 100'
tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt'
trace = logdir + '/log_' + case + test + '.txt'
tee = ' 2>&1 | tee ' + trace
diag = 'Error(s) found in the execution, check the execution logs'
oai.send_expect_false('./oaisim.rel10 ' + conf + tee, '[E]', 30)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -89,10 +91,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-a -A AWGN -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -103,10 +106,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-A AWGN -s 15 -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -117,10 +121,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-A AWGN -F -s 15 -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else:
log.ok(case, test, name, conf, '', logfile)
......@@ -131,10 +136,11 @@ def execute(oai, user, pw, logfile):
for i in range(NUM_UE) :
for j in range(NUM_eNB) :
conf = '-A AWGN -s 15 -x 1 -Q3 -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1)
tee = ' | tee ' + logs_dir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
trace = logdir + '/log_' + case + test + '_' + str(i) + str(j) + '.txt'
tee = ' 2>&1 | tee ' + trace
oai.send_expect('./oaisim.rel10 ' + conf + tee, ' Found MBSFNAreaConfiguration from eNB ' + str(j), (i+1) * 100)
except log.err, e:
log.fail(case, test, name, conf, e.value, diag, logfile)
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
else: