scripts: depends-py: add the possibility to provide a fully custom build-and-test command

This is useful for debugging purposes because, for example, the user
only want to build a specific suite and/or only run it instead of
building and testing everything for all the jobs.
For this scope the custom command can be a bash script that's executed
instead of 'make' + 'make test'.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2026-09-17 11:24:40 +02:00
parent 5471f382e5
commit dff951822a

View File

@ -429,8 +429,11 @@ class DomainData:
# pylint: disable=too-many-locals
def __init__(self, options, conf):
"""Gather data about the library and establish a list of domains to test."""
build_command = [options.make_command, '-f', 'scripts/legacy.make', 'CFLAGS=-Werror -O2']
build_and_test = [build_command, [options.make_command, '-f',
if options.build_and_test_command:
build_and_test = [[options.build_and_test_command]]
else:
build_command = [options.make_command, '-f', 'scripts/legacy.make', 'CFLAGS=-Werror -O2']
build_and_test = [build_command, [options.make_command, '-f',
'scripts/legacy.make', 'test']]
self.all_config_symbols = set(conf.settings.keys())
psa_info = psa_information.Information().constructors
@ -600,6 +603,8 @@ def main():
parser.add_argument('--make-command', metavar='CMD',
help='Command to run instead of make (e.g. gmake)',
action='store', default='make')
parser.add_argument('--build-and-test-command',
help='Provide a custom command or script to build and test')
parser.add_argument('tasks', metavar='TASKS', nargs='*',
help='The domain(s) or job(s) to test (default: all).',
default=True)