diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2014-08-01 16:11:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-06 10:03:21 +0100 |
commit | bd7b15bb4988a9826690192c9fcfeccab37186b9 (patch) | |
tree | 7b11b9caa82c6f57cf3103e1e9625bf37433a205 | |
parent | aa87eade2bbb92f66894508384528600b4d6d2d0 (diff) | |
download | poky-bd7b15bb4988a9826690192c9fcfeccab37186b9.tar.gz |
test-dependencies: don't override failed-recipes.log
* when dependency changes are reported in OUTPUTC/failed-recipes.log
it can be the same as final output file which is later overwritten
because OUTPUTC == OUTPUT_BASE by default
* use similar format for messages as insane_qa check
(From OE-Core rev: f8c1c20cc4926072ad4578ca609ed40e3b94ef85)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/test-dependencies.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/test-dependencies.sh b/scripts/test-dependencies.sh index 6ebfd3e4d6..ecbb710c6b 100755 --- a/scripts/test-dependencies.sh +++ b/scripts/test-dependencies.sh | |||
@@ -209,7 +209,7 @@ compare_deps() { | |||
209 | # OUTPUT_MIN=${OUTPUT_BASE}/3_min \ | 209 | # OUTPUT_MIN=${OUTPUT_BASE}/3_min \ |
210 | # openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c | 210 | # openembedded-core/scripts/test-dependencies.sh --tmpdir=tmp-eglibc --targets=glib-2.0 --recipes=recipe_list --buildtype=c |
211 | echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" =====" | 211 | echo "===== Compare dependencies recorded in \"${OUTPUT_MAX}\" and \"${OUTPUT_MIN}\" =====" |
212 | [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE} | 212 | [ -n "${OUTPUTC}" ] || OUTPUTC=${OUTPUT_BASE}/comp |
213 | mkdir -p ${OUTPUTC} | 213 | mkdir -p ${OUTPUTC} |
214 | OUTPUT_FILE=${OUTPUTC}/dependency-changes | 214 | OUTPUT_FILE=${OUTPUTC}/dependency-changes |
215 | echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages" | 215 | echo "Differences will be stored in ${OUTPUT_FILE}, dot is shown for every 100 of checked packages" |
@@ -223,9 +223,11 @@ compare_deps() { | |||
223 | find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do | 223 | find ${OUTPUT_MAX}/packages/ -name latest | sed "s#${OUTPUT_MAX}/##g" | while read pkg; do |
224 | max_pkg=${OUTPUT_MAX}/${pkg} | 224 | max_pkg=${OUTPUT_MAX}/${pkg} |
225 | min_pkg=${OUTPUT_MIN}/${pkg} | 225 | min_pkg=${OUTPUT_MIN}/${pkg} |
226 | recipe=`echo "${pkg}" | sed 's#/.*##g'` | 226 | # pkg=packages/armv5te-oe-linux-gnueabi/libungif/libungif/latest |
227 | recipe=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\1#g'` | ||
228 | package=`echo "${pkg}" | sed 's#packages/[^/]*/\([^/]*\)/\([^/]*\)/latest#\2#g'` | ||
227 | if [ ! -f "${min_pkg}" ] ; then | 229 | if [ ! -f "${min_pkg}" ] ; then |
228 | echo "ERROR: ${min_pkg} doesn't exist" | tee -a ${OUTPUT_FILE} | 230 | echo "ERROR: ${recipe}: ${package} package isn't created when building with minimal dependencies?" | tee -a ${OUTPUT_FILE} |
229 | echo ${recipe} >> ${OUTPUTC}/failed-recipes.log | 231 | echo ${recipe} >> ${OUTPUTC}/failed-recipes.log |
230 | continue | 232 | continue |
231 | fi | 233 | fi |
@@ -238,15 +240,15 @@ compare_deps() { | |||
238 | fi | 240 | fi |
239 | if [ "${max_deps}" = "${min_deps}" ] ; then | 241 | if [ "${max_deps}" = "${min_deps}" ] ; then |
240 | # it's annoying long, but at least it's showing some progress, warnings are grepped at the end | 242 | # it's annoying long, but at least it's showing some progress, warnings are grepped at the end |
241 | echo "NOTE: ${pkg} dependencies weren't changed" >> ${OUTPUT_FILE} | 243 | echo "NOTE: ${recipe}: ${package} rdepends weren't changed" >> ${OUTPUT_FILE} |
242 | else | 244 | else |
243 | missing_deps= | 245 | missing_deps= |
244 | for dep in ${max_deps}; do | 246 | for dep in ${max_deps}; do |
245 | echo "${min_deps}" | grep -q " ${dep} " || missing_deps="${missing_deps} ${dep}" | 247 | echo "${min_deps}" | grep -q " ${dep} " || missing_deps="${missing_deps} ${dep}" |
248 | echo # to get rid of dots on last line | ||
249 | echo "WARN: ${recipe}: ${package} rdepends on ${dep} but its not a build dependency?" | tee -a ${OUTPUT_FILE} | ||
246 | done | 250 | done |
247 | if [ -n "${missing_deps}" ] ; then | 251 | if [ -n "${missing_deps}" ] ; then |
248 | echo # to get rid of dots on last line | ||
249 | echo "WARN: ${pkg} lost dependency on ${missing_deps}" | tee -a ${OUTPUT_FILE} | ||
250 | echo ${recipe} >> ${OUTPUTC}/failed-recipes.log | 252 | echo ${recipe} >> ${OUTPUTC}/failed-recipes.log |
251 | fi | 253 | fi |
252 | fi | 254 | fi |
@@ -272,7 +274,7 @@ for TYPE in $buildtype; do | |||
272 | esac | 274 | esac |
273 | done | 275 | done |
274 | 276 | ||
275 | cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u > ${OUTPUT_BASE}/failed-recipes.log | 277 | cat ${OUTPUT_BASE}/*/failed-recipes.log | sort -u >> ${OUTPUT_BASE}/failed-recipes.log |
276 | 278 | ||
277 | if [ "${RESULT}" != "0" ] ; then | 279 | if [ "${RESULT}" != "0" ] ; then |
278 | echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`" | 280 | echo "ERROR: ${RESULT} issues were found in these recipes: `cat ${OUTPUT_BASE}/failed-recipes.log | xargs`" |