From 6194159608f6bc248612f2b2ca412f7756013a8a Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Mon, 3 Jun 2024 08:36:36 +0100 Subject: [PATCH] scripts: twister: handlers: Enable BinaryHandler to run sysbuilt tests Running sysbuilt tests fails because of missing "run" target. This adds the default domain context to the command. Signed-off-by: Wilfried Chauveau --- scripts/pylib/twister/twisterlib/handlers.py | 2 +- scripts/tests/twister/test_handlers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pylib/twister/twisterlib/handlers.py b/scripts/pylib/twister/twisterlib/handlers.py index 90b834cd402565..0ebab95434bf6a 100755 --- a/scripts/pylib/twister/twisterlib/handlers.py +++ b/scripts/pylib/twister/twisterlib/handlers.py @@ -263,7 +263,7 @@ def _create_command(self, robot_test): "--variable", "RESC:@" + resc, "--variable", "UART:" + uart] elif self.call_make_run: - command = [self.generator_cmd, "run"] + command = [self.generator_cmd, "-C", self.get_default_domain_build_dir(), "run"] elif self.instance.testsuite.type == "unit": command = [self.binary] else: diff --git a/scripts/tests/twister/test_handlers.py b/scripts/tests/twister/test_handlers.py index 9c6a2f5b130b65..3475c65197e348 100644 --- a/scripts/tests/twister/test_handlers.py +++ b/scripts/tests/twister/test_handlers.py @@ -419,7 +419,7 @@ def wait(self, *args, **kwargs): f'--suppressions={ZEPHYR_BASE}/scripts/valgrind.supp', '--log-file=build_dir/valgrind.log', '--track-origins=yes', 'generator']), - (False, True, False, 123, None, ['generator', 'run', '--seed=123']), + (False, True, False, 123, None, ['generator', '-C', 'build_dir', 'run', '--seed=123']), (False, False, False, None, ['ex1', 'ex2'], ['build_dir/zephyr/zephyr.exe', 'ex1', 'ex2']), ]