diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-09-09 20:01:58 +0200 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2023-09-14 20:04:54 +0200 |
commit | 4727dc17566a85eb15c95ac97511bf6452352adb (patch) | |
tree | c1b7a021cfdc0a935c218d487657befaadd1fa7e /scripts | |
parent | e7c29ed7be44e33a1b804f93deceefa1b82790df (diff) | |
download | vyos-build-4727dc17566a85eb15c95ac97511bf6452352adb.tar.gz vyos-build-4727dc17566a85eb15c95ac97511bf6452352adb.zip |
smoketest: Allow selection of smoketests to run
Example:
`make test MATCH="interfaces|policy"` will only run interfaces and policy tests
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-qemu-install | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index fabe8fbb..82c20ed3 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -63,6 +63,7 @@ parser.add_argument('--silent', help='Do not show output on stdout unless an err parser.add_argument('--debug', help='Send all debug output to stdout', action='store_true', default=False) parser.add_argument('--logfile', help='Log to file') +parser.add_argument('--match', help='Smoketests to run') parser.add_argument('--uefi', help='Boot using UEFI', action='store_true', default=False) parser.add_argument('--raid', help='Perform a RAID-1 install', action='store_true', default=False) parser.add_argument('--no-kvm', help='Disable use of kvm', action='store_true', default=False) @@ -486,6 +487,11 @@ try: elif not args.configtest: # run default smoketest suite + 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/cli/test_* -type f ! \( {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_*') |