From 058aa8a28cda3dcb97aad07967ed9c9894627a18 Mon Sep 17 00:00:00 2001 From: Rohit Gupta <rohit.gupta@eurecom.fr> Date: Fri, 1 Apr 2016 17:18:55 +0200 Subject: [PATCH] updates for adding Sony Experia M4 to test setup --- .../tools/configure_cots_sony_experia_m4_ue.py | 5 ++--- cmake_targets/autotests/tools/iperf_script_phone | 12 ++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py b/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py index 649759c3ea..399d10b5b1 100755 --- a/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py +++ b/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py @@ -50,7 +50,7 @@ def kill_processes(name): break; out_arr = out.split() pid_to_kill = out_arr[1] - print "Now killing process ID" + pid_to_kill + " on Phone" + print "Now killing process ID " + pid_to_kill + " on Phone" cmd = 'sudo adb -s ' + device_id +' shell "kill ' + pid_to_kill + '"' status, out = commands.getstatusoutput(cmd) if status != 0: @@ -74,8 +74,7 @@ def start_ue () : cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep 192.' status, out = commands.getstatusoutput(cmd) if (out == '') : - print "Wating for UE to connect and get IP Address..." - sys.exit() + print "Waiting for UE to connect and get IP Address..." else : print "UE is now connected. IP Address settings are..." + out os.system('sleep 5') diff --git a/cmake_targets/autotests/tools/iperf_script_phone b/cmake_targets/autotests/tools/iperf_script_phone index 09d0941bfd..91f26ff3b9 100755 --- a/cmake_targets/autotests/tools/iperf_script_phone +++ b/cmake_targets/autotests/tools/iperf_script_phone @@ -17,4 +17,16 @@ echo "iperf_args = ${iperf_args[@]}" sleep $timeout +while true ; do + cmd=`sudo adb -s $device_id shell netcfg |grep 192.` + if [ -z "$cmd" ]; then + print "Wating for UE to connect and get IP Address..." + else + echo "UE is not connected. IP Address settings are... $cmd" + break + +done + +print "Starting iperf now..." + sudo adb -s $device_id shell /data/local/tmp/iperf ${iperf_args[@]} -- GitLab