diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-19 13:18:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-20 12:14:32 +0100 |
commit | d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6 (patch) | |
tree | bf46541bf207a6e4f5470b59feac7de9fcb67a1a /scripts/qemuimage-testlib-pythonhelper | |
parent | a68b4c6ee780c0efe6c877595d0c10b3192ad80b (diff) | |
download | openembedded-core-d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6.tar.gz openembedded-core-d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6.tar.bz2 openembedded-core-d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6.zip |
classes/imagetest-qemu: remove old image testing class
This has now been superseded by testimage.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts/qemuimage-testlib-pythonhelper')
-rwxr-xr-x | scripts/qemuimage-testlib-pythonhelper | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/scripts/qemuimage-testlib-pythonhelper b/scripts/qemuimage-testlib-pythonhelper deleted file mode 100755 index 6435dd8f18..0000000000 --- a/scripts/qemuimage-testlib-pythonhelper +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python - -import optparse -import subprocess -import sys -import os - -parser = optparse.OptionParser( - usage = """ - %prog [options] -""") - -parser.add_option("-q", "--findqemu", - help = "find a qemu beneath the process <pid>", - action="store", dest="findqemu") - -options, args = parser.parse_args(sys.argv) - -if options.findqemu: - # - # Walk the process tree from the process specified looking for a qemu-system. Return its pid. - # - ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0] - processes = ps.split('\n') - nfields = len(processes[0].split()) - 1 - pids = {} - commands = {} - for row in processes[1:]: - data = row.split(None, nfields) - if len(data) != 3: - continue - if data[1] not in pids: - pids[data[1]] = [] - pids[data[1]].append(data[0]) - commands[data[0]] = data[2] - - if options.findqemu not in pids: - sys.stderr.write("No children found matching %s" % options.findqemu) - sys.exit(1) - - parents = [] - newparents = pids[options.findqemu] - while newparents: - next = [] - for p in newparents: - if p in pids: - for n in pids[p]: - if n not in parents and n not in next: - next.append(n) - - if p not in parents: - parents.append(p) - newparents = next - #print "Children matching %s:" % str(parents) - for p in parents: - # Need to be careful here since runqemu-internal runs "ldd qemu-system-xxxx" - # Also, old versions of ldd (2.11) run "LD_XXXX qemu-system-xxxx" - basecmd = commands[p].split()[0] - basecmd = os.path.basename(basecmd) - if "qemu-system" in basecmd and "192.168" in commands[p]: - print p - sys.exit(0) - sys.exit(1) -else: - parser.print_help() - |