X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fdaily-test-summary.sh;h=c71ccef68c9ecde2f3058f191eba01da8b1c8867;hb=2a259b7213487821e12d6894579ebd9e964b3ed4;hp=83fbd4f59d5420663810dcc6dd386427601c69ef;hpb=f3201502a99f0808c3f063245fe3864b9bcd838e;p=infrastructure.git diff --git a/scripts/daily-test-summary.sh b/scripts/daily-test-summary.sh index 83fbd4f..c71ccef 100755 --- a/scripts/daily-test-summary.sh +++ b/scripts/daily-test-summary.sh @@ -6,25 +6,36 @@ function manage () { pushd ~/manage >& /dev/null; git pull ; ./LocalSubstrate.inria.py "$@" ; popd >& /dev/null } -subject="Tests summary for $(today)" +# can specify a finer-grain pattern if needed +if [ -z "$1" ]; then pattern=$(today); else pattern="$1"; shift; fi + +subject="Tests summary for $pattern" to="build@onelab.eu" buildhost="build.onelab.eu" -distro=onelab +distro=lxc function builds () { manage -tv | grep $(today) | cut -d ' ' -f 3 ; } function add_links () { for build in $(builds); do echo $build | grep -q lxc && bdistro=lxc || bdistro=$distro - echo "http://$buildhost/$bdistro/$build/testlogs" + echo "http://$buildhost/$bdistro/$build/" + echo "" done } +# for debugging +#function sendmail () { cat ; } + ( \ echo "Subject: ${subject}" ; \ echo "To: ${to}" ; \ - cd ; \ - echo "-------------------- Test results for $(today)" ; \ - manage -tv | grep $(today) ; \ - echo "-------------------- Shortcuts" ; \ - add_links ; \ + echo "-------------------- Test results for $pattern" ; \ + manage -tv | grep $pattern | while read line; do + echo $line + # compute build and related distro + build=$(echo $line | cut -d' ' -f2) + echo $build | grep -q f14 && bdistro=onelab || bdistro=$distro + # write a one-line shorthand + echo " http://$buildhost/$bdistro/$build/" + done ) | sendmail ${to}