From 9894b84a2dfd11226bf417b0daaf7f89193edabb Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Thu, 1 Aug 2024 11:24:17 +0200 Subject: [PATCH] scripts: west_commands: build: Fix empty testcase An empty but specified testcase does not build, check if the test key exists instead. Signed-off-by: Pieter De Gendt --- scripts/west_commands/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/west_commands/build.py b/scripts/west_commands/build.py index 0a241f3bc5b..6bedd61937f 100644 --- a/scripts/west_commands/build.py +++ b/scripts/west_commands/build.py @@ -294,9 +294,9 @@ class Build(Forceable): tests = y.get('tests') if not tests: log.die(f"No tests found in {yf}") - item = tests.get(test_item) - if not item: + if test_item not in tests: log.die(f"Test item {test_item} not found in {yf}") + item = tests.get(test_item) sysbuild = False extra_dtc_overlay_files = []