summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-19 23:32:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-19 23:35:01 +0000
commit808967b84cef66e0b59b9a720fa0808f6a546d3a (patch)
treec24fde1662d2e3f0fc42b2eedd9ff38337a84016 /scripts
parent0ff4529c64a2de45a39b692249b7a8b62c5e9277 (diff)
downloadpoky-808967b84cef66e0b59b9a720fa0808f6a546d3a.tar.gz
qemuimage-testlib: Fix IP address handling
Remove some pointless code and also fix the return handling for the function since it returns null, not 0 as the comments would suggest. (From OE-Core rev: 6b8d7767ff14345af29d7774b7e16e29c3f7fa8e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/qemuimage-testlib6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 5d74a0a739..42c3004f6f 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -337,8 +337,6 @@ Test_Fetch_Target_IP()
337 local ip_addr=0 337 local ip_addr=0
338 338
339 # Check if $1 pid exists and contains ipaddr of target 339 # Check if $1 pid exists and contains ipaddr of target
340 ps -wwfp $opid | grep -oq "192\.168\.7\.[0-9]*::"
341
342 ip_addr=`ps -wwfp $opid | grep -o "192\.168\.7\.[0-9]*::" | awk -F":" '{print $1}'` 340 ip_addr=`ps -wwfp $opid | grep -o "192\.168\.7\.[0-9]*::" | awk -F":" '{print $1}'`
343 341
344 echo $ip_addr 342 echo $ip_addr
@@ -430,8 +428,8 @@ Test_Create_Qemu()
430 428
431 # Parse IP address of target from the qemu command line 429 # Parse IP address of target from the qemu command line
432 TARGET_IPADDR=`Test_Fetch_Target_IP $QEMUPID` 430 TARGET_IPADDR=`Test_Fetch_Target_IP $QEMUPID`
433 # If IP address is 0, means there is no qemu process found 431 echo "Target IP is ${TARGET_IPADDR}"
434 if [ ${TARGET_IPADDR} == "0" ]; then 432 if [ -z ${TARGET_IPADDR} ]; then
435 Test_Info "There is no qemu process or qemu ip address found, return failed" 433 Test_Info "There is no qemu process or qemu ip address found, return failed"
436 return 1 434 return 1
437 fi 435 fi