Skip to content

Commit ae88e44

Browse files
galakaescolar
authored andcommitted
sanitycheck: fix filtering for boards without DTS
If we don't have a DTS (like nrf52_bsim) we shouldn't try and create an EDT, but we still need to call expr_parser.parse to filter testcases. So move the os.path.exists(dts_path) around the creation of the EDT. Fixes: #20371 Signed-off-by: Kumar Gala <[email protected]>
1 parent 3c57e7c commit ae88e44

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/sanitycheck

+5-2
Original file line numberDiff line numberDiff line change
@@ -1897,9 +1897,12 @@ class FilterBuilder(CMake):
18971897
filter_data.update(self.cmake_cache)
18981898

18991899
dts_path = os.path.join(self.build_dir, "zephyr", self.platform.name + ".dts.pre.tmp")
1900-
if self.testcase and self.testcase.tc_filter and os.path.exists(dts_path):
1900+
if self.testcase and self.testcase.tc_filter:
19011901
try:
1902-
edt = edtlib.EDT(dts_path, [os.path.join(ZEPHYR_BASE, "dts", "bindings")])
1902+
if os.path.exists(dts_path):
1903+
edt = edtlib.EDT(dts_path, [os.path.join(ZEPHYR_BASE, "dts", "bindings")])
1904+
else:
1905+
edt = None
19031906
res = expr_parser.parse(self.testcase.tc_filter, filter_data, edt)
19041907

19051908
except (ValueError, SyntaxError) as se:

0 commit comments

Comments
 (0)