Commit cfb35007 authored by Rohit Gupta's avatar Rohit Gupta

Merge branch 'feature-34-test_framework' into develop

parents 0dc952e2 32c45ad5
...@@ -32,3 +32,8 @@ job1: ...@@ -32,3 +32,8 @@ job1:
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR
- cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml - cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
- exce_log=`egrep -i 'warning|error|critical|exception' $NFS_TEST_RESULTS_DIR/log/python_autotest.log `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest.log. Please check the logs\e[0m" ; fi
- exce_log=`egrep -i 'warning|error|critical|exception' $NFS_TEST_RESULTS_DIR/log/python_autotest_cleanup.log `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest_cleanup.log. Please check the logs\e[0m" ; fi
...@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd ...@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd
# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box # \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml) # \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
cmd = 'killall -q -r ' + programList cmd = 'killall -9 -q -r ' + programList
result = oai.send(cmd, True) result = oai.send(cmd, True)
print "Killing old programs..." + result print "Killing old programs..." + result
programArray = programList.split() programArray = programList.split()
......
This diff is collapsed.
...@@ -52,7 +52,7 @@ def kill_processes(name): ...@@ -52,7 +52,7 @@ def kill_processes(name):
out_arr = out.split() out_arr = out.split()
pid_to_kill = out_arr[1] 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 + '"' cmd = 'sudo adb -s ' + device_id +' shell "kill -9 ' + pid_to_kill + '"'
status, out = commands.getstatusoutput(cmd) status, out = commands.getstatusoutput(cmd)
if status != 0: if status != 0:
print "Error execting command to kill process " + name print "Error execting command to kill process " + name
...@@ -63,6 +63,7 @@ def start_ue () : ...@@ -63,6 +63,7 @@ def start_ue () :
#print 'Enter your commands below.\r\nInsert "exit" to leave the application.' #print 'Enter your commands below.\r\nInsert "exit" to leave the application.'
print 'Killing old iperf/ping sessions' print 'Killing old iperf/ping sessions'
kill_processes('iperf') kill_processes('iperf')
kill_processes('iperf3')
kill_processes('ping') kill_processes('ping')
print "Turning off airplane mode" print "Turning off airplane mode"
os.system('sudo -E adb devices') os.system('sudo -E adb devices')
...@@ -94,6 +95,7 @@ def stop_ue(): ...@@ -94,6 +95,7 @@ def stop_ue():
os.system('sudo adb -s ' + device_id + ' shell \"settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true\" ') os.system('sudo adb -s ' + device_id + ' shell \"settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true\" ')
print "Killing iperf/ping sessions" print "Killing iperf/ping sessions"
kill_processes('iperf') kill_processes('iperf')
kill_processes('iperf3')
kill_processes('ping') kill_processes('ping')
i=1 i=1
......
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