summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-12-11 16:09:37 +0100
committerChristian Breunig <christian@breunig.cc>2025-12-11 16:09:37 +0100
commitfe158b284613a918637e08f3ecb27c15f5236b66 (patch)
tree1105b2dc3a0027b482808bd8e29a53db943dd49d /scripts
parent7a5f513f801edf80f83f2c52710ac666c4becc56 (diff)
downloadvyos-build-fe158b284613a918637e08f3ecb27c15f5236b66.tar.gz
vyos-build-fe158b284613a918637e08f3ecb27c15f5236b66.zip
smoketest: T8087: reorganize folderstructure for embedded configttests
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-qemu-install17
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index 6482d131..027deb16 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -913,18 +913,19 @@ try:
elif args.smoketest:
# run default smoketest suite
+ smoketests_path = '/usr/libexec/vyos/tests/smoke'
if args.match:
# Remove tests that we don't want to run
match_str = '-o '.join([f'-name "test_*{name}*.py" ' for name in args.match.split("|")]).strip()
- c.sendline(f'sudo find /usr/libexec/vyos/tests/smoke -maxdepth 2 -type f -name test_* ! \( {match_str} \) -delete')
+ c.sendline(f'sudo find {smoketests_path} -maxdepth 2 -type f -name test_* ! \( {match_str} \) -delete')
c.expect(op_mode_prompt)
if args.no_interfaces:
# remove interface tests as they consume a lot of time
- c.sendline('sudo rm -f /usr/libexec/vyos/tests/smoke/cli/test_interfaces_*')
+ c.sendline('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 /usr/libexec/vyos/tests/smoke/cli/test_vpp*')
+ c.sendline('sudo rm -f {smoketests_path}/cli/test_vpp*')
c.expect(op_mode_prompt)
if args.vyconf:
@@ -959,24 +960,26 @@ try:
elif args.configtest:
# Remove config-tests that we don't want to run
if args.match:
+ configs_path = '/usr/libexec/vyos/tests/configs'
if args.match.startswith("!"):
# Exclude mode — delete only the matched names
names = args.match[1:].split("|")
match_str = '-o '.join([f'-name "{name}"' for name in names])
- cleanup_config_dir_cmd = f'sudo find /usr/libexec/vyos/tests/config -mindepth 1 -maxdepth 1 \\( {match_str} \\) -exec rm -rf {{}} +'
- cleanup_config_tests_dir_cmd = f'sudo find /usr/libexec/vyos/tests/config-tests -mindepth 1 -maxdepth 1 \\( {match_str} \\) -exec rm -rf {{}} +'
+ cleanup_config_dir_cmd = f'sudo find {configs_path} -mindepth 1 -maxdepth 1 -type f \\( {match_str} \\) -exec rm -rf {{}} +'
+ cleanup_config_tests_dir_cmd = f'sudo find {configs_path}/assert -mindepth 1 -maxdepth 1 -type f \\( {match_str} \\) -exec rm -rf {{}} +'
else:
# Include mode — keep only the matched names, delete the rest
names = args.match.split("|")
match_str = '-o '.join([f'-name "{name}"' for name in names])
- cleanup_config_dir_cmd = f'sudo find /usr/libexec/vyos/tests/config -mindepth 1 -maxdepth 1 ! \\( {match_str} \\) -exec rm -rf {{}} +'
- cleanup_config_tests_dir_cmd = f'sudo find /usr/libexec/vyos/tests/config-tests -mindepth 1 -maxdepth 1 ! \\( {match_str} \\) -exec rm -rf {{}} +'
+ cleanup_config_dir_cmd = f'sudo find {configs_path} -mindepth 1 -maxdepth 1 -type f ! \\( {match_str} \\) -exec rm -rf {{}} +'
+ cleanup_config_tests_dir_cmd = f'sudo find {configs_path}/assert -mindepth 1 -maxdepth 1 -type f ! \\( {match_str} \\) -exec rm -rf {{}} +'
c.sendline(cleanup_config_dir_cmd)
c.expect(op_mode_prompt)
c.sendline(cleanup_config_tests_dir_cmd)
c.expect(op_mode_prompt)
+
log.info('Adding a legacy WireGuard default keypair for migrations')
c.sendline('sudo mkdir -p /config/auth/wireguard/default')
c.expect(op_mode_prompt)