diff options
-rw-r--r-- | meta/classes-global/insane.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index cd26bf5eb9..152bef8ad5 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
@@ -1332,6 +1332,13 @@ python do_qa_patch() { | |||
1332 | elif os.path.exists(os.path.join(srcdir, "Makefile.in")) and (match_line_in_files(srcdir, "**/Makefile.in", r'\s*TESTS\s*\+?=') or match_line_in_files(srcdir,"**/*.at",r'.*AT_INIT')): | 1332 | elif os.path.exists(os.path.join(srcdir, "Makefile.in")) and (match_line_in_files(srcdir, "**/Makefile.in", r'\s*TESTS\s*\+?=') or match_line_in_files(srcdir,"**/*.at",r'.*AT_INIT')): |
1333 | oe.qa.handle_error("unimplemented-ptest", "%s: autotools-based tests detected" % d.getVar('PN'), d) | 1333 | oe.qa.handle_error("unimplemented-ptest", "%s: autotools-based tests detected" % d.getVar('PN'), d) |
1334 | 1334 | ||
1335 | # Detect cargo-based tests | ||
1336 | elif os.path.exists(os.path.join(srcdir, "Cargo.toml")) and ( | ||
1337 | match_line_in_files(srcdir, "**/*.rs", r'\s*#\s*\[\s*test\s*\]') or | ||
1338 | match_line_in_files(srcdir, "**/*.rs", r'\s*#\s*\[\s*cfg\s*\(\s*test\s*\)\s*\]') | ||
1339 | ): | ||
1340 | oe.qa.handle_error("unimplemented-ptest", "%s: cargo-based tests detected" % d.getVar('PN'), d) | ||
1341 | |||
1335 | # Last resort, detect a test directory in sources | 1342 | # Last resort, detect a test directory in sources |
1336 | elif os.path.exists(srcdir) and any(filename.lower() in ["test", "tests"] for filename in os.listdir(srcdir)): | 1343 | elif os.path.exists(srcdir) and any(filename.lower() in ["test", "tests"] for filename in os.listdir(srcdir)): |
1337 | oe.qa.handle_error("unimplemented-ptest", "%s: test subdirectory detected" % d.getVar('PN'), d) | 1344 | oe.qa.handle_error("unimplemented-ptest", "%s: test subdirectory detected" % d.getVar('PN'), d) |