From 71b6e5262073c0b3c9701e5de5b88e343f29b008 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 12 Dec 2025 13:30:05 +0100 Subject: smoketest: T8087: bugfix missing f-ormat string indicator Commit fe158b284 ("smoketest: T8087: reorganize folderstructure for embedded configttests") missed out defining the string to use with an 'f' prefix. --- scripts/check-qemu-install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 027deb16..fadd0a9e 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -921,11 +921,11 @@ try: c.expect(op_mode_prompt) if args.no_interfaces: # remove interface tests as they consume a lot of time - c.sendline('sudo rm -f {smoketests_path}/cli/test_interfaces_*') + c.sendline(f'sudo rm -f {smoketests_path}/cli/test_interfaces_*') c.expect(op_mode_prompt) if args.no_vpp: # remove VPP tests - c.sendline('sudo rm -f {smoketests_path}/cli/test_vpp*') + c.sendline(f'sudo rm -f {smoketests_path}/cli/test_vpp*') c.expect(op_mode_prompt) if args.vyconf: -- cgit v1.2.3 From 357ca61da171bcefcc0f6ff981dec5f6260e936a Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 12 Dec 2025 13:32:18 +0100 Subject: Testsuite: T8087: fix pylint warning --- scripts/check-qemu-install | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index fadd0a9e..b2ebe750 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -32,7 +32,6 @@ # [--silent] only print on errors # [--debug] print all communication with the device -import pexpect import sys import os import time @@ -42,13 +41,15 @@ import random import traceback import logging import re -import tomli import shutil import json from io import BytesIO from datetime import datetime +import tomli +import pexpect + EXCEPTION = 0 now = datetime.now() tpm_folder = '/tmp/vyos_tpm_test' @@ -310,10 +311,10 @@ def start_swtpm(): os.mkdir(tpm_folder) def swtpm_thread(): - c = subprocess.check_output([ - 'swtpm', 'socket', '--tpmstate', f'dir={tpm_folder}', - '--ctrl', f'type=unixio,path={tpm_folder}/swtpm-sock', '--tpm2', '--log', 'level=1' - ]) + subprocess.check_output([ + 'swtpm', 'socket', '--tpmstate', f'dir={tpm_folder}', + '--ctrl', f'type=unixio,path={tpm_folder}/swtpm-sock', '--tpm2', '--log', 'level=1' + ]) from multiprocessing import Process tpm_process = Process(target=swtpm_thread) @@ -940,9 +941,9 @@ try: if i == 0: raise Exception('Invalid command detected') - elif i == 1: + if i == 1: raise Exception('Set syntax failed :/') - elif i == 2: + if i == 2: tmp = '(W)hy (T)he (F)ace? VyOS smoketest not found!' log.error(tmp) raise Exception(tmp) @@ -989,7 +990,7 @@ try: c.expect(op_mode_prompt) log.info('Generating PKI objects') - c.sendline(f'/usr/bin/vyos-configtest-pki') + c.sendline('/usr/bin/vyos-configtest-pki') c.expect(op_mode_prompt, timeout=900) script_file = '/config/scripts/vyos-foo-update.script' -- cgit v1.2.3