summaryrefslogtreecommitdiffstats
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-27 17:28:00 +0000
commit24a234c5cda22868828c4c8971c6eba0081156fb (patch)
tree890d0ae2c6fcfc68af8ec9bf77861cdb5a052240
parentcaa75bfffb4cd3808aa6a5473f7cc6208e9e934c (diff)
downloadpoky-24a234c5cda22868828c4c8971c6eba0081156fb.tar.gz
poky-24a234c5cda22868828c4c8971c6eba0081156fb.tar.bz2
poky-24a234c5cda22868828c4c8971c6eba0081156fb.zip
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: 827492e3738bf3b6cf2bc1b9e1108bb28abcb146) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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()
local ip_addr=0
# Check if $1 pid exists and contains ipaddr of target
- ps -wwfp $opid | grep -oq "192\.168\.7\.[0-9]*::"
-
ip_addr=`ps -wwfp $opid | grep -o "192\.168\.7\.[0-9]*::" | awk -F":" '{print $1}'`
echo $ip_addr
@@ -430,8 +428,8 @@ Test_Create_Qemu()
# Parse IP address of target from the qemu command line
TARGET_IPADDR=`Test_Fetch_Target_IP $QEMUPID`
- # If IP address is 0, means there is no qemu process found
- if [ ${TARGET_IPADDR} == "0" ]; then
+ echo "Target IP is ${TARGET_IPADDR}"
+ if [ -z ${TARGET_IPADDR} ]; then
Test_Info "There is no qemu process or qemu ip address found, return failed"
return 1
fi