summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-04-03 12:27:47 +0200
committerChristian Poessinger <christian@poessinger.com>2021-04-03 12:27:48 +0200
commitf04127aedb9fa4aac6fad5364c9cefe42cd4bbad (patch)
tree6dacf020ef3e0f6e6051d1e553eef1bf3d908d1a /scripts
parentc268b221d8eef99ab1bcfb85457045488ac2f834 (diff)
downloadvyos-build-f04127aedb9fa4aac6fad5364c9cefe42cd4bbad.tar.gz
vyos-build-f04127aedb9fa4aac6fad5364c9cefe42cd4bbad.zip
Testsuite: extend QEMU interactions
* Change the way how networking is setup to ensure that the network interface inside the QEMU gues is actually u/U instead of u/D * Use common base MAC address * Run "show interfaces" after installation to check all requirements are met
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-qemu-install21
1 files changed, 11 insertions, 10 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index ead8ed10..90cc6017 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2019, VyOS maintainers and contributors
+# Copyright (C) 2019-2021, 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
@@ -123,19 +123,17 @@ def get_qemu_cmd(name, enable_kvm, disk_img, iso_img=None):
# test using half of the available CPUs on the system
cpucount = get_half_cpus()
+ macbase = '52:54:00:00:00'
cmd = f'qemu-system-x86_64 \
-name "{name}" \
-smp {cpucount} \
-m 2G \
- -nic user,model=virtio,mac=52:54:99:12:34:56 \
- -nic user,model=virtio,mac=52:54:99:12:34:57 \
- -nic user,model=virtio,mac=52:54:99:12:34:58 \
- -nic user,model=virtio,mac=52:54:99:12:34:59 \
+ -netdev user,id=n1 -device virtio-net-pci,netdev=n1,mac={macbase}:01 \
+ -netdev user,id=n2 -device virtio-net-pci,netdev=n2,mac={macbase}:02 \
+ -netdev user,id=n3 -device virtio-net-pci,netdev=n3,mac={macbase}:03 \
+ -netdev user,id=n4 -device virtio-net-pci,netdev=n4,mac={macbase}:04 \
-machine accel=kvm \
- -nographic \
- {cpu} \
- {cdrom} \
- {kvm} \
+ -nographic {cpu} {cdrom} {kvm} \
-drive format=raw,file={disk_img}'
return cmd
@@ -315,9 +313,12 @@ try:
log.info('Basic CLI configuration mode test')
c.sendline('configure')
c.expect(r'vyos@vyos#')
- c.sendline('run show version')
c.sendline('exit')
c.expect(r'vyos@vyos:~\$')
+ c.sendline('show version')
+ c.expect(r'vyos@vyos:~\$')
+ c.sendline('show interfaces')
+ c.expect(r'vyos@vyos:~\$')
#################################################
# Executing test-suite