summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@mandelbit.com>2026-09-11 14:13:02 +0200
committerAntonio Quartulli <antonio@mandelbit.com>2026-09-12 22:52:33 +0200
commitdf46ba4cf9f95014eef26afa5324197d30d77dd1 (patch)
tree98faebb85311b619e498052c1cbd0cd7e55932d9 /scripts
parent3c2975c530e777dd56ac5adb293700bb15237620 (diff)
downloadvyos-build-df46ba4cf9f95014eef26afa5324197d30d77dd1.tar.gz
vyos-build-df46ba4cf9f95014eef26afa5324197d30d77dd1.zip
Testsuite: T9301: read the console type where GRUB keeps it
The installer writes the GRUB defaults to the persistence partition, and on a running image the /boot of the booted image is not that partition, so the check never found the file and declared the image unusable. Resolve the persistence directory the way vyos.system.grub does instead of assuming "/".
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-qemu-install12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index 57ece12a..58c45f39 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -739,8 +739,16 @@ def basic_cli_tests(c):
c.expect(rf'set system console device {console_dev} kernel\r\r\nset system console device {console_dev} speed \'{re.escape(console_speed)}\'')
c.expect(op_mode_prompt)
- # Validate GRUB has the right console_type defined
- c.sendline('cat /boot/grub/grub.cfg.d/20-vyos-defaults-autoload.cfg | grep "set console_type"')
+ # Validate GRUB has the right console_type defined. The GRUB configuration
+ # lives on the persistence partition, which is not the running image's
+ # /boot - resolve it the way vyos.system.grub does.
+ persistence = get_cmd_output(
+ c,
+ 'python3 -c "from vyos.system.disk import find_persistence;'
+ ' print(find_persistence())"',
+ )
+ c.sendline(f'grep "set console_type" '
+ f'{persistence}/boot/grub/grub.cfg.d/20-vyos-defaults-autoload.cfg')
c.expect(rf'set console_type="{re.escape(console_type)}"')
c.expect(op_mode_prompt)