Skip to content

Commit 7ea0a09

Browse files
committed
Merge branch 'master' into deploy
2 parents 00dd18c + c303a08 commit 7ea0a09

4 files changed

Lines changed: 21 additions & 15 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Different toolchains
5151

5252
There are images for various toolchains, they are encoded in the distro name/version.
5353

54+
- `korg@12.2.0`: kernel.org gcc 12.2.0, binutils 2.39
5455
- `korg@12.1.0`: kernel.org gcc 12.1.0, binutils 2.38
5556
- `korg@11.3.0`: kernel.org gcc 11.3.0, binutils 2.38
5657
- `korg@11.1.0`: kernel.org gcc 11.1.0, binutils 2.36.1

build/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif
1414

1515
FEDORA_DISTROS := fedora@${FEDORA_LATEST} fedora@36 fedora@35 fedora@34 fedora@33 fedora@31 fedora
1616
UBUNTU_DISTROS := ubuntu@${UBUNTU_LATEST} ubuntu@20.04 ubuntu@18.04 ubuntu@16.04 ubuntu
17-
KORG_DISTROS := korg@12.1.0 korg@11.3.0 korg@11.1.0 korg@10.3.0 korg@9.4.0 korg@9.3.0 korg@8.5.0 korg@8.1.0 korg@5.5.0
17+
KORG_DISTROS := korg@12.2.0 korg@12.1.0 korg@11.3.0 korg@11.1.0 korg@10.3.0 korg@9.4.0 korg@9.3.0 korg@8.5.0 korg@8.1.0 korg@5.5.0
1818
ALL_DISTROS := ${UBUNTU_DISTROS} ${KORG_DISTROS} ${FEDORA_DISTROS}
1919
DOCS_DISTRO := docs@${UBUNTU_LATEST}
2020
X86_DISTRO := ubuntu@${UBUNTU_LATEST}

lib/pexpect_utils.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77

88
class PexpectHelper:
9-
DEFAULT_PROMPT = "/ #"
10-
119
default_bug_patterns = [
1210
'Unable to handle kernel paging request',
1311
'Oops: Kernel access of bad area',
@@ -103,26 +101,28 @@ def cmd(self, cmd):
103101
self.expect_prompt()
104102

105103

106-
def standard_boot(p, login=False, user='root', password=None, timeout=-1, prompt=None):
107-
if prompt is None:
108-
prompt = p.DEFAULT_PROMPT
109-
110-
p.push_prompt(prompt)
111-
104+
def standard_boot(p, login=False, user='root', password=None, timeout=-1):
112105
logging.info("Waiting for kernel to boot")
113-
p.expect("Freeing unused kernel ", timeout=timeout)
106+
i = p.expect([p.prompt, "login:", "Freeing unused kernel "], timeout=timeout)
107+
108+
if i == 0:
109+
# We booted straight to a prompt, we're done
110+
pass
111+
elif login:
112+
if i != 1:
113+
logging.info("Kernel came up, waiting for login ...")
114+
p.expect("login:", timeout=timeout)
114115

115-
if login:
116-
logging.info("Kernel came up, waiting for login ...")
117-
p.expect("login:", timeout=timeout)
118116
p.send(user)
119117
if password is not None:
120118
p.expect("Password:", timeout=timeout)
121119
p.send(password)
120+
121+
p.expect_prompt(timeout=timeout)
122122
else:
123123
logging.info("Kernel came up, waiting for prompt ...")
124+
p.expect_prompt(timeout=timeout)
124125

125-
p.expect_prompt(timeout=timeout)
126126
logging.info("Booted to shell prompt")
127127

128128

lib/qemu.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ def apply_defaults(self):
149149
self.cmdline += 'root=/dev/vda2 '
150150
self.prompt = 'root@debian:~#'
151151

152+
if self.prompt is None:
153+
# Default prompt for our root disks
154+
self.prompt = "/ #"
155+
152156
if self.initrd is None and self.drive is None and self.cloud_image is None:
153157
if self.compat_rootfs or self.qemu_path.endswith('qemu-system-ppc'):
154158
subarch = 'ppc'
@@ -368,7 +372,8 @@ def qemu_main(qconf):
368372
p = PexpectHelper()
369373
p.spawn(cmd, logfile=open(qconf.logpath, 'w'), timeout=pexpect_timeout, quiet=qconf.quiet)
370374

371-
standard_boot(p, qconf.login, qconf.user, qconf.password, boot_timeout, qconf.prompt)
375+
p.push_prompt(qconf.prompt)
376+
standard_boot(p, qconf.login, qconf.user, qconf.password, boot_timeout)
372377

373378
p.send('echo "booted-revision: `uname -r`"')
374379
p.expect(f'booted-revision: {qconf.expected_release}')

0 commit comments

Comments
 (0)