From 802600da7b0396ee515ddf68abf69d95ba33ecf5 Mon Sep 17 00:00:00 2001 From: Andrey Borisovich Date: Mon, 6 Feb 2023 15:33:40 +0100 Subject: [PATCH] scripts: twister: west twister error codes match twister direct call This commit fixes #54492 where return code 1 is returned when twister tests fail when twister is called directly and return code 0 in similar scenario but twister is invoked using west. Signed-off-by: Andrey Borisovich --- scripts/west_commands/twister_cmd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/west_commands/twister_cmd.py b/scripts/west_commands/twister_cmd.py index b6b599416d8..b10aae71d43 100644 --- a/scripts/west_commands/twister_cmd.py +++ b/scripts/west_commands/twister_cmd.py @@ -57,7 +57,8 @@ class Twister(WestCommand): ) options = self._parse_arguments(args=remainder, options=args) - main(options) + ret = main(options) + sys.exit(ret) def _parse_arguments(self, args, options): """Helper function for testing purposes"""