sanitycheck: raise exceptions on bad test names
Raise exception on bad test names such as 'test' or 'sample'.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/scripts/sanity_chk/sanitylib.py b/scripts/sanity_chk/sanitylib.py
index f042f20..6c8d512 100644
--- a/scripts/sanity_chk/sanitylib.py
+++ b/scripts/sanity_chk/sanitylib.py
@@ -1336,6 +1336,12 @@
# workdir can be "."
unique = os.path.normpath(os.path.join(relative_tc_root, workdir, name))
+ check = name.split(".")
+ if len(check) < 2:
+ raise SanityCheckException(f"""bad test name '{name}' in {testcase_root}/{workdir}. \
+Tests should reference the category and subsystem with a dot as a separator.
+ """
+ )
return unique
@staticmethod