]>
Commit | Line | Data |
---|---|---|
71b290e7 PMD |
1 | # Functional test that boots a PReP/40p machine and checks its serial console. |
2 | # | |
3 | # Copyright (c) Philippe Mathieu-Daudé <f4bug@amsat.org> | |
4 | # | |
5 | # This work is licensed under the terms of the GNU GPL, version 2 or | |
6 | # later. See the COPYING file in the top-level directory. | |
7 | ||
8 | import os | |
9 | ||
71b290e7 | 10 | from avocado import skipUnless |
2283b627 | 11 | from avocado_qemu import QemuSystemTest |
71b290e7 PMD |
12 | from avocado_qemu import wait_for_console_pattern |
13 | ||
14 | ||
2283b627 | 15 | class IbmPrep40pMachine(QemuSystemTest): |
71b290e7 PMD |
16 | |
17 | timeout = 60 | |
18 | ||
19 | # 12H0455 PPS Firmware Licensed Materials | |
20 | # Property of IBM (C) Copyright IBM Corp. 1994. | |
21 | # All rights reserved. | |
22 | # U.S. Government Users Restricted Rights - Use, duplication or disclosure | |
23 | # restricted by GSA ADP Schedule Contract with IBM Corp. | |
71b290e7 PMD |
24 | @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code') |
25 | def test_factory_firmware_and_netbsd(self): | |
26 | """ | |
27 | :avocado: tags=arch:ppc | |
28 | :avocado: tags=machine:40p | |
012293c1 | 29 | :avocado: tags=os:netbsd |
71b290e7 | 30 | :avocado: tags=slowness:high |
486ff289 | 31 | :avocado: tags=accel:tcg |
71b290e7 | 32 | """ |
486ff289 | 33 | self.require_accelerator("tcg") |
b131b497 PMD |
34 | bios_url = ('http://ftpmirror.your.org/pub/misc/' |
35 | 'ftp.software.ibm.com/rs6000/firmware/' | |
71b290e7 PMD |
36 | '7020-40p/P12H0456.IMG') |
37 | bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03' | |
38 | bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash) | |
a60f755c | 39 | drive_url = ('https://archive.netbsd.org/pub/NetBSD-archive/' |
71b290e7 PMD |
40 | 'NetBSD-4.0/prep/installation/floppy/generic_com0.fs') |
41 | drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb' | |
42 | drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash) | |
43 | ||
71b290e7 PMD |
44 | self.vm.set_console() |
45 | self.vm.add_args('-bios', bios_path, | |
46 | '-fda', drive_path) | |
47 | self.vm.launch() | |
48 | os_banner = 'NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:49:40 PST 2007' | |
49 | wait_for_console_pattern(self, os_banner) | |
50 | wait_for_console_pattern(self, 'Model: IBM PPS Model 6015') | |
1a9559e8 PMD |
51 | |
52 | def test_openbios_192m(self): | |
53 | """ | |
54 | :avocado: tags=arch:ppc | |
55 | :avocado: tags=machine:40p | |
486ff289 | 56 | :avocado: tags=accel:tcg |
1a9559e8 | 57 | """ |
486ff289 | 58 | self.require_accelerator("tcg") |
1a9559e8 PMD |
59 | self.vm.set_console() |
60 | self.vm.add_args('-m', '192') # test fw_cfg | |
61 | ||
62 | self.vm.launch() | |
63 | wait_for_console_pattern(self, '>> OpenBIOS') | |
64 | wait_for_console_pattern(self, '>> Memory: 192M') | |
65 | wait_for_console_pattern(self, '>> CPU type PowerPC,604') | |
66 | ||
1a9559e8 PMD |
67 | def test_openbios_and_netbsd(self): |
68 | """ | |
69 | :avocado: tags=arch:ppc | |
70 | :avocado: tags=machine:40p | |
012293c1 | 71 | :avocado: tags=os:netbsd |
486ff289 | 72 | :avocado: tags=accel:tcg |
1a9559e8 | 73 | """ |
486ff289 | 74 | self.require_accelerator("tcg") |
089f2587 CR |
75 | drive_url = ('https://archive.netbsd.org/pub/NetBSD-archive/' |
76 | 'NetBSD-7.1.2/iso/NetBSD-7.1.2-prep.iso') | |
1a9559e8 PMD |
77 | drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e' |
78 | drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash, | |
79 | algorithm='md5') | |
1a9559e8 PMD |
80 | self.vm.set_console() |
81 | self.vm.add_args('-cdrom', drive_path, | |
82 | '-boot', 'd') | |
83 | ||
84 | self.vm.launch() | |
85 | wait_for_console_pattern(self, 'NetBSD/prep BOOT, Revision 1.9') |