diff options
author | Christian Breunig <christian@breunig.cc> | 2024-09-06 20:54:38 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-09-07 21:32:34 +0200 |
commit | e86bfd7ab96333fb3dec62a15b9e9720d95dbda8 (patch) | |
tree | 09389f5bdffa61dadae519252737d889df9200bb /scripts | |
parent | 6ef7069098245cee78918b84821909fcdb42b39d (diff) | |
download | vyos-build-e86bfd7ab96333fb3dec62a15b9e9720d95dbda8.tar.gz vyos-build-e86bfd7ab96333fb3dec62a15b9e9720d95dbda8.zip |
Testsuite: T861: add explicit --smoketest argument
In the past the CLI based smoketest was always executed under an else branch in
the testcase if-statement. Instead of using negative logic move all testcases
to positive logic adding an empty "catch all" else path.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-qemu-install | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index eb126e92..921384cc 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -72,6 +72,8 @@ parser.add_argument('--configd', help='Execute testsuite with config daemon', ac default=False) parser.add_argument('--no-interfaces', help='Execute testsuite without interface tests to save time', action='store_true', default=False) +parser.add_argument('--smoketest', help='Execute script based CLI smoketests', + action='store_true', default=False) parser.add_argument('--configtest', help='Execute load/commit config tests', action='store_true', default=False) parser.add_argument('--tpmtest', help='Execute TPM encrypted config tests', @@ -634,7 +636,7 @@ try: c.sendline('cat /proc/mdstat') c.expect(op_mode_prompt) - elif not args.configtest: + elif args.smoketest: # run default smoketest suite if args.match: # Remove tests that we don't want to run @@ -670,7 +672,7 @@ try: raise Exception("Smoketest-failed, please look into debug output") # else, run configtest suite - else: + elif args.configtest: log.info('Adding a legacy WireGuard default keypair for migrations') c.sendline('sudo mkdir -p /config/auth/wireguard/default') c.expect(op_mode_prompt) @@ -695,7 +697,7 @@ try: if i==0: raise Exception('Invalid command detected') elif i==1: - tmp = '(W)hy (T)he (F)ace? VyOS smoketest not found!' + tmp = 'VyOS smoketest not found!' log.error(tmp) raise Exception(tmp) @@ -709,6 +711,9 @@ try: log.error(tmp) raise Exception(tmp) + else: + log.info('No testcase selected!') + shutdownVM(c, log, 'Powering off system') c.close() @@ -752,3 +757,5 @@ if EXCEPTION: log.error('Hmm... system got an exception while processing.') log.error('The ISO image is not considered usable!') sys.exit(1) + +sys.exit(0) |