Skip to content

Commit

Permalink
Testsuite: T7043: make build/manifest.json optional
Browse files Browse the repository at this point in the history
Support loading and testing random ISO images without the need for
build/manifest.json. If the file is detected - tests are run. If file is
not found - those tests are skipped.
  • Loading branch information
c-po committed Jan 22, 2025
1 parent c1b5494 commit f5887de
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions scripts/check-qemu-install
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -558,10 +560,11 @@ try:
#################################################
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'
Expand Down

0 comments on commit f5887de

Please sign in to comment.