Testsuite: T7043: make build/manifest.json optional

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.
This commit is contained in:
Christian Breunig 2025-01-22 20:44:56 +01:00
parent c1b5494ea0
commit f5887de05e

View File

@ -105,6 +105,8 @@ with open('data/defaults.toml', 'rb') as f:
vyos_defaults = tomli.load(f)
# This is what we got from the build
manifest_file = 'build/manifest.json'
if os.path.isfile(manifest_file):
with open('build/manifest.json', 'rb') as f:
manifest = json.load(f)
@ -558,6 +560,7 @@ try:
#################################################
c.sendline('lsb_release --short --id 2>/dev/null')
c.expect('VyOS')
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')