diff options
author | Christian Breunig <christian@breunig.cc> | 2024-12-31 18:06:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-31 18:06:25 +0100 |
commit | 72c2a011d7cd53a082a8f5a31c187d12925a6be8 (patch) | |
tree | 270d8ccddb3b95cd867df079a073aaa6e6e3d2a9 | |
parent | 9f4d1e02b501e951910912f7a0541eff23a393d9 (diff) | |
parent | 81ae7efbac6cce251092ae91719611007a07a5f7 (diff) | |
download | vyos-build-72c2a011d7cd53a082a8f5a31c187d12925a6be8.tar.gz vyos-build-72c2a011d7cd53a082a8f5a31c187d12925a6be8.zip |
Merge pull request #872 from c-po/testsuite-update
Testsuite: T861: inform smoketest about this environment
-rwxr-xr-x | scripts/check-qemu-install | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 7faea56f..755a8307 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -121,13 +121,6 @@ class StreamToLogger(object): def flush(self): pass -def get_half_cpus(): - """ return 1/2 of the numbers of available CPUs """ - cpu = os.cpu_count() - if cpu > 1: - cpu /= 2 - return int(cpu) - OVMF_CODE = '/usr/share/OVMF/OVMF_CODE_4M.secboot.fd' OVMF_VARS_TMP = args.disk.replace('.img', '.efivars') if args.sbtest: @@ -162,13 +155,10 @@ def get_qemu_cmd(name, enable_uefi, disk_img, raid=None, iso_img=None, tpm=False f' -device ahci,id=achi0' \ f' -device ide-cd,bus=achi0.0,drive=drive-cd1,id=cd1,bootindex=10' - # test using half of the available CPUs on the system - cpucount = get_half_cpus() - - macbase = '52:54:00:00:00' + macbase = '02:00:00:00:00' cmd = f'qemu-system-x86_64 \ -name "{name}" \ - -smp {cpucount},sockets=1,cores={cpucount},threads=1 \ + -smp 2,sockets=1,cores=2,threads=1 \ -cpu host \ -machine {machine},accel=kvm \ {uefi} \ @@ -385,8 +375,10 @@ try: toggleUEFISecureBoot(c) try: - c.expect('Automatic boot in', timeout=10) - c.sendline('') + c.expect('Welcome to GRUB', timeout=10) + c.send(KEY_DOWN) + c.send(KEY_DOWN) + c.send(KEY_RETURN) except pexpect.TIMEOUT: log.warning('Did not find GRUB countdown window, ignoring') @@ -544,12 +536,17 @@ try: c.sendline('systemd-detect-virt') c.expect('kvm') c.expect(op_mode_prompt) + # Ensure ephemeral key is loaded vyos_kernel_key = 'VyOS build time autogenerated kernel key' c.sendline(f'show log kernel | match "{vyos_kernel_key}"') c.expect(f'.*{vyos_kernel_key}.*') c.expect(op_mode_prompt) + # Inform smoketest about this environment + c.sendline('touch /tmp/vyos.smoketests.hint') + c.expect(op_mode_prompt) + ################################################# # Executing test-suite ################################################# |