From 05e3d7f8934d1b5c95f80fb1b0ee00d2eb4a99ac Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Tue, 9 Aug 2016 11:29:34 -0700 Subject: [PATCH] sanitycheck: complain loudly about missing platforms If defconfig files exist under boards/ that don't correspond to the set of platforms defined in the .ini files under scripts/sanity_chk/arches, complain about this. We should be at least compiling all our supported platforms in CI runs. At the moment it flags 5 boards. Future patches should either add these boards to the appropriate arch .ini files or remove them from the kernel. Change-Id: Id825d6c6bd32089d9f1bead11bc0765685e3771a Signed-off-by: Andrew Boie --- scripts/sanitycheck | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/sanitycheck b/scripts/sanitycheck index a326ab2b6a5..962de9ba527 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -1190,7 +1190,18 @@ class TestSuite: self.arches[arch.name] = arch self.platforms.extend(arch.platforms) - + # Build up a list of boards based on the presence of + # boards/*/*_defconfig files. We want to make sure that the arch.ini + # files are not missing any boards + all_plats = [plat.name for plat in self.platforms] + for dirpath, dirnames, filenames in os.walk(os.path.join(ZEPHYR_BASE, + "boards")): + for filename in filenames: + if filename.endswith("_defconfig"): + board_name = filename.replace("_defconfig", "") + if board_name not in all_plats: + error("Platform '%s' not specified in any arch .ini file and will not be tested" + % board_name) self.instances = {} def get_last_failed(self):