attempts to wrap a summary of potential mount-related installation problems in the...
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 23 Nov 2007 14:28:12 +0000 (14:28 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 23 Nov 2007 14:28:12 +0000 (14:28 +0000)
Makefile
vbuild-nightly.sh

index 280d2d3..51d8b56 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -314,6 +314,13 @@ SOURCES/%.tar.gz: SOURCES/%
 SOURCES/%.tgz: SOURCES/%
        tar chpzf $@ -C SOURCES $*
 
+##
+URLS/%: url=$(subst @colon@,:,$(subst @slash@,/,$(notdir $@)))
+URLS/%: basename=$(notdir $(url))
+URLS/%: 
+       echo curl $(url) -o SOURCES/$(basename)
+       touch $@
+
 ### the directory SOURCES/<package>-<version> is made 
 # with a copy -rl from CODEBASES/<package>
 # the former is $(package-SOURCE) and the latter is $(package-CODEBASE)
index 3126933..88b77e2 100755 (executable)
@@ -28,24 +28,39 @@ TESTSCRIPT=TestMain.py
 # assuming vserver runs in UTC
 DATE=$(date +'%Y.%m.%d')
 
+# temporary - wrap a quick summary of suspicious stuff
+# this is to focus on installation that go wrong
+# use with care, a *lot* of other things can go bad as well
+function summary () {
+    from=$1; shift
+    echo "******************** BEG SUMMARY" 
+    tr -d '\r' < $from | egrep 'BEG RPM|not installed|Installing:.*([eE]rror|[wW]arning)' 
+    echo "******************** END SUMMARY" 
+}
+
+
 # Notify recipient of failure or success, manage various stamps 
 function failure() {
     set -x
+    WEBLOG=${WEBPATH}/${BASE}.log.txt
+    cp $LOG ${WEBLOG}
+    summary $LOG >> ${WEBLOG}
+    (echo -n "============================== $COMMAND: failure at " ; date ; tail -c 20k $WEBLOG) > ${WEBLOG}.ko
     if [ -n "$MAILTO" ] ; then
-       tail -c 8k $LOG | mail -s "Failures for build ${BASE}" $MAILTO
+       tail -c 20k ${WEBPATH}/${BASE}.log.txt | mail -s "Failures for build ${BASE}" $MAILTO
     fi
-    cp $LOG ${WEBPATH}/${BASE}.log.txt
-    (echo -n "============================== $COMMAND: failure at" ; date ; tail -c 20k $LOG) > ${WEBPATH}/${BASE}.bko.txt
     exit 1
 }
 
 function success () {
     set -x
+    WEBLOG=${WEBPATH}/${BASE}.log.txt
+    cp $LOG ${WEBLOG}
+    summary $LOG >> ${WEBLOG}
+    touch ${WEBLOG}.ok
     if [ -n "$MAILTO" ] ; then
        (echo "http://build.one-lab.org/$PLDISTRO/$BASE" ; echo "Completed on $(date)" ) | mail -s "Successfull build for ${BASE}" $MAILTO
     fi
-    cp $LOG ${WEBPATH}/${BASE}.log.txt
-    touch ${WEBPATH}/${BASE}.bok.txt
     exit 0
 }