]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemuimagetest: fix erroneous ps errors when qemu couldn't be started
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 26 Mar 2013 12:43:04 +0000 (12:43 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 Mar 2013 17:46:52 +0000 (17:46 +0000)
The helper script was printing an error to stdout when it couldn't find
any qemu child processes; output this error to stderr instead and
redirect stderr to /dev/null when running from qemuimage-testlib so that
QEMUPID is actually blank if there are no qemu instances found.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/qemuimage-testlib
scripts/qemuimage-testlib-pythonhelper

index 551011cbaff3c77d951b80e96ab83324ea42d037..6377c7f27a5149e4c2defa058866559128bb3f8f 100755 (executable)
@@ -420,7 +420,7 @@ Test_Create_Qemu()
 
        while [ ${up_time} -lt 10 ]
        do
-               QEMUPID=`qemuimage-testlib-pythonhelper --findqemu $XTERMPID`
+               QEMUPID=`qemuimage-testlib-pythonhelper --findqemu $XTERMPID 2>/dev/null`
                if [ $? -ne 0 ]; then
                        Test_Info "Wait for qemu up..."
                        up_time=`expr $up_time + 5`
index 2ca61ca06a1c9662930f7b450f7ca34e77ea8422..2c1f557778da2aa45510acf0158f1c9bc0e1b679 100755 (executable)
@@ -34,7 +34,7 @@ if options.findqemu:
         commands[data[0]] = data[2]
 
     if options.findqemu not in pids:
-        print "No children found matching %s" % options.findqemu
+        sys.stderr.write("No children found matching %s" % options.findqemu)
         sys.exit(1)
 
     parents = []