diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-01-11 11:51:10 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-01-11 11:51:10 +0000 |
commit | 51895a5c98fcfb3c1400123c1ab1da4c0b8434c5 (patch) | |
tree | 6f2cf204343509b58b7c6990df0d59f7d5f25bec /scripts | |
parent | aae746aa7b86ace255063a50e4075e2e9bef390e (diff) | |
download | vyos-build-51895a5c98fcfb3c1400123c1ab1da4c0b8434c5.tar.gz vyos-build-51895a5c98fcfb3c1400123c1ab1da4c0b8434c5.zip |
T7043: Add arguments for CPU and memory for the check-qemu-install
Some smoketest requires more than 4G memory.
And --cpu and --memory args for check-qemu-install
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-qemu-install | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 11083706..5a59f13c 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2019-2024, VyOS maintainers and contributors +# Copyright (C) 2019-2025, VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -95,6 +95,8 @@ parser.add_argument('--sbtest', help='Execute Secure Boot tests', action='store_true', default=False) parser.add_argument('--qemu-cmd', help='Only generate QEMU launch command', action='store_true', default=False) +parser.add_argument('--cpu', help='Set QEMU CPU', type=int, default=2) +parser.add_argument('--memory', help='Set QEMU memory', type=int, default=4) args = parser.parse_args() @@ -168,11 +170,11 @@ def get_qemu_cmd(name, enable_uefi, disk_img, raid=None, iso_img=None, tpm=False macbase = '00:00:5E:00:53' cmd = f'qemu-system-x86_64 \ -name "{name}" \ - -smp 2,sockets=1,cores=2,threads=1 \ + -smp {args.cpu},sockets=1,cores={args.cpu},threads=1 \ -cpu host \ -machine {machine},accel=kvm \ {uefi} \ - -m 4G \ + -m {args.memory}G \ -vga none \ -nographic \ {vga} {vnc}\ @@ -546,6 +548,10 @@ try: c.sendline('systemd-detect-virt') c.expect('kvm') c.expect(op_mode_prompt) + c.sendline('show system cpu') + c.expect(op_mode_prompt) + c.sendline('show system memory') + c.expect(op_mode_prompt) ################################################# # Verify /etc/os-release via lsb_release |