From 7afeefd7dde43a29fc76529eeba825cb2d0bbeeb Mon Sep 17 00:00:00 2001 From: Dmitrii Golovanov Date: Wed, 5 Jul 2023 20:32:09 +0200 Subject: [PATCH] twister: Fix flashing timeout command line options check Fix `--device-flash-with-test` command line options check logic to be effective with `--device-testing`. Remove `--device-flash-timeout` check for `--device-testing` presence as marginal. Signed-off-by: Dmitrii Golovanov --- scripts/pylib/twister/twisterlib/environment.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/pylib/twister/twisterlib/environment.py b/scripts/pylib/twister/twisterlib/environment.py index 0c53a18b993..53ef2db14e0 100644 --- a/scripts/pylib/twister/twisterlib/environment.py +++ b/scripts/pylib/twister/twisterlib/environment.py @@ -729,12 +729,8 @@ def parse_arguments(parser, args, options = None): only one platform is allowed""") sys.exit(1) - if options.device_flash_timeout and options.device_testing is None: - logger.error("--device-flash-timeout requires --device-testing") - sys.exit(1) - - if options.device_flash_with_test and options.device_testing is None: - logger.error("--device-flash-with-test requires --device-testing") + if options.device_flash_with_test and not options.device_testing: + logger.error("--device-flash-with-test requires --device_testing") sys.exit(1) if options.shuffle_tests and options.subset is None: