summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-05 10:00:25 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-23 12:00:53 (GMT)
commitbd8e22ad58d2b775199b0609cf959aca9e47122d (patch)
tree57417c25c9137977616da2d6fe4ef0509552322a
parenta5cf1639695e3c14aaaf0b5a8ff5ee208d667744 (diff)
downloadpoky-bd8e22ad58d2b775199b0609cf959aca9e47122d.tar.gz
qemuimage-testlib-pythonhelper: Fix process mixups
runqemu-internal runs "ldd qemu-system xxx" and the detection code was returning this as the PID of qemu. This patch improves the detection code to avoid this problem, fixing certain race type failures on the autobuilder. (From OE-Core rev: 0c97fedc42fd9b53dc1dd40fe01f4ac142201269) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/qemuimage-testlib-pythonhelper6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/qemuimage-testlib-pythonhelper b/scripts/qemuimage-testlib-pythonhelper
index bb01246..4e6432b 100755
--- a/scripts/qemuimage-testlib-pythonhelper
+++ b/scripts/qemuimage-testlib-pythonhelper
@@ -3,6 +3,7 @@
3import optparse 3import optparse
4import subprocess 4import subprocess
5import sys 5import sys
6import os
6 7
7parser = optparse.OptionParser( 8parser = optparse.OptionParser(
8 usage = """ 9 usage = """
@@ -52,7 +53,10 @@ if options.findqemu:
52 newparents = next 53 newparents = next
53 #print "Children matching %s:" % str(parents) 54 #print "Children matching %s:" % str(parents)
54 for p in parents: 55 for p in parents:
55 if "qemu-system" in commands[p]: 56 # Need to be careful here since runqemu-internal runs "ldd qemu-system-xxxx"
57 basecmd = commands[p].split()[0]
58 basecmd = os.path.basename(basecmd)
59 if "qemu-system" in basecmd:
56 print p 60 print p
57 sys.exit(0) 61 sys.exit(0)
58 sys.exit(1) 62 sys.exit(1)