summaryrefslogtreecommitdiffstats
path: root/scripts/qemuimage-testlib-pythonhelper
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-05 10:00:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-05 11:13:53 +0100
commit0b57f39088c23f62b620264bdffb037f41ec0878 (patch)
tree9f98ee7bc6b3b1aa7b10de60c1c9463931511888 /scripts/qemuimage-testlib-pythonhelper
parentf8461951ac63d215634352c6f4c16d057808cfcf (diff)
downloadast2050-yocto-poky-0b57f39088c23f62b620264bdffb037f41ec0878.zip
ast2050-yocto-poky-0b57f39088c23f62b620264bdffb037f41ec0878.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: fc914a6fb3204f8b5bdfc0f56364606673d5356a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/qemuimage-testlib-pythonhelper')
-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 @@
import optparse
import subprocess
import sys
+import os
parser = optparse.OptionParser(
usage = """
@@ -52,7 +53,10 @@ if options.findqemu:
newparents = next
#print "Children matching %s:" % str(parents)
for p in parents:
- if "qemu-system" in commands[p]:
+ # Need to be careful here since runqemu-internal runs "ldd qemu-system-xxxx"
+ basecmd = commands[p].split()[0]
+ basecmd = os.path.basename(basecmd)
+ if "qemu-system" in basecmd:
print p
sys.exit(0)
sys.exit(1)
OpenPOWER on IntegriCloud