Skip to content

Commit b52d7e2

Browse files
Dovgalyukphilmd
authored andcommitted
tests/acceptance: record/replay tests with advcal images
This patch adds more record/replay tests with kernel images. Signed-off-by: Pavel Dovgalyuk <[email protected]> Tested-by: Philippe Mathieu-Daude <[email protected]> Message-Id: <159073592589.20809.5156301499042635614.stgit@pasha-ThinkPad-X280> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> [PMD: Use os.path.join(), add avocado 'cpu' tags] Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent 20b1bf2 commit b52d7e2

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed

tests/acceptance/replay_kernel.py

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,111 @@ def test_m68k_q800(self):
190190
'console=ttyS0 vga=off')
191191
console_pattern = 'No filesystem could mount root'
192192
self.run_rr(kernel_path, kernel_command_line, console_pattern)
193+
194+
def do_test_advcal_2018(self, file_path, kernel_name, args=None):
195+
archive.extract(file_path, self.workdir)
196+
197+
for entry in os.scandir(self.workdir):
198+
if entry.name.startswith('day') and entry.is_dir():
199+
kernel_path = os.path.join(entry.path, kernel_name)
200+
break
201+
202+
kernel_command_line = ''
203+
console_pattern = 'QEMU advent calendar'
204+
self.run_rr(kernel_path, kernel_command_line, console_pattern,
205+
args=args)
206+
207+
def test_arm_vexpressa9(self):
208+
"""
209+
:avocado: tags=arch:arm
210+
:avocado: tags=machine:vexpress-a9
211+
"""
212+
tar_hash = '32b7677ce8b6f1471fb0059865f451169934245b'
213+
tar_url = ('https://www.qemu-advent-calendar.org'
214+
'/2018/download/day16.tar.xz')
215+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
216+
dtb_path = self.workdir + '/day16/vexpress-v2p-ca9.dtb'
217+
self.do_test_advcal_2018(file_path, 'winter.zImage',
218+
args=('-dtb', dtb_path))
219+
220+
def test_m68k_mcf5208evb(self):
221+
"""
222+
:avocado: tags=arch:m68k
223+
:avocado: tags=machine:mcf5208evb
224+
"""
225+
tar_hash = 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c'
226+
tar_url = ('https://www.qemu-advent-calendar.org'
227+
'/2018/download/day07.tar.xz')
228+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
229+
self.do_test_advcal_2018(file_path, 'sanity-clause.elf')
230+
231+
def test_microblaze_s3adsp1800(self):
232+
"""
233+
:avocado: tags=arch:microblaze
234+
:avocado: tags=machine:petalogix-s3adsp1800
235+
"""
236+
tar_hash = '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f'
237+
tar_url = ('https://www.qemu-advent-calendar.org'
238+
'/2018/download/day17.tar.xz')
239+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
240+
self.do_test_advcal_2018(file_path, 'ballerina.bin')
241+
242+
def test_ppc64_e500(self):
243+
"""
244+
:avocado: tags=arch:ppc64
245+
:avocado: tags=machine:ppce500
246+
:avocado: tags=cpu:e5500
247+
"""
248+
tar_hash = '6951d86d644b302898da2fd701739c9406527fe1'
249+
tar_url = ('https://www.qemu-advent-calendar.org'
250+
'/2018/download/day19.tar.xz')
251+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
252+
self.do_test_advcal_2018(file_path, 'uImage', ('-cpu', 'e5500'))
253+
254+
def test_ppc_g3beige(self):
255+
"""
256+
:avocado: tags=arch:ppc
257+
:avocado: tags=machine:g3beige
258+
"""
259+
tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
260+
tar_url = ('https://www.qemu-advent-calendar.org'
261+
'/2018/download/day15.tar.xz')
262+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
263+
self.do_test_advcal_2018(file_path, 'invaders.elf',
264+
args=('-M', 'graphics=off'))
265+
266+
def test_ppc_mac99(self):
267+
"""
268+
:avocado: tags=arch:ppc
269+
:avocado: tags=machine:mac99
270+
"""
271+
tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
272+
tar_url = ('https://www.qemu-advent-calendar.org'
273+
'/2018/download/day15.tar.xz')
274+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
275+
self.do_test_advcal_2018(file_path, 'invaders.elf',
276+
args=('-M', 'graphics=off'))
277+
278+
def test_sparc_ss20(self):
279+
"""
280+
:avocado: tags=arch:sparc
281+
:avocado: tags=machine:SS-20
282+
"""
283+
tar_hash = 'b18550d5d61c7615d989a06edace051017726a9f'
284+
tar_url = ('https://www.qemu-advent-calendar.org'
285+
'/2018/download/day11.tar.xz')
286+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
287+
self.do_test_advcal_2018(file_path, 'zImage.elf')
288+
289+
def test_xtensa_lx60(self):
290+
"""
291+
:avocado: tags=arch:xtensa
292+
:avocado: tags=machine:lx60
293+
:avocado: tags=cpu:dc233c
294+
"""
295+
tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34'
296+
tar_url = ('https://www.qemu-advent-calendar.org'
297+
'/2018/download/day02.tar.xz')
298+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
299+
self.do_test_advcal_2018(file_path, 'santas-sleigh-ride.elf',
300+
args=('-cpu', 'dc233c'))

0 commit comments

Comments
 (0)