Skip to content

Commit 3c5f319

Browse files
committed
qemu: Make cpuinfo a list of patterns to match
1 parent 6d36a6b commit 3c5f319

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

lib/qemu.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ def apply_defaults(self):
8484

8585
if self.cpuinfo is None:
8686
if self.machine_is('pseries'):
87-
self.cpuinfo = 'IBM pSeries \(emulated by qemu\)'
87+
self.cpuinfo = ['IBM pSeries \(emulated by qemu\)']
8888
elif self.machine_is('powernv'):
89-
self.cpuinfo = 'IBM PowerNV \(emulated by qemu\)'
89+
self.cpuinfo = ['IBM PowerNV \(emulated by qemu\)']
9090
elif self.machine == 'mac99':
91-
self.cpuinfo = 'PowerMac3,1 MacRISC MacRISC2 Power Macintosh'
91+
self.cpuinfo = ['PowerMac3,1 MacRISC MacRISC2 Power Macintosh']
9292
elif self.machine == 'g3beige':
93-
self.cpuinfo = 'AAPL,PowerMac G3 MacRISC'
93+
self.cpuinfo = ['AAPL,PowerMac G3 MacRISC']
9494
elif self.machine == 'bamboo':
95-
self.cpuinfo = 'PowerPC 44x Platform'
95+
self.cpuinfo = ['PowerPC 44x Platform']
9696
elif self.machine == 'ppce500':
97-
self.cpuinfo = 'QEMU ppce500'
97+
self.cpuinfo = ['QEMU ppce500']
9898

9999
if self.qemu_path is None:
100100
if self.machine_is('pseries') or self.machine_is('powernv'):
@@ -381,7 +381,8 @@ def qemu_main(qconf):
381381

382382
p.send('cat /proc/cpuinfo')
383383
if qconf.cpuinfo:
384-
p.expect(qconf.cpuinfo)
384+
for s in qconf.cpuinfo:
385+
p.expect(s)
385386
p.expect_prompt()
386387

387388
if qconf.net_tests:

0 commit comments

Comments
 (0)