diff options
-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`" |