diff options
Diffstat (limited to 'meta/lib/oeqa/utils/qemutinyrunner.py')
-rw-r--r-- | meta/lib/oeqa/utils/qemutinyrunner.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py index e3d8c669e0..f733258bce 100644 --- a/meta/lib/oeqa/utils/qemutinyrunner.py +++ b/meta/lib/oeqa/utils/qemutinyrunner.py | |||
@@ -13,7 +13,7 @@ import re | |||
13 | import socket | 13 | import socket |
14 | import select | 14 | import select |
15 | import bb | 15 | import bb |
16 | from qemurunner import QemuRunner | 16 | from .qemurunner import QemuRunner |
17 | 17 | ||
18 | class QemuTinyRunner(QemuRunner): | 18 | class QemuTinyRunner(QemuRunner): |
19 | 19 | ||
@@ -50,7 +50,7 @@ class QemuTinyRunner(QemuRunner): | |||
50 | self.server_socket.connect(self.socketfile) | 50 | self.server_socket.connect(self.socketfile) |
51 | bb.note("Created listening socket for qemu serial console.") | 51 | bb.note("Created listening socket for qemu serial console.") |
52 | tries = 0 | 52 | tries = 0 |
53 | except socket.error, msg: | 53 | except socket.error as msg: |
54 | self.server_socket.close() | 54 | self.server_socket.close() |
55 | bb.fatal("Failed to create listening socket.") | 55 | bb.fatal("Failed to create listening socket.") |
56 | tries -= 1 | 56 | tries -= 1 |
@@ -102,7 +102,7 @@ class QemuTinyRunner(QemuRunner): | |||
102 | bb.note("Qemu pid didn't appeared in %s seconds" % self.runqemutime) | 102 | bb.note("Qemu pid didn't appeared in %s seconds" % self.runqemutime) |
103 | output = self.runqemu.stdout | 103 | output = self.runqemu.stdout |
104 | self.stop() | 104 | self.stop() |
105 | bb.note("Output from runqemu:\n%s" % output.read()) | 105 | bb.note("Output from runqemu:\n%s" % output.read().decode("utf-8")) |
106 | return False | 106 | return False |
107 | 107 | ||
108 | return self.is_alive() | 108 | return self.is_alive() |
@@ -131,7 +131,7 @@ class QemuTinyRunner(QemuRunner): | |||
131 | # Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd] | 131 | # Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd] |
132 | # | 132 | # |
133 | ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0] | 133 | ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0] |
134 | processes = ps.split('\n') | 134 | processes = ps.decode("utf-8").split('\n') |
135 | nfields = len(processes[0].split()) - 1 | 135 | nfields = len(processes[0].split()) - 1 |
136 | pids = {} | 136 | pids = {} |
137 | commands = {} | 137 | commands = {} |
@@ -167,4 +167,4 @@ class QemuTinyRunner(QemuRunner): | |||
167 | basecmd = commands[p].split()[0] | 167 | basecmd = commands[p].split()[0] |
168 | basecmd = os.path.basename(basecmd) | 168 | basecmd = os.path.basename(basecmd) |
169 | if "qemu-system" in basecmd and "-serial unix" in commands[p]: | 169 | if "qemu-system" in basecmd and "-serial unix" in commands[p]: |
170 | return [int(p),commands[p]] \ No newline at end of file | 170 | return [int(p),commands[p]] |