[oe-commits] Richard Purdie : qemuimage-testlib: Fix IP address handling
git at git.openembedded.org
git at git.openembedded.org
Tue Mar 19 23:33:22 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: 6b8d7767ff14345af29d7774b7e16e29c3f7fa8e
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6b8d7767ff14345af29d7774b7e16e29c3f7fa8e
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Tue Mar 19 23:32:29 2013 +0000
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.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/qemuimage-testlib | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 5d74a0a..42c3004 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
More information about the Openembedded-commits
mailing list