diff options
Diffstat (limited to 'scripts/check-qemu-install')
-rwxr-xr-x | scripts/check-qemu-install | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 5a59f13c..f29c5f3d 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -105,11 +105,13 @@ with open('data/defaults.toml', 'rb') as f: vyos_defaults = tomli.load(f) # This is what we got from the build -with open('build/manifest.json', 'rb') as f: - manifest = json.load(f) +manifest_file = 'build/manifest.json' +if os.path.isfile(manifest_file): + with open('build/manifest.json', 'rb') as f: + manifest = json.load(f) -vyos_version = manifest['build_config']['version'] -vyos_codename = manifest['build_config']['release_train'] + vyos_version = manifest['build_config']['version'] + vyos_codename = manifest['build_config']['release_train'] class StreamToLogger(object): """ @@ -552,16 +554,19 @@ try: c.expect(op_mode_prompt) c.sendline('show system memory') c.expect(op_mode_prompt) + c.sendline('show version all | match "vpp|vyos-1x"') + c.expect(op_mode_prompt) ################################################# # Verify /etc/os-release via lsb_release ################################################# c.sendline('lsb_release --short --id 2>/dev/null') c.expect('VyOS') - c.sendline('lsb_release --short --release 2>/dev/null') - c.expect(vyos_version) - c.sendline('lsb_release --short --codename 2>/dev/null') - c.expect(vyos_codename) + if os.path.isfile(manifest_file): + c.sendline('lsb_release --short --release 2>/dev/null') + c.expect(vyos_version) + c.sendline('lsb_release --short --codename 2>/dev/null') + c.expect(vyos_codename) # Ensure ephemeral key is loaded vyos_kernel_key = 'VyOS build time autogenerated kernel key' |