]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane.bbclass: write QA issues to log file only when they are in ERROR_QA or WARN_QA
authorMartin Jansa <martin.jansa@gmail.com>
Mon, 21 Aug 2017 20:56:24 +0000 (22:56 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Sep 2017 16:30:10 +0000 (17:30 +0100)
* QA check which aren't included in WARN_QA and ERROR_QA are shown
  during the build only as NOTE message (not shown at all with default
  knotty setting), so it might be surprising to see them later in qa.log
  file

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/insane.bbclass

index aa304f108e150712024618189df9f4aee37c31f4..78b41caf9937adccc90f133ccaa8bf91425ab474 100644 (file)
@@ -184,12 +184,13 @@ def package_qa_write_error(type, error, d):
             f.write("%s: %s [%s]\n" % (p, error, type))
 
 def package_qa_handle_error(error_class, error_msg, d):
-    package_qa_write_error(error_class, error_msg, d)
     if error_class in (d.getVar("ERROR_QA") or "").split():
+        package_qa_write_error(error_class, error_msg, d)
         bb.error("QA Issue: %s [%s]" % (error_msg, error_class))
         d.setVar("QA_SANE", False)
         return False
     elif error_class in (d.getVar("WARN_QA") or "").split():
+        package_qa_write_error(error_class, error_msg, d)
         bb.warn("QA Issue: %s [%s]" % (error_msg, error_class))
     else:
         bb.note("QA Issue: %s [%s]" % (error_msg, error_class))