[oe-commits] org.oe.dev classes/insane.bbclass: Grep through config.log to check for CROSS Compile errors

freyther commit openembedded-commits at lists.openembedded.org
Fri Feb 16 15:54:33 UTC 2007


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.

Author: freyther at openembedded.org
Branch: org.openembedded.dev
Revision: a8bf0677a23a474e197151ebb4c24ddbf5c65a67
ViewMTN: http://monotone.openembedded.org/revision.psp?id=a8bf0677a23a474e197151ebb4c24ddbf5c65a67
Files:
1
classes/insane.bbclass
Diffs:

#
# mt diff -rb866b8272d34e10f3efd115e1dbb79b5287031e9 -ra8bf0677a23a474e197151ebb4c24ddbf5c65a67
#
# 
# 
# patch "classes/insane.bbclass"
#  from [58295bdd3255a622a6d317eedf08ad5fde6554ac]
#    to [2dd57d99648c8825834fb05fd2c34ae4499885b4]
# 
============================================================
--- classes/insane.bbclass	58295bdd3255a622a6d317eedf08ad5fde6554ac
+++ classes/insane.bbclass	2dd57d99648c8825834fb05fd2c34ae4499885b4
@@ -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, workd
         # 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")
+}






More information about the Openembedded-commits mailing list