mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00

Add a script which from the exit code determines if a build target is present in the configuration. The autobuilder can use this to determine whether to execute the target at all or whether to skip it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
564 B
Executable File
564 B
Executable File
#!/usr/bin/env python3
Check whether a target exists in config.json
import json import os import sys
import utils
parser = utils.ArgParser(description='Runs configurations in json.conf.')
parser.add_argument('target', help="The 'nightly' target the autobuilder is running")
args = parser.parse_args()
scriptsdir = os.path.dirname(os.path.realpath(file)) os.environ["SCRIPTSDIR"] = scriptsdir ourconfig = utils.loadconfig()
Find out if this target exists
if args.target in ourconfig['overrides']: sys.exit(0) sys.exit(1)