From 2a062deb2e427c6760cf8a25dc3296440dd24feb Mon Sep 17 00:00:00 2001 From: Thomas Oulevey Date: Jun 26 2017 22:02:54 +0000 Subject: Add cache invalidation Fix logs tests done --- diff --git a/scripts/mash_run.sh b/scripts/mash_run.sh index 32263e3..2025598 100755 --- a/scripts/mash_run.sh +++ b/scripts/mash_run.sh @@ -126,10 +126,13 @@ mash_prepare () # config mash already ok ( $optionv ) && echo " -> [INFO] creating mash config: ${tag}.mash..." print_mash_template "${tag}" "${arches}" > $conf - [ -f ${MASH_CONF}/${tag}.mash ] && diff $conf ${MASH_CONF}/${tag}.mash + [ -f ${MASH_CONF}/${tag}.mash ] && diff ${MASH_CONF}/${tag}.mash $conf &>> $log if [ $? -gt 0 ] then + ( $optionv ) && echo " -> [INFO] updating mash config ${tag}.mash" mv $conf ${MASH_CONF}/${tag}.mash + ( $optionv ) && echo " -> [INFO] cleaning mash cache ${tag}.buildlist" + rm $MASH_CACHE/${tag}.buildlist fi } @@ -164,8 +167,14 @@ echo $$ > $pidfile for TAG in ${TAGS} do + ( $optionv ) && echo "Checking $TAG ..." BUILDTAG="" LOG="${LOG_DIR}/mash.${TAG}.log" + FAKETAG=${TAG/testing/candidate} + FAKETAG=${FAKETAG/release/candidate} + BUILDTAG=`${KOJI} list-targets --quiet | grep ${FAKETAG}| awk '{print $2}'` + ARCHES=`${KOJI} taginfo ${BUILDTAG} | grep Arches | cut -d ":" -f 2-` + mash_prepare "${TAG}" "${LOG}" "${ARCHES}" if [ ! -f $MASH_CACHE/$TAG.buildlist ] then ${KOJI} list-tagged $TAG > $MASH_CACHE/$TAG.buildlist @@ -184,9 +193,6 @@ do fi rm -rf $BUILDLIST fi - BUILDTAG=`${KOJI} list-targets --quiet | grep ${TAG}| awk '{print $2}'` - ARCHES=`${KOJI} taginfo ${BUILDTAG} | grep Arches | cut -d ":" -f 2-` - mash_prepare "${TAG}" "${LOG}" "${ARCHES}" mash_run "${TAG}" "${LOG}" & done