summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-09-06 20:26:47 +0200
committerChristian Breunig <christian@breunig.cc>2024-09-07 21:32:34 +0200
commitaa6ca5c65bddb1b473421573710faa00a3e52dbc (patch)
tree32e03fa0708a4c52a955bc93ba49566a1d20131d
parente5627bf050818f4f7b0ec9461ee66c285d244578 (diff)
downloadvyos-build-aa6ca5c65bddb1b473421573710faa00a3e52dbc.tar.gz
vyos-build-aa6ca5c65bddb1b473421573710faa00a3e52dbc.zip
Testsuite: T861: cleanup imports and use "kernel_flavor" from vyos_defaults
-rwxr-xr-xscripts/check-qemu-install10
1 files changed, 1 insertions, 9 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index d90e3756..02487eb1 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -45,10 +45,7 @@ import re
import tomli
from io import BytesIO
-from io import StringIO
from datetime import datetime
-from pathlib import Path
-from tomllib import loads as toml_loads
EXCEPTION = 0
now = datetime.now()
@@ -80,7 +77,6 @@ parser.add_argument('--tpmtest', help='Execute TPM encrypted config tests',
parser.add_argument('--qemu-cmd', help='Only generate QEMU launch command',
action='store_true', default=False)
-
args = parser.parse_args()
with open('data/defaults.toml', 'rb') as f:
@@ -98,14 +94,11 @@ class StreamToLogger(object):
def write(self, buf):
self.linebuf += buf
- #print('.')
while b'\n' in self.linebuf:
f = self.linebuf.split(b'\n', 1)
if len(f) == 2:
self.logger.debug(self.ansi_escape.sub('', f[0].decode(errors="replace").rstrip()))
self.linebuf = f[1]
- #print(f)
-
def flush(self):
pass
@@ -404,7 +397,6 @@ try:
# Basic Configmode/Opmode switch
#################################################
log.info('Basic CLI configuration mode test')
- kernel_flavor = toml_loads(Path('data/defaults.toml').read_text()).get('kernel_flavor')
c.sendline('configure')
c.expect(cfg_mode_prompt)
@@ -413,7 +405,7 @@ try:
c.sendline('show version')
c.expect(op_mode_prompt)
c.sendline('show version kernel')
- c.expect(f'{vyos_defaults["kernel_version"]}-{kernel_flavor}')
+ c.expect(f'{vyos_defaults["kernel_version"]}-{vyos_defaults["kernel_flavor"]}')
c.expect(op_mode_prompt)
c.sendline('show version frr')
c.expect(op_mode_prompt)