Merge branch 'feature-34-test_framework' into develop
This commit is contained in:
@@ -88,7 +88,22 @@ Obj.# Case# Test# Description
|
|||||||
01 51 06 mbmssim (TBD)
|
01 51 06 mbmssim (TBD)
|
||||||
|
|
||||||
|
|
||||||
01 55 lte-softmodem tests
|
01 55 lte-softmodem tests with ALU EPC w/ Bandrich COTS UE
|
||||||
|
01 55 00 FDD 5MHz UL Throughput for 60 sec
|
||||||
|
01 55 00 FDD 10MHz UL Throughput for 60 sec
|
||||||
|
01 55 00 FDD 20MHz UL Throughput for 60 sec
|
||||||
|
01 55 00 FDD 5MHz DL Throughput for 60 sec
|
||||||
|
01 55 00 FDD 10MHz DL Throughput for 60 sec
|
||||||
|
01 55 00 FDD 20MHz DL Throughput for 60 sec
|
||||||
|
|
||||||
|
|
||||||
|
01 56 lte-softmodem tests with OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
|
||||||
|
|
||||||
|
|
||||||
|
01 57 lte-softmodem tests with OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
|
||||||
|
|
||||||
|
|
||||||
|
01 58 lte-softmodem-noS1 tests
|
||||||
|
|
||||||
02 Functional test case
|
02 Functional test case
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,15 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
trap handle_ctrl_c INT
|
||||||
|
|
||||||
source $OPENAIR_DIR/cmake_targets/tools/test_helper
|
source $OPENAIR_DIR/cmake_targets/tools/test_helper
|
||||||
|
|
||||||
|
|
||||||
#SUDO="sudo -E "
|
#SUDO="sudo -E "
|
||||||
tdir=$OPENAIR_DIR/cmake_targets/autotests
|
tdir=$OPENAIR_DIR/cmake_targets/autotests
|
||||||
rm -fr $tdir/bin $tdir/log
|
rm -fr $tdir/bin
|
||||||
mkdir -p $tdir/bin $tdir/log
|
mkdir -p $tdir/bin
|
||||||
results_file="$tdir/log/results_autotests.xml"
|
results_file="$tdir/log/results_autotests.xml"
|
||||||
|
|
||||||
updated=$(svn st -q $OPENAIR_DIR)
|
updated=$(svn st -q $OPENAIR_DIR)
|
||||||
@@ -36,7 +39,7 @@ cd $tdir
|
|||||||
#\param $12 -> class of the test case (compilation, execution)
|
#\param $12 -> class of the test case (compilation, execution)
|
||||||
#\param $13 -> output of compilation program that needs to be found for test case to pass
|
#\param $13 -> output of compilation program that needs to be found for test case to pass
|
||||||
#\param $14 -> tags to help identify the test case for readability in output xml file
|
#\param $14 -> tags to help identify the test case for readability in output xml file
|
||||||
test_compile() {
|
function test_compile() {
|
||||||
|
|
||||||
xUnit_start
|
xUnit_start
|
||||||
test_case_name=$1
|
test_case_name=$1
|
||||||
@@ -130,8 +133,9 @@ test_compile() {
|
|||||||
#\param $12 -> class of the test case (compilation, execution)
|
#\param $12 -> class of the test case (compilation, execution)
|
||||||
#\param $13 -> output of compilation program that needs to be found for test case to pass
|
#\param $13 -> output of compilation program that needs to be found for test case to pass
|
||||||
#\param $14 -> tags to help identify the test case for readability in output xml file
|
#\param $14 -> tags to help identify the test case for readability in output xml file
|
||||||
|
#\param $15 => password for the user to run certain commands as sudo
|
||||||
|
|
||||||
test_compile_and_run() {
|
function test_compile_and_run() {
|
||||||
xUnit_start
|
xUnit_start
|
||||||
test_case_name=$1
|
test_case_name=$1
|
||||||
log_dir=$tdir/log
|
log_dir=$tdir/log
|
||||||
@@ -149,16 +153,13 @@ test_compile_and_run() {
|
|||||||
class=${12}
|
class=${12}
|
||||||
compile_prog_out=${13}
|
compile_prog_out=${13}
|
||||||
tags=${14}
|
tags=${14}
|
||||||
|
mypassword=${15}
|
||||||
build_dir=$tdir/$1/build
|
build_dir=$tdir/$1/build
|
||||||
exec_file=$build_dir/$6
|
exec_file=$build_dir/$6
|
||||||
|
|
||||||
#Temporary log file where execution log is stored.
|
#Temporary log file where execution log is stored.
|
||||||
temp_exec_log=$log_dir/temp_log.txt
|
temp_exec_log=$log_dir/temp_log.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#echo "log_dir = $log_dir"
|
#echo "log_dir = $log_dir"
|
||||||
#echo "log_file = $log_file"
|
#echo "log_file = $log_file"
|
||||||
#echo "exec_file = $exec_file"
|
#echo "exec_file = $exec_file"
|
||||||
@@ -217,7 +218,8 @@ test_compile_and_run() {
|
|||||||
echo "<EXECUTION LOG Run = $run_index >" >> $log_file 2>&1
|
echo "<EXECUTION LOG Run = $run_index >" >> $log_file 2>&1
|
||||||
|
|
||||||
if [ -n "$pre_exec_file" ]; then
|
if [ -n "$pre_exec_file" ]; then
|
||||||
{ eval "source $pre_exec_file $pre_exec_args"; } >> $log_file 2>&1
|
{ eval " echo '$mypassword' |sudo -S -E $pre_exec_file $pre_exec_args " ; }>> $log_file 2>&1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo "Executing $exec_file $main_exec_args_array_index "
|
echo "Executing $exec_file $main_exec_args_array_index "
|
||||||
echo "Executing $exec_file $main_exec_args_array_index " >> $log_file
|
echo "Executing $exec_file $main_exec_args_array_index " >> $log_file
|
||||||
@@ -275,34 +277,14 @@ test_compile_and_run() {
|
|||||||
let "tags_array_index++"
|
let "tags_array_index++"
|
||||||
done # End of for loop (nindex)
|
done # End of for loop (nindex)
|
||||||
fi
|
fi
|
||||||
|
rm -fr $build_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
dbin=$OPENAIR_DIR/cmake_targets/autotests/bin
|
dbin=$OPENAIR_DIR/cmake_targets/autotests/bin
|
||||||
dlog=$OPENAIR_DIR/cmake_targets/autotests/log
|
dlog=$OPENAIR_DIR/cmake_targets/autotests/log
|
||||||
|
|
||||||
run_test() {
|
|
||||||
case=case$1; shift
|
|
||||||
cmd=$1; shift
|
|
||||||
expected=$3; shift
|
|
||||||
echo "expected = $expected"
|
|
||||||
exit
|
|
||||||
|
|
||||||
$cmd > $dlog/$case.txt 2>&1
|
function print_help() {
|
||||||
if [ $expected = "true" ] ; then
|
|
||||||
if $* $dlog/$case.txt; then
|
|
||||||
echo_success "test $case, command: $cmd ok"
|
|
||||||
else
|
|
||||||
echo_error "test $case, command: $cmd Failed"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if $* $dlog/$case.txt; then
|
|
||||||
echo_error "test $case, command: $cmd Failed"
|
|
||||||
else
|
|
||||||
echo_success "test $case, command: $cmd ok"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
print_help() {
|
|
||||||
echo_info '
|
echo_info '
|
||||||
This program runs automated test case system for OpenAirInterface
|
This program runs automated test case system for OpenAirInterface
|
||||||
You should have ubuntu 14.xx, updated, and the Linux kernel >= 3.14
|
You should have ubuntu 14.xx, updated, and the Linux kernel >= 3.14
|
||||||
@@ -314,11 +296,13 @@ Options
|
|||||||
'
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
main () {
|
function main () {
|
||||||
RUN_GROUP=0
|
RUN_GROUP=0
|
||||||
test_case_group=""
|
test_case_group=""
|
||||||
test_case_group_array=()
|
test_case_group_array=()
|
||||||
test_case_array=()
|
test_case_array=()
|
||||||
|
echo_info "Note that the user should be sudoer for executing certain commands, for example loading kernel modules"
|
||||||
|
read -s -p "Enter Password: " mypassword
|
||||||
|
|
||||||
until [ -z "$1" ]
|
until [ -z "$1" ]
|
||||||
do
|
do
|
||||||
@@ -421,9 +405,9 @@ for search_expr in "${test_case_array[@]}"
|
|||||||
if [ "$class" == "compilation" ]; then
|
if [ "$class" == "compilation" ]; then
|
||||||
test_compile "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags"
|
test_compile "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags"
|
||||||
elif [ "$class" == "execution" ]; then
|
elif [ "$class" == "execution" ]; then
|
||||||
test_compile_and_run "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags"
|
test_compile_and_run "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags" "$mypassword"
|
||||||
else
|
else
|
||||||
echo "Unexpected class of test case...Exiting...."
|
echo "Unexpected class of test case...Skipping the test case $name ...."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,13 @@
|
|||||||
<testCaseList>
|
<testCaseList>
|
||||||
|
|
||||||
<MachineList>mozart stevens calisson nano amerique</MachineList>
|
<MachineList>amerique stevens calisson nano</MachineList>
|
||||||
<NFSResultsShare>/mnt/sradio/TEST_RESULTS</NFSResultsShare>
|
<NFSResultsShare>/mnt/sradio/TEST_RESULTS</NFSResultsShare>
|
||||||
<GitOAI5GRepo>https://gitlab.eurecom.fr/oai/openairinterface5g.git</GitOAI5GRepo>
|
<GitOAI5GRepo>https://gitlab.eurecom.fr/oai/openairinterface5g.git</GitOAI5GRepo>
|
||||||
<GitOpenair-cnRepo>https://gitlab.eurecom.fr/oai/openair-cn.git</GitOpenair-cnRepo>
|
<GitOpenair-cnRepo>https://gitlab.eurecom.fr/oai/openair-cn.git</GitOpenair-cnRepo>
|
||||||
<GitOAI5GRepoBranch>feature-34-test_framework</GitOAI5GRepoBranch>
|
<GitOAI5GRepoBranch>feature-34-test_framework</GitOAI5GRepoBranch>
|
||||||
<GitOpenair-cnRepoBranch>develop</GitOpenair-cnRepoBranch>
|
<GitOpenair-cnRepoBranch>feature-17-test_framework</GitOpenair-cnRepoBranch>
|
||||||
<CleanUpOldProgs>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox* </CleanUpOldProgs>
|
<CleanUpOldProgs>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* hss hss_sim configure_cots_bandrich_ue* wvdial* </CleanUpOldProgs>
|
||||||
|
<CleanUpAluLteBox>/opt/ltebox/tools/stop_ltebox</CleanUpAluLteBox>
|
||||||
|
|
||||||
<testCase id="010101" >
|
<testCase id="010101" >
|
||||||
<class>compilation</class>
|
<class>compilation</class>
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
|
|
||||||
<testCase id="010102" >
|
<testCase id="010102" >
|
||||||
<class>compilation</class>
|
<class>compilation</class>
|
||||||
<desc>Build oaisim.Rel8 + network device driver(nasmesh_fix)</desc>
|
<desc>Build oaisim.Rel8 + network device driver(nasmesh_fix)</desc>
|
||||||
<pre_compile_prog></pre_compile_prog>
|
<pre_compile_prog></pre_compile_prog>
|
||||||
<compile_prog>oaisim_nos1</compile_prog>
|
<compile_prog>oaisim_nos1</compile_prog>
|
||||||
<compile_prog_args></compile_prog_args>
|
<compile_prog_args></compile_prog_args>
|
||||||
@@ -750,63 +751,232 @@
|
|||||||
<desc></desc>
|
<desc></desc>
|
||||||
<eNB>calisson</eNB>
|
<eNB>calisson</eNB>
|
||||||
<UE>stevens</UE>
|
<UE>stevens</UE>
|
||||||
<EPC>nano</EPC>
|
<EPC>amerique</EPC>
|
||||||
<cleanupScript>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox*</cleanupScript>
|
<cleanupScript>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox*</cleanupScript>
|
||||||
<TimeOut_cmd>300</TimeOut_cmd>
|
<TimeOut_cmd>60</TimeOut_cmd>
|
||||||
|
|
||||||
<eNB_working_dir>/tmp</eNB_working_dir>
|
<eNB_working_dir>/tmp</eNB_working_dir>
|
||||||
<eNB_config_file>$OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code 1
|
<eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\"
|
||||||
$OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code 208
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\"
|
||||||
$OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code 95</eNB_config_file>
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\"
|
||||||
<eNB_pre_compile_prog></eNB_pre_compile_prog>
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\"
|
||||||
<eNB_pre_compile_prog_args></eNB_pre_compile_prog_args>
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\"
|
||||||
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai </eNB_compile_prog>
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";"</eNB_config_file>
|
||||||
|
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||||
<eNB_compile_prog_args>--eNB -w USRP</eNB_compile_prog_args>
|
<eNB_compile_prog_args>--eNB -w USRP</eNB_compile_prog_args>
|
||||||
<eNB_pre_exec>iperf </eNB_pre_exec>
|
<eNB_pre_exec></eNB_pre_exec>
|
||||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||||
<eNB_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
<eNB_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||||
<eNB_main_exec_args></eNB_main_exec_args>
|
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf </eNB_main_exec_args>
|
||||||
|
<eNB_traffic_exec>iperf -s</eNB_traffic_exec>
|
||||||
|
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||||
<eNB_search_expr_true></eNB_search_expr_true>
|
<eNB_search_expr_true></eNB_search_expr_true>
|
||||||
<eNB_search_expr_false></eNB_search_expr_false>
|
<eNB_search_expr_false></eNB_search_expr_false>
|
||||||
|
<eNB_terminate_missing_procs>True</eNB_terminate_missing_procs>
|
||||||
|
|
||||||
<UE_working_dir>/tmp</UE_working_dir>
|
<UE_working_dir>/tmp</UE_working_dir>
|
||||||
<UE_pre_compile_prog></UE_pre_compile_prog>
|
<UE_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"4\"
|
||||||
<UE_pre_compile_prog_args></UE_pre_compile_prog_args>
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"5\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"6\"</UE_config_file>
|
||||||
<UE_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</UE_compile_prog>
|
<UE_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</UE_compile_prog>
|
||||||
<UE_compile_prog_args>--eNB -w USRP</UE_compile_prog_args>
|
<UE_compile_prog_args>--eNB -w USRP</UE_compile_prog_args>
|
||||||
<UE_pre_exec>iperf </UE_pre_exec>
|
<UE_pre_exec></UE_pre_exec>
|
||||||
<UE_pre_exec_args></UE_pre_exec_args>
|
<UE_pre_exec_args></UE_pre_exec_args>
|
||||||
<UE_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</UE_main_exec>
|
<UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
|
||||||
<UE_main_exec_args></UE_main_exec_args>
|
|
||||||
<UE_search_expr_true></UE_search_expr_true>
|
|
||||||
<UE_search_expr_false></UE_search_expr_false>
|
|
||||||
|
|
||||||
<UE_working_dir>/tmp</UE_working_dir>
|
|
||||||
<UE_pre_compile_prog></UE_pre_compile_prog>
|
|
||||||
<UE_pre_compile_prog_args></UE_pre_compile_prog_args>
|
|
||||||
<UE_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</UE_compile_prog>
|
|
||||||
<UE_compile_prog_args>--eNB -w USRP</UE_compile_prog_args>
|
|
||||||
<UE_pre_exec>iperf </UE_pre_exec>
|
|
||||||
<UE_pre_exec_args></UE_pre_exec_args>
|
|
||||||
<UE_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</UE_main_exec>
|
|
||||||
<UE_main_exec_args></UE_main_exec_args>
|
<UE_main_exec_args></UE_main_exec_args>
|
||||||
|
<UE_traffic_exec>ping 192.172.0.1</UE_traffic_exec>
|
||||||
|
<UE_traffic_exec_args></UE_traffic_exec_args>
|
||||||
<UE_search_expr_true></UE_search_expr_true>
|
<UE_search_expr_true></UE_search_expr_true>
|
||||||
<UE_search_expr_false></UE_search_expr_false>
|
<UE_search_expr_false></UE_search_expr_false>
|
||||||
|
<UE_terminate_missing_procs>True</UE_terminate_missing_procs>
|
||||||
|
|
||||||
<EPC_working_dir>/tmp</EPC_working_dir>
|
<EPC_working_dir>/tmp</EPC_working_dir>
|
||||||
<EPC_pre_compile_prog></EPC_pre_compile_prog>
|
<EPC_config_file>BUILD/EPC/epc.local.enb.conf.in MCC \"208\"
|
||||||
<EPC_pre_compile_prog_args></EPC_pre_compile_prog_args>
|
BUILD/EPC/epc.local.enb.conf.in MNC \"92\"
|
||||||
<EPC_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</EPC_compile_prog>
|
BUILD/EPC/epc.local.enb.conf.in TAC \"1\"
|
||||||
<EPC_compile_prog_args>--eNB -w USRP</EPC_compile_prog_args>
|
BUILD/EPC/epc.local.enb.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\"
|
||||||
<EPC_pre_exec>iperf </EPC_pre_exec>
|
BUILD/EPC/epc.local.enb.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" </EPC_config_file>
|
||||||
|
<EPC_compile_prog>SCRIPTS/build_epc</EPC_compile_prog>
|
||||||
|
<EPC_compile_prog_args>-c -l</EPC_compile_prog_args>
|
||||||
|
<HSS_compile_prog>SCRIPTS/build_hss</HSS_compile_prog>
|
||||||
|
<HSS_compile_prog_args> -c -l </HSS_compile_prog_args>
|
||||||
|
|
||||||
|
<EPC_pre_exec></EPC_pre_exec>
|
||||||
<EPC_pre_exec_args></EPC_pre_exec_args>
|
<EPC_pre_exec_args></EPC_pre_exec_args>
|
||||||
<EPC_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</EPC_main_exec>
|
<EPC_main_exec>/opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000</EPC_main_exec>
|
||||||
<EPC_main_exec_args></EPC_main_exec_args>
|
<EPC_main_exec_args></EPC_main_exec_args>
|
||||||
|
<HSS_main_exec>/opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 </HSS_main_exec>
|
||||||
|
<HSS_main_exec_args></HSS_main_exec_args>
|
||||||
|
<EPC_traffic_exec>iperf -s</EPC_traffic_exec>
|
||||||
|
<EPC_traffic_exec_args></EPC_traffic_exec_args>
|
||||||
<EPC_search_expr_true></EPC_search_expr_true>
|
<EPC_search_expr_true></EPC_search_expr_true>
|
||||||
<EPC_search_expr_false></EPC_search_expr_false>
|
<EPC_search_expr_false></EPC_search_expr_false>
|
||||||
<nruns>2</nruns>
|
<EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
|
||||||
|
|
||||||
|
<nruns>3</nruns>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="015600" >
|
||||||
|
<class>lte-softmodem</class>
|
||||||
|
<desc></desc>
|
||||||
|
<eNB>calisson</eNB>
|
||||||
|
<UE>stevens</UE>
|
||||||
|
<EPC>nano</EPC>
|
||||||
|
<cleanupScript>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox*</cleanupScript>
|
||||||
|
<TimeOut_cmd>60</TimeOut_cmd>
|
||||||
|
<eNB_working_dir>/tmp</eNB_working_dir>
|
||||||
|
<eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";"</eNB_config_file>
|
||||||
|
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||||
|
<eNB_compile_prog_args>--eNB -w USRP</eNB_compile_prog_args>
|
||||||
|
<eNB_pre_exec></eNB_pre_exec>
|
||||||
|
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||||
|
<eNB_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||||
|
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf </eNB_main_exec_args>
|
||||||
|
<eNB_traffic_exec>iperf -s</eNB_traffic_exec>
|
||||||
|
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||||
|
<eNB_search_expr_true></eNB_search_expr_true>
|
||||||
|
<eNB_search_expr_false></eNB_search_expr_false>
|
||||||
|
<eNB_terminate_missing_procs>True</eNB_terminate_missing_procs>
|
||||||
|
|
||||||
|
<UE_working_dir>/tmp</UE_working_dir>
|
||||||
|
<UE_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\"</UE_config_file>
|
||||||
|
<UE_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</UE_compile_prog>
|
||||||
|
<UE_compile_prog_args>--eNB -w USRP</UE_compile_prog_args>
|
||||||
|
<UE_pre_exec></UE_pre_exec>
|
||||||
|
<UE_pre_exec_args></UE_pre_exec_args>
|
||||||
|
<UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
|
||||||
|
<UE_main_exec_args></UE_main_exec_args>
|
||||||
|
<UE_traffic_exec>ping 192.172.0.1</UE_traffic_exec>
|
||||||
|
<UE_traffic_exec_args></UE_traffic_exec_args>
|
||||||
|
<UE_search_expr_true></UE_search_expr_true>
|
||||||
|
<UE_search_expr_false></UE_search_expr_false>
|
||||||
|
<UE_terminate_missing_procs>True</UE_terminate_missing_procs>
|
||||||
|
|
||||||
|
<EPC_working_dir>/tmp</EPC_working_dir>
|
||||||
|
<EPC_config_file>BUILD/EPC/epc.local.enb.conf.in MCC \"208\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in MNC \"92\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in TAC \"1\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\"
|
||||||
|
BUILD/EPC/epc.conf.in MCC \"208\"
|
||||||
|
BUILD/EPC/epc.conf.in MNC \"92\"
|
||||||
|
BUILD/EPC/epc.conf.in TAC \"1\"
|
||||||
|
BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\"
|
||||||
|
BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\"
|
||||||
|
BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\"
|
||||||
|
BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"
|
||||||
|
BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\"</EPC_config_file>
|
||||||
|
<EPC_compile_prog>SCRIPTS/build_epc</EPC_compile_prog>
|
||||||
|
<EPC_compile_prog_args>-c -l</EPC_compile_prog_args>
|
||||||
|
<HSS_compile_prog>SCRIPTS/build_hss</HSS_compile_prog>
|
||||||
|
<HSS_compile_prog_args> -c </HSS_compile_prog_args>
|
||||||
|
|
||||||
|
<EPC_pre_exec></EPC_pre_exec>
|
||||||
|
<EPC_pre_exec_args></EPC_pre_exec_args>
|
||||||
|
<EPC_main_exec>/SCRIPTS/run_epc -g </EPC_main_exec>
|
||||||
|
<EPC_main_exec_args></EPC_main_exec_args>
|
||||||
|
<HSS_main_exec>/SCRIPTS/run_hss -g </HSS_main_exec>
|
||||||
|
<HSS_main_exec_args></HSS_main_exec_args>
|
||||||
|
<EPC_traffic_exec>iperf -s</EPC_traffic_exec>
|
||||||
|
<EPC_traffic_exec_args></EPC_traffic_exec_args>
|
||||||
|
<EPC_search_expr_true></EPC_search_expr_true>
|
||||||
|
<EPC_search_expr_false></EPC_search_expr_false>
|
||||||
|
<EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
|
||||||
|
<nruns>2</nruns>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
|
||||||
|
<testCase id="015700" >
|
||||||
|
<class>lte-softmodem</class>
|
||||||
|
<desc></desc>
|
||||||
|
<eNB>calisson</eNB>
|
||||||
|
<UE>stevens</UE>
|
||||||
|
<EPC>calisson</EPC>
|
||||||
|
<cleanupScript>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox*</cleanupScript>
|
||||||
|
<TimeOut_cmd>60</TimeOut_cmd>
|
||||||
|
<eNB_working_dir>/tmp</eNB_working_dir>
|
||||||
|
<eNB_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf N_RB_DL 50
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";"</eNB_config_file>
|
||||||
|
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||||
|
<eNB_compile_prog_args>--eNB -w USRP</eNB_compile_prog_args>
|
||||||
|
<eNB_pre_exec></eNB_pre_exec>
|
||||||
|
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||||
|
<eNB_main_exec>$OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||||
|
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf </eNB_main_exec_args>
|
||||||
|
<eNB_traffic_exec></eNB_traffic_exec>
|
||||||
|
<eNB_traffic_exec_args></eNB_traffic_exec_args>
|
||||||
|
<eNB_search_expr_true></eNB_search_expr_true>
|
||||||
|
<eNB_search_expr_false></eNB_search_expr_false>
|
||||||
|
<eNB_terminate_missing_procs>True</eNB_terminate_missing_procs>
|
||||||
|
|
||||||
|
<UE_working_dir>/tmp</UE_working_dir>
|
||||||
|
<UE_config_file>targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\"
|
||||||
|
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\"</UE_config_file>
|
||||||
|
<UE_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</UE_compile_prog>
|
||||||
|
<UE_compile_prog_args>--eNB -w USRP</UE_compile_prog_args>
|
||||||
|
<UE_pre_exec></UE_pre_exec>
|
||||||
|
<UE_pre_exec_args></UE_pre_exec_args>
|
||||||
|
<UE_main_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue </UE_main_exec>
|
||||||
|
<UE_main_exec_args></UE_main_exec_args>
|
||||||
|
<UE_traffic_exec>ping 192.172.0.1</UE_traffic_exec>
|
||||||
|
<UE_traffic_exec_args></UE_traffic_exec_args>
|
||||||
|
<UE_search_expr_true></UE_search_expr_true>
|
||||||
|
<UE_search_expr_false></UE_search_expr_false>
|
||||||
|
<UE_terminate_missing_procs>True</UE_terminate_missing_procs>
|
||||||
|
|
||||||
|
<EPC_working_dir>/tmp</EPC_working_dir>
|
||||||
|
<EPC_config_file>BUILD/EPC/epc.local.enb.conf.in MCC \"208\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in MNC \"92\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in TAC \"1\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\"
|
||||||
|
BUILD/EPC/epc.local.enb.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\"
|
||||||
|
BUILD/EPC/epc.conf.in MCC \"208\"
|
||||||
|
BUILD/EPC/epc.conf.in MNC \"92\"
|
||||||
|
BUILD/EPC/epc.conf.in TAC \"1\"
|
||||||
|
BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\"
|
||||||
|
BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\"
|
||||||
|
BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\"
|
||||||
|
BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"
|
||||||
|
BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\"</EPC_config_file>
|
||||||
|
<EPC_compile_prog>SCRIPTS/build_epc</EPC_compile_prog>
|
||||||
|
<EPC_compile_prog_args>-c -l</EPC_compile_prog_args>
|
||||||
|
<HSS_compile_prog>SCRIPTS/build_hss</HSS_compile_prog>
|
||||||
|
<HSS_compile_prog_args> -c -l </HSS_compile_prog_args>
|
||||||
|
|
||||||
|
<EPC_pre_exec></EPC_pre_exec>
|
||||||
|
<EPC_pre_exec_args></EPC_pre_exec_args>
|
||||||
|
<EPC_main_exec>SCRIPTS/run_epc -l </EPC_main_exec>
|
||||||
|
<EPC_main_exec_args></EPC_main_exec_args>
|
||||||
|
<HSS_main_exec>SCRIPTS/run_hss </HSS_main_exec>
|
||||||
|
<HSS_main_exec_args></HSS_main_exec_args>
|
||||||
|
<EPC_traffic_exec>iperf -s</EPC_traffic_exec>
|
||||||
|
<EPC_traffic_exec_args></EPC_traffic_exec_args>
|
||||||
|
<EPC_search_expr_true></EPC_search_expr_true>
|
||||||
|
<EPC_search_expr_false></EPC_search_expr_false>
|
||||||
|
<EPC_terminate_missing_procs>True</EPC_terminate_missing_procs>
|
||||||
|
|
||||||
|
<nruns>2</nruns>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
</testCaseList>
|
</testCaseList>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+146
@@ -0,0 +1,146 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import time
|
||||||
|
import serial
|
||||||
|
import os
|
||||||
|
from pyroute2 import IPRoute
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
import threading
|
||||||
|
import signal
|
||||||
|
import traceback
|
||||||
|
import os
|
||||||
|
|
||||||
|
# configure the serial connections (the parameters differs on the device you are connecting to)
|
||||||
|
#First we find an open port to work with
|
||||||
|
serial_port=''
|
||||||
|
ser=serial.Serial()
|
||||||
|
def find_open_port():
|
||||||
|
global serial_port, ser
|
||||||
|
max_ports=100
|
||||||
|
if os.path.exists(serial_port) == True:
|
||||||
|
return serial_port
|
||||||
|
for port in range(2,100):
|
||||||
|
serial_port = '/dev/ttyUSB'+str(port)
|
||||||
|
if os.path.exists(serial_port) == True:
|
||||||
|
print 'New Serial Port : ' + serial_port
|
||||||
|
break
|
||||||
|
|
||||||
|
ser = serial.Serial(port=serial_port)
|
||||||
|
return
|
||||||
|
|
||||||
|
find_open_port()
|
||||||
|
print 'Using Serial port : ' + serial_port
|
||||||
|
|
||||||
|
#serial_port = '/dev/ttyUSB2'
|
||||||
|
bandrich_ppd_config = '$OPENAIR_DIR/cmake_targets/autotests/tools/wdial.bandrich.conf'
|
||||||
|
|
||||||
|
exit_flag=0
|
||||||
|
|
||||||
|
def signal_handler(signal, frame):
|
||||||
|
print('You pressed Ctrl+C!')
|
||||||
|
print('Resetting the UE to detached state')
|
||||||
|
timeout=10
|
||||||
|
exit_flag=1
|
||||||
|
send_command('AT+CGATT=0' , 'OK' , timeout)
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
signal.signal(signal.SIGINT, signal_handler)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ser.open()
|
||||||
|
#ser.isOpen()
|
||||||
|
|
||||||
|
class pppThread (threading.Thread):
|
||||||
|
def __init__(self, threadID, name, counter):
|
||||||
|
threading.Thread.__init__(self)
|
||||||
|
self.threadID = threadID
|
||||||
|
self.name = name
|
||||||
|
self.counter = counter
|
||||||
|
def run(self):
|
||||||
|
print "Starting " + self.name
|
||||||
|
#Here we keep running pppd thread in indefinite loop as this script terminates sometimes
|
||||||
|
#while 1:
|
||||||
|
while 1:
|
||||||
|
time.sleep(5) #Hard coded, do not reduce this number!
|
||||||
|
print "Starting wvdial now..."
|
||||||
|
print 'exit_flag = ' + str(exit_flag)
|
||||||
|
send_command('AT+CGATT=1','OK', 300)
|
||||||
|
os.system('wvdial -C ' + bandrich_ppd_config + '' )
|
||||||
|
if exit_flag == 1:
|
||||||
|
print "Exit flag set to true. Exiting pppThread now"
|
||||||
|
print "Terminating wvdial now..."
|
||||||
|
|
||||||
|
def send_command (cmd, response, timeout):
|
||||||
|
count=0
|
||||||
|
sleep_duration = 1
|
||||||
|
print 'In function: send_command: cmd = <' + cmd + '> response: <' + response + '> \n'
|
||||||
|
global serial_port, ser
|
||||||
|
while count <= timeout:
|
||||||
|
try:
|
||||||
|
#Sometimes the port does not exist coz of reset in modem.
|
||||||
|
#In that case, we need to search for this port again
|
||||||
|
if os.path.exists(serial_port) == False:
|
||||||
|
find_open_port()
|
||||||
|
ser.write (cmd + '\r\n')
|
||||||
|
out = ''
|
||||||
|
time.sleep(sleep_duration)
|
||||||
|
count = count + sleep_duration
|
||||||
|
while ser.inWaiting() > 0:
|
||||||
|
out += ser.read(1)
|
||||||
|
print 'out = <' + out + '> response = <' + response + '> \n'
|
||||||
|
if re.search(response, out):
|
||||||
|
break
|
||||||
|
except Exception, e:
|
||||||
|
error = ' cmd : ' + cmd + ' response : ' + response
|
||||||
|
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||||
|
error = error + traceback.format_exc()
|
||||||
|
print error
|
||||||
|
|
||||||
|
|
||||||
|
def start_ue () :
|
||||||
|
#print 'Enter your commands below.\r\nInsert "exit" to leave the application.'
|
||||||
|
timeout=60 #timeout in seconds
|
||||||
|
send_command('AT', 'OK' , timeout)
|
||||||
|
send_command('AT+CGATT=0' , 'OK' , timeout)
|
||||||
|
send_command('AT+CGATT=1','OK', 300)
|
||||||
|
#os.system('wvdial -C ' + bandrich_ppd_config + ' &' )
|
||||||
|
|
||||||
|
thread_ppp = pppThread(1, "ppp_thread", 1)
|
||||||
|
thread_ppp.start()
|
||||||
|
|
||||||
|
iface='ppp0'
|
||||||
|
|
||||||
|
while 1:
|
||||||
|
time.sleep ( 2)
|
||||||
|
#Now we check if ppp0 interface is up and running
|
||||||
|
try:
|
||||||
|
if exit_flag == 1:
|
||||||
|
break
|
||||||
|
ip = IPRoute()
|
||||||
|
idx = ip.link_lookup(ifname=iface)[0]
|
||||||
|
os.system ('route add 192.172.0.1 ppp0')
|
||||||
|
break
|
||||||
|
except Exception, e:
|
||||||
|
error = ' Interface ' + iface + 'does not exist...'
|
||||||
|
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||||
|
error = error + traceback.format_exc()
|
||||||
|
print error
|
||||||
|
|
||||||
|
thread_ppp.join()
|
||||||
|
|
||||||
|
def stop_ue():
|
||||||
|
timeout=60
|
||||||
|
os.system('killall wvdial')
|
||||||
|
send_command('AT', 'OK' , timeout)
|
||||||
|
send_command('AT+CGATT=0' , 'OK' , timeout)
|
||||||
|
|
||||||
|
for arg in sys.argv[1:]:
|
||||||
|
if arg == '--start-ue' :
|
||||||
|
start_ue()
|
||||||
|
elif arg == '--stop-ue' :
|
||||||
|
stop_ue()
|
||||||
|
else :
|
||||||
|
print " Script called with wrong arguments, arg = " + arg
|
||||||
|
sys.exit()
|
||||||
Executable
+35
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
|
||||||
|
#Arg 1 name of file
|
||||||
|
#Arg 2 keyword
|
||||||
|
#arg 3 replacement text
|
||||||
|
#Note that these should be seperated by spaces
|
||||||
|
if len(sys.argv) != 4:
|
||||||
|
print "search_repl.py: Wrong number of arguments. This program needs 3 arguments"
|
||||||
|
sys.exit()
|
||||||
|
filename = sys.argv[1]
|
||||||
|
keyword = sys.argv[2]
|
||||||
|
replacement_text = sys.argv[3]
|
||||||
|
|
||||||
|
file = open(filename, 'r')
|
||||||
|
string = file.read()
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
|
||||||
|
if keyword == 'mme_ip_address':
|
||||||
|
#string = (re.sub(r"mme_ip_address\s*=\s*\([^\$]+)\)\s*;\s*", r"<% tex \1 %>", t, re.M)
|
||||||
|
replacement_text = keyword + ' = ( { ' + replacement_text + ' } ) ; '
|
||||||
|
string = re.sub(r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M)
|
||||||
|
else :
|
||||||
|
replacement_text = keyword + ' = ' + replacement_text + ' ; '
|
||||||
|
string = re.sub(r"%s\s*=\s*([^\$]+?)\s*;" % keyword , replacement_text, string, re.M)
|
||||||
|
#else :
|
||||||
|
# replacement_text = keyword + ' =\"' + replacement_text + '\" ; '
|
||||||
|
# string = re.sub(r"%s\s*=\s*\"([^\$]+?)\"\s*;" % keyword , replacement_text, string, re.M)
|
||||||
|
|
||||||
|
file = open(filename, 'w')
|
||||||
|
file.write(string)
|
||||||
|
file.close()
|
||||||
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
[Dialer Defaults]
|
||||||
|
Modem = /dev/ttyUSB0
|
||||||
|
ISDN = off
|
||||||
|
Modem Type = Analog Modem
|
||||||
|
Baud = 9600
|
||||||
|
Init = ATZ
|
||||||
|
Init2 = AT+CPIN?
|
||||||
|
Init3 = AT+CGREG?
|
||||||
|
Init4 = AT+COPS?
|
||||||
|
Init5 = AT+CSQ
|
||||||
|
Init6 =
|
||||||
|
Init7 = AT+CGATT=1
|
||||||
|
Init8 =
|
||||||
|
Init9 =
|
||||||
|
Phone = *99***1#
|
||||||
|
Phone1 =
|
||||||
|
Phone2 =
|
||||||
|
Phone3 =
|
||||||
|
Phone4 =
|
||||||
|
Dial Prefix =
|
||||||
|
Dial Attempts = 1
|
||||||
|
Dial Command = ATM1L3DT
|
||||||
|
Ask Password = off
|
||||||
|
Password = ''
|
||||||
|
Username = ImaginLab
|
||||||
|
Auto Reconnect = off
|
||||||
|
Abort on Busy = off
|
||||||
|
Carrier Check = on
|
||||||
|
Check Def Route = on
|
||||||
|
Abort on No Dialtone = on
|
||||||
|
Stupid Mode = on
|
||||||
|
Idle Seconds = 0
|
||||||
|
Auto DNS = on
|
||||||
|
;Minimize = off
|
||||||
|
;Dock = off
|
||||||
|
;Do NOT edit this file by hand!
|
||||||
+13
-35
@@ -54,6 +54,8 @@ CFLAGS_PROCESSOR_USER=""
|
|||||||
RUN_GROUP=0
|
RUN_GROUP=0
|
||||||
TEST_CASE_GROUP=""
|
TEST_CASE_GROUP=""
|
||||||
|
|
||||||
|
trap handle_ctrl_c INT
|
||||||
|
|
||||||
function print_help() {
|
function print_help() {
|
||||||
echo_info '
|
echo_info '
|
||||||
This program installs OpenAirInterface Software
|
This program installs OpenAirInterface Software
|
||||||
@@ -80,8 +82,6 @@ Options
|
|||||||
Makes the LTE softmodem
|
Makes the LTE softmodem
|
||||||
--UE
|
--UE
|
||||||
Makes the UE specific parts (ue_ip, usim, nvram)
|
Makes the UE specific parts (ue_ip, usim, nvram)
|
||||||
--EPC
|
|
||||||
Makes the EPC (MME-SPGW, HSS)
|
|
||||||
--RRH
|
--RRH
|
||||||
Makes the RRH
|
Makes the RRH
|
||||||
-r | --3gpp-release
|
-r | --3gpp-release
|
||||||
@@ -116,8 +116,8 @@ Options
|
|||||||
|
|
||||||
Usage (first build):
|
Usage (first build):
|
||||||
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
|
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
|
||||||
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files
|
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files
|
||||||
NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files -w USRP
|
NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB -x --install-system-files -w USRP
|
||||||
Usage (Regular):
|
Usage (Regular):
|
||||||
oaisim : ./build_oai --oaisim -x
|
oaisim : ./build_oai --oaisim -x
|
||||||
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
|
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
|
||||||
@@ -159,10 +159,6 @@ function main() {
|
|||||||
UE=1
|
UE=1
|
||||||
echo_info "Will compile UE"
|
echo_info "Will compile UE"
|
||||||
shift;;
|
shift;;
|
||||||
--EPC)
|
|
||||||
EPC=1
|
|
||||||
echo_info "Will compile EPC"
|
|
||||||
shift;;
|
|
||||||
--RRH)
|
--RRH)
|
||||||
RRH=1
|
RRH=1
|
||||||
echo_info "Will compile RRH"
|
echo_info "Will compile RRH"
|
||||||
@@ -416,7 +412,7 @@ function main() {
|
|||||||
|
|
||||||
# EXMIMO drivers & firmware loader
|
# EXMIMO drivers & firmware loader
|
||||||
###############
|
###############
|
||||||
if [ "$HW" = "EXMIMO" -a "$EPC" = "0" ] ; then
|
if [ "$HW" = "EXMIMO" ] ; then
|
||||||
|
|
||||||
echo_info "Compiling Express MIMO 2 board drivers"
|
echo_info "Compiling Express MIMO 2 board drivers"
|
||||||
compilations \
|
compilations \
|
||||||
@@ -554,42 +550,24 @@ function main() {
|
|||||||
rrh_gw $dbin/rrh_gw
|
rrh_gw $dbin/rrh_gw
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# EPC compilation
|
|
||||||
##################
|
|
||||||
if [ "$EPC" = "1" ] ; then
|
|
||||||
echo_info "Compiling EPC"
|
|
||||||
# Example HSS and EPC run on the same host
|
|
||||||
if [ "$CLEAN" = "1" ]; then
|
|
||||||
$OPENAIR_DIR/cmake_targets/tools/build_epc --clean --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
|
|
||||||
$OPENAIR_DIR/cmake_targets/tools/build_hss --clean --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
|
|
||||||
else
|
|
||||||
$OPENAIR_DIR/cmake_targets/tools/build_epc --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
|
|
||||||
$OPENAIR_DIR/cmake_targets/tools/build_hss --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if [ "$INSTALL_SYSTEM_FILES" = "1" ] ;then
|
|
||||||
# if [ -f $dbin/hss.conf ] ; then
|
|
||||||
# sed -e 's/ *= */=/' $dbin/hss.conf > $dconf/hss.conf.nospace
|
|
||||||
# source $dconf/hss.conf.nospace
|
|
||||||
# rm -f $dconf/hss.conf.nospace
|
|
||||||
# create_hss_database root linux "$MYSQL_user" "$MYSQL_pass" "$MYSQL_db"
|
|
||||||
# else
|
|
||||||
# echo_warning "not created HSS database: config not found"
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Auto-tests
|
# Auto-tests
|
||||||
#####################
|
#####################
|
||||||
if [ "$OAI_TEST" = "1" ]; then
|
if [ "$OAI_TEST" = "1" ]; then
|
||||||
echo_info "10. Running OAI pre commit tests (pre-ci) ..."
|
echo_info "10. Running OAI pre commit tests (pre-ci) ..."
|
||||||
|
read -s -p "Enter Password: " mypassword
|
||||||
|
echo -e "\n"
|
||||||
|
echo_info "The log file for the autotest script for debugging is located here: $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log "
|
||||||
|
echo_info "The results of autotests results is located here: $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml "
|
||||||
|
echo_info "You can hit CTRL-C any time to terminate the autotests..."
|
||||||
rm -fr $OPENAIR_DIR/cmake_targets/autotests/log
|
rm -fr $OPENAIR_DIR/cmake_targets/autotests/log
|
||||||
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
|
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
|
||||||
if [ "$RUN_GROUP" -eq "1" ]; then
|
if [ "$RUN_GROUP" -eq "1" ]; then
|
||||||
$SUDO $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP"
|
echo '$mypassword' | $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
|
||||||
else
|
else
|
||||||
$SUDO $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash
|
echo '$mypassword' | $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
|
||||||
fi
|
fi
|
||||||
|
wait
|
||||||
else
|
else
|
||||||
echo_info "10. Bypassing the Tests ..."
|
echo_info "10. Bypassing the Tests ..."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -255,7 +255,10 @@ check_install_oai_software() {
|
|||||||
openssl \
|
openssl \
|
||||||
python \
|
python \
|
||||||
subversion \
|
subversion \
|
||||||
xmlstarlet
|
xmlstarlet \
|
||||||
|
python-pip \
|
||||||
|
pydb \
|
||||||
|
wvdial
|
||||||
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
|
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
|
||||||
if [ `lsb_release -rs` = '12.04' ] ; then
|
if [ `lsb_release -rs` = '12.04' ] ; then
|
||||||
install_nettle_from_source
|
install_nettle_from_source
|
||||||
@@ -263,6 +266,8 @@ check_install_oai_software() {
|
|||||||
else
|
else
|
||||||
$SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin
|
$SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin
|
||||||
fi
|
fi
|
||||||
|
$SUDO pip install paramiko
|
||||||
|
$SUDO pip install pyroute2
|
||||||
install_asn1c_from_source
|
install_asn1c_from_source
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,3 +324,42 @@ set_openair_env(){
|
|||||||
export OPENAIR_TARGETS=$openair_path/targets
|
export OPENAIR_TARGETS=$openair_path/targets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################
|
||||||
|
# Function to killall the subprocesses when Ctrl-C Key is hit
|
||||||
|
###############################
|
||||||
|
function handle_ctrl_c(){
|
||||||
|
CURPID=$$
|
||||||
|
ppid=$$
|
||||||
|
arraycounter=1
|
||||||
|
echo_info "** Trapped CTRL-C. Killing all subprocesses now..."
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
FORLOOP=FALSE
|
||||||
|
# Get all the child process id
|
||||||
|
for i in `ps -ef| awk '$3 == '$ppid' { print $2 }'`
|
||||||
|
do
|
||||||
|
if [ $i -ne $CURPID ] ; then
|
||||||
|
procid[$arraycounter]=$i
|
||||||
|
arraycounter=`expr $arraycounter + 1`
|
||||||
|
ppid=$i
|
||||||
|
FORLOOP=TRUE
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$FORLOOP" = "FALSE" ] ; then
|
||||||
|
arraycounter=`expr $arraycounter - 1`
|
||||||
|
## We want to kill child process id first and then parent id's
|
||||||
|
while [ $arraycounter -ne 0 ]
|
||||||
|
do
|
||||||
|
echo "first we send ctrl-c to program"
|
||||||
|
$SUDO kill -INT "${procid[$arraycounter]}"
|
||||||
|
sleep 5
|
||||||
|
echo "Now we force kill if that didn't work"
|
||||||
|
$SUDO kill -9 "${procid[$arraycounter]}" >/dev/null
|
||||||
|
arraycounter=`expr $arraycounter - 1`
|
||||||
|
done
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
@@ -68,7 +68,7 @@ declare MAX_RATE=1000
|
|||||||
|
|
||||||
# set paths to the required binaries and check if the required binaries are available
|
# set paths to the required binaries and check if the required binaries are available
|
||||||
ENB_CONFIG=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf
|
ENB_CONFIG=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf
|
||||||
OAISIM_EXEC=$OPENAIR_DIR/targets/bin/oaisim_nos1
|
OAISIM_EXEC=$OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1
|
||||||
BYPASSE_ITTI=0
|
BYPASSE_ITTI=0
|
||||||
OTGPLOT="$OPENAIR2_DIR/UTIL/OTG/OTGplot"
|
OTGPLOT="$OPENAIR2_DIR/UTIL/OTG/OTGplot"
|
||||||
PS2PDF="ps2pdf"
|
PS2PDF="ps2pdf"
|
||||||
@@ -301,8 +301,8 @@ oaisim_otg_stats(){
|
|||||||
sync
|
sync
|
||||||
|
|
||||||
if [ ! -f $OAISIM_EXEC ]; then
|
if [ ! -f $OAISIM_EXEC ]; then
|
||||||
echo_info "3.1 compiling OAISIM ($OPENAIR_TARGETS/cmake_targets/build_oai --oaisim -c)"
|
echo_info "3.1 compiling OAISIM ($OPENAIR_DIR/cmake_targets/build_oai --oaisim -c --noS1)"
|
||||||
($OPENAIR_TARGETS/cmake_targets/build_oai --oaisim -c >> results/perf_log.txt 2>&1 )
|
($OPENAIR_DIR/cmake_targets/build_oai --oaisim -c --noS1 >> results/perf_log.txt 2>&1 )
|
||||||
build_stats=$?
|
build_stats=$?
|
||||||
if [ $build_stats != 0 ] ; then
|
if [ $build_stats != 0 ] ; then
|
||||||
echo_error "$OAISIM_EXEC cannot be built, check results/perf_log.txt file"
|
echo_error "$OAISIM_EXEC cannot be built, check results/perf_log.txt file"
|
||||||
|
|||||||
@@ -583,6 +583,10 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
sprintf(bler_fname,"ULbler_mcs%d_nrb%d_ChannelModel%d_nsim%d.csv",mcs,nb_rb,chMod,n_frames);
|
sprintf(bler_fname,"ULbler_mcs%d_nrb%d_ChannelModel%d_nsim%d.csv",mcs,nb_rb,chMod,n_frames);
|
||||||
bler_fd = fopen(bler_fname,"w");
|
bler_fd = fopen(bler_fname,"w");
|
||||||
|
if (bler_fd==NULL) {
|
||||||
|
fprintf(stderr,"Problem creating file %s\n",bler_fname);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(bler_fd,"#SNR;mcs;nb_rb;TBS;rate;errors[0];trials[0];errors[1];trials[1];errors[2];trials[2];errors[3];trials[3]\n");
|
fprintf(bler_fd,"#SNR;mcs;nb_rb;TBS;rate;errors[0];trials[0];errors[1];trials[1];errors[2];trials[2];errors[3];trials[3]\n");
|
||||||
|
|
||||||
@@ -591,13 +595,16 @@ int main(int argc, char **argv)
|
|||||||
hostname[1023] = '\0';
|
hostname[1023] = '\0';
|
||||||
gethostname(hostname, 1023);
|
gethostname(hostname, 1023);
|
||||||
printf("Hostname: %s\n", hostname);
|
printf("Hostname: %s\n", hostname);
|
||||||
char dirname[FILENAME_MAX];
|
//char dirname[FILENAME_MAX];
|
||||||
sprintf(dirname, "%s//SIMU/USER/pre-ci-logs-%s", getenv("OPENAIR_TARGETS"),hostname);
|
//sprintf(dirname, "%s//SIMU/USER/pre-ci-logs-%s", getenv("OPENAIR_TARGETS"),hostname);
|
||||||
mkdir(dirname, 0777);
|
//mkdir(dirname, 0777);
|
||||||
sprintf(time_meas_fname,"%s/time_meas_prb%d_mcs%d_antrx%d_channel%s_tx%d.csv",
|
sprintf(time_meas_fname,"time_meas_prb%d_mcs%d_antrx%d_channel%s_tx%d.csv",
|
||||||
dirname,
|
|
||||||
N_RB_DL,mcs,n_rx,channel_model_input,transmission_mode);
|
N_RB_DL,mcs,n_rx,channel_model_input,transmission_mode);
|
||||||
time_meas_fd = fopen(time_meas_fname,"w");
|
time_meas_fd = fopen(time_meas_fname,"w");
|
||||||
|
if (time_meas_fd==NULL) {
|
||||||
|
fprintf(stderr,"Cannot create file %s!\n",time_meas_fname);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user