|
From: <sv...@va...> - 2005-03-31 10:20:04
|
Author: tom
Date: 2005-03-31 11:19:59 +0100 (Thu, 31 Mar 2005)
New Revision: 3491
Modified:
trunk/nightly/bin/nightly
Log:
Rework the nightly build script to stop as soon as one of the build
steps fails instead of carrying on with the other steps - this should
help ensure that the log fragment sent out contains useful information.
A second change is to ensure that if the regression tests complete
then the full results are included in the email - if they don't
complete then just the last 20 lines of output are sent as before.
Modified: trunk/nightly/bin/nightly
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/nightly/bin/nightly 2005-03-31 09:09:07 UTC (rev 3490)
+++ trunk/nightly/bin/nightly 2005-03-31 10:19:59 UTC (rev 3491)
@@ -4,6 +4,22 @@
# Use: two args, first is path to top of ValgrindABT tree
# second is name of machine
=20
+runcmd () {
+ echo -n " $1 ... " >> log.short
+ shift
+
+ (eval "$*") >> log.verbose 2>&1
+
+ if [ $? =3D=3D 0 ]
+ then
+ echo "done" >> log.short
+ return 0
+ else
+ echo "failed" >> log.short
+ return 1
+ fi
+}
+
ABT_TOP=3D$1
ABT_MACHINE=3D$2
=20
@@ -24,35 +40,35 @@
echo "Nightly build on" $ABT_MACHINE "(" $ABT_DETAILS ") started at" $AB=
T_START >> log.verbose
echo >> log.verbose
=20
-echo -n " Checking out vex source tree ... " >> log.short
-svn co svn://svn.valgrind.org/vex/trunk vex 2>&1 >> log.verbose
-echo "done" >> log.short
+runcmd "Checking out vex source tree " \
+ "svn co svn://svn.valgrind.org/vex/trunk vex" && \
+\
+runcmd "Building vex " \
+ "cd vex && pwd && make clean version all" && \
+\
+runcmd "Checking out valgrind source tree" \
+ "svn co svn://svn.valgrind.org/valgrind/trunk valgrind" && \
+\
+runcmd "Configuring valgrind " \
+ "cd valgrind && ./autogen.sh && ./configure --prefix=3D$ABT_TOP/=
Inst --with-vex=3D$ABT_TOP/vex" && \
+\
+runcmd "Building valgrind " \
+ "cd valgrind && make install" && \
+\
+runcmd "Running regression tests " \
+ "cd valgrind && make regtest"
=20
-echo -n " Building vex ... " >> log.short
-(cd vex && make clean version all 2>&1 ) >> log.verbose
-echo "done" >> log.short
+egrep -q '^=3D=3D [0-9]+ tests' log.verbose && (
+ echo >> log.short
+ echo "Regression test results follow" >> log.short
+ echo >> log.short
+ awk '/^=3D=3D [0-9]+ tests/, /^$/ { print }' log.verbose >> log.short
+) || (
+ echo >> log.short
+ echo "Last 20 lines of log.verbose follow" >> log.short
+ echo >> log.short
+ tail -20 log.verbose >> log.short
+)
=20
-echo -n " Checking out valgrind source tree ... " >> log.short
-svn co svn://svn.valgrind.org/valgrind/trunk valgrind 2>&1 >> log.verbos=
e
-echo "done" >> log.short
-
-echo -n " Configuring valgrind ... " >> log.short
-(cd valgrind && ./autogen.sh 2>&1 && ./configure --prefix=3D`pwd`/Inst =
--with-vex=3D`pwd`/../vex 2>&1 ) >> log.verbose
-echo "done" >> log.short
-
-echo -n " Building valgrind ... " >> log.short
-(cd valgrind && make install 2>&1 ) >> log.verbose
-echo "done" >> log.short
-
-echo -n " Running regression tests ... " >> log.short
-(cd valgrind && make regtest 2>&1 ) >> log.verbose
-echo "done" >> log.short
-
-echo >> log.short
-echo "Last 20 lines of log.verbose follow" >> log.short
-echo >> log.short
-tail -20 log.verbose >> log.short
-
$ABT_TOP/conf/$ABT_MACHINE.sendmail "$ABT_START nightly build ($ABT_MACH=
INE, $ABT_DETAILS)" \
$ABT_TOP/log.short
-
|