Patchwork Add a small helper script listing all recipes with QA errors.

login
register
mail settings
Submitter Andreas Müller
Date Feb. 14, 2011, 9:06 p.m.
Message ID <1297717608-30480-1-git-send-email-schnitzeltony@gmx.de>
Download mbox | patch
Permalink /patch/597/
State Accepted
Headers show

Comments

Andreas Müller - Feb. 14, 2011, 9:06 p.m.
Signed-off-by: Andreas Mueller <schnitzeltony@gmx.de>
---
 contrib/qa/collect-qa-errors.sh |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100755 contrib/qa/collect-qa-errors.sh
Stefan Schmidt - Feb. 14, 2011, 10:11 p.m.
Hello.

On Mon, 2011-02-14 at 22:06, Andreas Mueller wrote:
> 
> Signed-off-by: Andreas Mueller <schnitzeltony@gmx.de>

Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>

Thanks for cooking this up.

regards
Stefan Schmidt

Patch

diff --git a/contrib/qa/collect-qa-errors.sh b/contrib/qa/collect-qa-errors.sh
new file mode 100755
index 0000000..45a7283
--- /dev/null
+++ b/contrib/qa/collect-qa-errors.sh
@@ -0,0 +1,26 @@ 
+#!/bin/bash
+
+# A little script outputting information on all recipes with QA errors
+
+bb_tmp_dir=$(bitbake -e | grep 'TMPDIR="' | sed -e s/TMPDIR=// \
+                                                -e s/\"//g)
+
+# each temp dir is checked
+for log_dir in ${bb_tmp_dir}/work/*/*/temp ; do
+	# checked only log files
+	for log_file in ${log_dir}/log.do_* ; do
+		if [ -e  $log_file ] ; then
+			qa_err=$(grep 'ERROR: QA' $log_file)
+			if [[ -n  $qa_err ]] ; then
+				# Bingo
+				str=${log_file%/*}
+				str=${str%/*}
+				echo $str
+				# output only one occurance per recipe
+				break
+			fi
+		fi
+	done
+done
+
+