Committer: Diego Biurrun <diego@xxxxxxxxxx> Date: 16/03/2010 at 20:03:57 Revision: 3966 Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: Print more information about failed builds. Each email that is sent out now comes with a heading that describes the configuration in front of the compiler output. Also move the email notification into a separate function. Modified: M tools/hipl_autobuild === modified file 'tools/hipl_autobuild' --- tools/hipl_autobuild 2010-03-16 16:53:00 +0000 +++ tools/hipl_autobuild 2010-03-16 18:00:38 +0000 @@ -23,13 +23,26 @@ rm -f log.txt return 0 else - SUBJECT="[$BRANCH_NAME] [autobuild] failing command: $@" - test $HIPL_NOTIFICATION_EMAIL && - mailx -s "$SUBJECT" $HIPL_NOTIFICATION_EMAIL < log.txt + test $HIPL_NOTIFICATION_EMAIL && mail_notify "$1" cleanup 1 fi } +mail_notify() +{ + COMMAND="$1" + cat > msg.txt <<EOF +branch: $BRANCH_NAME +configuration: $CONFIGURATION +command: $COMMAND +compiler output: + +EOF + cat log.txt >> msg.txt + SUBJECT="[autobuild] [$BRANCH_NAME]" + mailx -s "$SUBJECT" $HIPL_NOTIFICATION_EMAIL < msg.txt +} + cleanup() { chmod -R u+rwx "$CHECKOUT_DIR" @@ -40,11 +53,12 @@ compile() { - run_program ./autogen.sh && - run_program ./configure --prefix=$(pwd)/local_install $@ && - run_program make -j17 && - run_program make -j17 distcheck && - run_program make install + CONFIGURATION="--prefix=$(pwd)/local_install $@" + run_program "./autogen.sh" && + run_program "./configure" $CONFIGURATION && + run_program "make -j17" && + run_program "make -j17 distcheck" && + run_program "make install" } test $BRANCH_REVISION = $AUTOBUILD_REVISION && exit 0