From: Richard Purdie Date: Thu, 9 May 2024 16:02:39 +0000 (+0100) Subject: insane: Fix case where S doesn't exist X-Git-Tag: uninative-4.5~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4041d91b63ff2315657499e22c74ec90adbf9e19;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git insane: Fix case where S doesn't exist If S doesn't exist, do_qa_patch would fail. Fix the code to not fail in this situation. Signed-off-by: Richard Purdie --- diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index c32dfffd836..03ac06b102f 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -1399,7 +1399,7 @@ python do_qa_patch() { oe.qa.handle_error("unimplemented-ptest", "%s: autotools-based tests detected" % d.getVar('PN'), d) # Last resort, detect a test directory in sources - elif any(filename.lower() in ["test", "tests"] for filename in os.listdir(srcdir)): + elif os.path.exists(srcdir) and any(filename.lower() in ["test", "tests"] for filename in os.listdir(srcdir)): oe.qa.handle_error("unimplemented-ptest", "%s: test subdirectory detected" % d.getVar('PN'), d) oe.qa.exit_if_errors(d)