diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-09-13 08:21:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-13 08:21:59 +0200 |
| commit | 1bae4beea17f1228d4afe7007244584f3b885eac (patch) | |
| tree | 98faebb85311b619e498052c1cbd0cd7e55932d9 /scripts | |
| parent | 3c2975c530e777dd56ac5adb293700bb15237620 (diff) | |
| parent | df46ba4cf9f95014eef26afa5324197d30d77dd1 (diff) | |
| download | vyos-build-1bae4beea17f1228d4afe7007244584f3b885eac.tar.gz vyos-build-1bae4beea17f1228d4afe7007244584f3b885eac.zip | |
Merge pull request #1302 from ordex/T9301-console-check-persistence
Testsuite: T9301: read the console type where GRUB keeps it
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/check-qemu-install | 12 |
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) |
