Skip to content

Commit a3c33d6

Browse files
committed
Revert "sanitycheck: remove import of dt kconfig symbols"
PR zephyrproject-rtos#20204 broke master for boards without DTS PR zephyrproject-rtos#20365 tried to partially fix it, but the filtering in sanitycheck remained broken Let's quickly revert it to allow other PRs to come in, and then resubmit them in a separate PR. This reverts commit 9b5720d. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent a80fbe9 commit a3c33d6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/sanitycheck

+17
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,7 @@ class CMake():
17201720

17211721
self.defconfig = {}
17221722
self.cmake_cache = {}
1723+
self.devicetree = {}
17231724

17241725
self.instance = None
17251726
self.testcase = testcase
@@ -1862,7 +1863,10 @@ class FilterBuilder(CMake):
18621863
if self.platform.name == "unit_testing":
18631864
return {}
18641865

1866+
_generated_dt_confg = "include/generated/generated_dts_board.conf"
1867+
18651868
cmake_cache_path = os.path.join(self.build_dir, "CMakeCache.txt")
1869+
dt_config_path = os.path.join(self.build_dir, "zephyr", _generated_dt_confg)
18661870
defconfig_path = os.path.join(self.build_dir, "zephyr", ".config")
18671871

18681872
with open(defconfig_path, "r") as fp:
@@ -1888,13 +1892,26 @@ class FilterBuilder(CMake):
18881892

18891893
self.cmake_cache = cmake_conf
18901894

1895+
dt_conf = {}
1896+
if os.path.exists(dt_config_path):
1897+
with open(dt_config_path, "r") as fp:
1898+
for line in fp.readlines():
1899+
m = self.dt_re.match(line)
1900+
if not m:
1901+
if line.strip() and not line.startswith("#"):
1902+
sys.stderr.write("Unrecognized line %s\n" % line)
1903+
continue
1904+
dt_conf[m.group(1)] = m.group(2).strip()
1905+
self.devicetree = dt_conf
1906+
18911907
filter_data = {
18921908
"ARCH": self.platform.arch,
18931909
"PLATFORM": self.platform.name
18941910
}
18951911
filter_data.update(os.environ)
18961912
filter_data.update(self.defconfig)
18971913
filter_data.update(self.cmake_cache)
1914+
filter_data.update(self.devicetree)
18981915

18991916
if self.testcase and self.testcase.tc_filter:
19001917
try:

0 commit comments

Comments
 (0)