|
From: Bart V. A. <bar...@gm...> - 2009-04-26 08:06:58
|
While Valgrind's nightly build infrastructure is a great help for catching regressions, the nightly build is run even if no source files have been committed during the last 24 hours. It does not make sense to rerun the regression tests in this case. The patch below modifies the nightly/bin/nightly script such that the nightly build is only run if there was at least one commit in svn://svn.valgrind.org/valgrind/trunk during the last 24 hours. If there are no objections against this modification I will commit this patch on Tuesday April 28. Index: nightly/bin/nightly =================================================================== --- nightly/bin/nightly (revision 9637) +++ nightly/bin/nightly (working copy) @@ -6,9 +6,14 @@ #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- -# Helper function +# Helper functions #---------------------------------------------------------------------------- +# Returns the revision number of the source files with date $1. +get_svn_revision() { + svn info -r "{$1}" "${valgrind_svn_repo}" | sed -n 's/^Revision: //p' +} + runcmd () { logfile=$1 str=$2 @@ -39,6 +44,9 @@ #---------------------------------------------------------------------------- # Startup #---------------------------------------------------------------------------- + +valgrind_svn_repo="svn://svn.valgrind.org/valgrind/trunk" + # Must have exactly two arguments if [ $# -ne 2 ] ; then echo "usage: $0 /path/to/valgrind/nightly <tag>" @@ -74,6 +82,12 @@ # Check out, build, test #---------------------------------------------------------------------------- +svn_old_rev="`get_svn_revision ${svn_old_date}`" +svn_new_rev="`get_svn_revision ${svn_new_date}`" +if [ "${svn_old_rev}" = "${svn_new_rev}" ]; then + exit 0 +fi + # Do everything twice -- once for the 24 hours old Valgrind, and once # for the current one. for logfile in old new ; do @@ -98,7 +112,7 @@ # Check out, build, run tests runcmd $logfile \ "Checking out valgrind source tree" \ - "svn co svn://svn.valgrind.org/valgrind/trunk -r {$svn_date} valgrind" && \ + "svn co ${valgrind_svn_repo} -r {$svn_date} valgrind" && \ \ runcmd $logfile \ "Configuring valgrind " \ |
|
From: Nicholas N. <n.n...@gm...> - 2009-04-26 10:41:34
|
On Sun, Apr 26, 2009 at 6:06 PM, Bart Van Assche <bar...@gm...> wrote: > While Valgrind's nightly build infrastructure is a great help for catching > regressions, the nightly build is run even if no source files have been > committed during the last 24 hours. It does not make sense to rerun the > regression tests in this case. The patch below modifies the nightly/bin/nightly > script such that the nightly build is only run if there was at least one commit > in svn://svn.valgrind.org/valgrind/trunk during the last 24 hours. If there are > no objections against this modification I will commit this patch on Tuesday > April 28. It's a good idea. It would be nice to have some record of the decision, just in case you want to check. We send the results of the mailing command to 'sendmail.log', perhaps when the script isn't run a file like 'unchanged.log' could be written with the time and date in it. Nick |
|
From: Bart V. A. <bar...@gm...> - 2009-04-26 11:58:30
|
On Sun, Apr 26, 2009 at 12:41 PM, Nicholas Nethercote <n.n...@gm...> wrote: > On Sun, Apr 26, 2009 at 6:06 PM, Bart Van Assche > <bar...@gm...> wrote: >> While Valgrind's nightly build infrastructure is a great help for catching >> regressions, the nightly build is run even if no source files have been >> committed during the last 24 hours. It does not make sense to rerun the >> regression tests in this case. The patch below modifies the nightly/bin/nightly >> script such that the nightly build is only run if there was at least one commit >> in svn://svn.valgrind.org/valgrind/trunk during the last 24 hours. If there are >> no objections against this modification I will commit this patch on Tuesday >> April 28. > > It's a good idea. It would be nice to have some record of the > decision, just in case you want to check. We send the results of the > mailing command to 'sendmail.log', perhaps when the script isn't run a > file like 'unchanged.log' could be written with the time and date in > it. The patch below should do this. Index: nightly/bin/nightly =================================================================== --- nightly/bin/nightly (revision 9638) +++ nightly/bin/nightly (working copy) @@ -6,9 +6,14 @@ #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- -# Helper function +# Helper functions #---------------------------------------------------------------------------- +# Returns the revision number of the source files with date $1. +get_svn_revision() { + svn info -r "{$1}" "${valgrind_svn_repo}" | sed -n 's/^Revision: //p' +} + runcmd () { logfile=$1 str=$2 @@ -39,6 +44,9 @@ #---------------------------------------------------------------------------- # Startup #---------------------------------------------------------------------------- + +valgrind_svn_repo="svn://svn.valgrind.org/valgrind/trunk" + # Must have exactly two arguments if [ $# -ne 2 ] ; then echo "usage: $0 /path/to/valgrind/nightly <tag>" @@ -57,6 +65,10 @@ cd $ABT_TOP +# Clean up output files produced by a previous run. +rm -rf diffs diff.short final Inst new.short new.verbose old.short old.verbose +rm -rf sendmail.log unchanged.log valgrind + # Setup any relevant environment variables from conf/<tag>.conf. . conf/$ABT_MACHINE.conf if [ "${ABT_JOBS}" = "" ]; then @@ -74,12 +86,20 @@ # Check out, build, test #---------------------------------------------------------------------------- +svn_old_rev="`get_svn_revision ${svn_old_date}`" +svn_new_rev="`get_svn_revision ${svn_new_date}`" +if [ "${svn_old_rev}" = "${svn_new_rev}" ]; then + echo "Both {$svn_old_date} and {$svn_new_date} correspond to r${svn_new_rev}"\ + "-- skipping nightly build." >unchanged.log + exit 0 +fi + # Do everything twice -- once for the 24 hours old Valgrind, and once # for the current one. for logfile in old new ; do - # Remove the old valgrind/ and vex/ directories - rm -rf valgrind vex + # Remove the old valgrind directory. + rm -rf valgrind # Remove old short and verbose log files, and start the new ones for ext in short verbose ; do @@ -98,7 +118,7 @@ # Check out, build, run tests runcmd $logfile \ "Checking out valgrind source tree" \ - "svn co svn://svn.valgrind.org/valgrind/trunk -r {$svn_date} valgrind" && \ + "svn co ${valgrind_svn_repo} -r {$svn_date} valgrind" && \ \ runcmd $logfile \ "Configuring valgrind " \ @@ -170,7 +190,6 @@ # Gather up the diffs (at most the first 100 lines for each one) into a # single file. MAX_LINES=100 -rm -f diffs diff_files=`find . -name '*.diff*' | sort` if [ z"$diff_files" = z ] ; then echo "Congratulations, all tests passed!" >> diffs |
|
From: Nicholas N. <n.n...@gm...> - 2009-04-26 22:17:07
|
Looks good! N |