diff options
author | Holger Freyther <zecke@selfish.org> | 2007-02-16 15:45:38 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2007-02-16 15:45:38 +0000 |
commit | 4d1da7a5ba85a15e1ea6f483a85026f56841f1ac (patch) | |
tree | 53a2549ac3841c60f42fc763a39e4461222e8ad3 /classes/insane.bbclass | |
parent | 1e37747e5b6b1edf55ddd01569752866f8e679dd (diff) |
classes/insane.bbclass: Grep through config.log to check for CROSS Compile errors
-Inspired by doku's work on mpd's buildsystem grep through
the config.log and find broken autotools tests
-Make errors fatal so we will notice these things more quickly.
Diffstat (limited to 'classes/insane.bbclass')
-rw-r--r-- | classes/insane.bbclass | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/classes/insane.bbclass b/classes/insane.bbclass index e30375288d..2599348351 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -9,6 +9,7 @@ # -Check if .la files wrongly point to workdir # -Check if .pc files wrongly point to workdir # -Check if packages contains .debug directories or .so files where they should be in -dev or -dbg +# -Check if config.log contains traces to broken autoconf tests # @@ -33,12 +34,12 @@ def package_qa_check_rpath(file,name,d): if not os.path.exists(scanelf): bb.note("Can not check RPATH scanelf not found") if not bad_dir in bb.data.getVar('WORKDIR', d, True): - bb.error("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") + bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") output = os.popen("%s -Byr %s" % (scanelf,file)) txt = output.readline().rsplit() if bad_dir in txt: - bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, txt, file)) + bb.fatal("QA Issue package %s contains bad RPATH %s in file %s" % (name, txt, file)) pass @@ -51,11 +52,11 @@ def package_qa_check_devdbg(path, name,d): import bb if not "-dev" in name: if path[-3:] == ".so": - bb.error("QA Issue: non dev package contains .so: %s" % name) + bb.fatal("QA Issue: non dev package contains .so: %s" % name) if not "-dbg" in name: if '.debug' in path: - bb.error("QA Issue: non debug package contains .debug directory: %s" % name) + bb.fatal("QA Issue: non debug package contains .debug directory: %s" % name) def package_qa_check_perm(path,name,d): """ @@ -121,7 +122,7 @@ def package_qa_check_rdepends(pkg, workdir, d): # Now do the sanity check!!! for rdepend in rdepends: if "-dbg" in rdepend: - bb.error("QA issue, koen give us a better msg!!!") + bb.fatal("QA issue, koen give us a better msg!!!") # The PACKAGE FUNC to scan each package python do_package_qa () { @@ -149,3 +150,14 @@ python do_qa_staging() { package_qa_check_staged(bb.data.getVar('STAGING_DIR',d,True), d) } + +# Check broken config.log files +addtask qa_configure after do_configure before do_compile +python do_qa_configure() { + bb.note("Checking sanity of the config.log file") + import os + for root, dirs, files in os.walk(bb.data.getVar('S', d, True)): + if "config.log" in files: + if os.system("grep 'CROSS COMPILE Badness:' %s > /dev/null" % (os.path.join(root,"config.log"))) == 0: + bb.fatal("This autoconf log indicates errors, it looked at host includes") +} |