Nightly test changes:

- Put the old tree in valgrind-old/ and the new one in valgrind-new/,
  instead of using valgrind/ for both.  That way, the old tree is still
  present after running the tests, so it can be inspected for problems.

  This required changing how ABT_RUN_REGTEST worked -- it no longer should
  change directories itself -- but I think Bart's machine is the only one
  using that and I updated the .conf file accordingly.

- Change some variable names -- only use the "ABT_" prefix for variables
  defined in the .conf files, and use $DIR and $TAG to match the README.txt.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10248 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/nightly/README.txt b/nightly/README.txt
index 86a4d92..204f359 100644
--- a/nightly/README.txt
+++ b/nightly/README.txt
@@ -156,9 +156,9 @@
 - $DIR/sendmail.log contains the output (stdout and stderr) from
   $DIR/conf/$TAG.sendmail goes in $DIR/sendmail.log.  
 
-- $DIR/valgrind/ contains the tested tree (and $DIR/valgrind/Inst/ contains
-  the installed code).  It is used for both trees and so after the tests
-  have completed it will contain the newer tree.
+- $DIR/valgrind-old/ and $DIR/valgrind-new/ contain the tested trees (and
+  $DIR/valgrind-old/Inst/ and $DIR/valgrind-new/Inst/ contain the installed
+  code).
 
 If the tests aren't run, the following file is produced:
 
diff --git a/nightly/bin/nightly b/nightly/bin/nightly
index d483402..fdfe02e 100755
--- a/nightly/bin/nightly
+++ b/nightly/bin/nightly
@@ -56,11 +56,11 @@
 fi
 
 # Get args from command line
-ABT_TOP=$1
-ABT_MACHINE=$2
+DIR=$1
+TAG=$2
 
 # Get times and date
-ABT_START=`date "+%F %H:%M:%S %Z"`
+START=`date "+%F %H:%M:%S %Z"`
 
 # This is one of the formats SVN accepts.  Yes, the 'T' appears in the final
 # string, it's supposed to be like that.
@@ -85,14 +85,14 @@
 # The time-and-date for now is easy.
 svn_new_date=`date $svn_date_format`
 
-cd $ABT_TOP
+cd $DIR
 
 # Clean up output files produced by a previous run.
 rm -rf diffs diff.short final new.short new.verbose old.short old.verbose
-rm -rf sendmail.log unchanged.log valgrind
+rm -rf sendmail.log unchanged.log valgrind-old valgrind-new
 
 # Setup any relevant environment variables from conf/<tag>.conf.
-. conf/$ABT_MACHINE.conf
+. conf/$TAG.conf
 if [ "${ABT_JOBS}" = "" ]; then
   ABT_JOBS=1
 fi
@@ -100,7 +100,7 @@
   ABT_EVAL="eval"
 fi
 if [ "${ABT_RUN_REGTEST}" = "" ]; then
-  ABT_RUN_REGTEST="cd valgrind && make regtest"
+  ABT_RUN_REGTEST="make regtest"
 fi
 
 
@@ -120,9 +120,6 @@
 # for the current one.
 for logfile in old new ; do
 
-   # 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
       echo > $logfile.$ext
@@ -140,19 +137,19 @@
    # Check out, build, run tests
    runcmd $logfile \
           "Checking out valgrind source tree" \
-          "svn co ${valgrind_svn_repo} -r {$svn_date} valgrind" && \
+          "svn co ${valgrind_svn_repo} -r {$svn_date} valgrind-$logfile" && \
    \
    runcmd $logfile \
           "Configuring valgrind             " \
-          "cd valgrind && ./autogen.sh  && ./configure --prefix=`pwd`/valgrind/Inst ${ABT_CONFIGURE_OPTIONS}" && \
+          "cd valgrind-$logfile && ./autogen.sh  && ./configure --prefix=`pwd`/valgrind-$logfile/Inst ${ABT_CONFIGURE_OPTIONS}" && \
    \
    runcmd $logfile \
           "Building valgrind                " \
-          "cd valgrind && make -j ${ABT_JOBS} && make -j ${ABT_JOBS} check && make install" && \
+          "cd valgrind-$logfile && make -j ${ABT_JOBS} && make -j ${ABT_JOBS} check && make install" && \
    \
    runcmd $logfile \
           "Running regression tests         " \
-          "${ABT_RUN_REGTEST}"
+          "cd valgrind-$logfile && ${ABT_RUN_REGTEST}"
 
    # Grab some indicative text for the short log file -- if the regtests
    # succeeded, show their results.  If we didn't make it that far, show the
@@ -175,13 +172,13 @@
 #----------------------------------------------------------------------------
 
 # Get times and date
-ABT_END=`date "+%F %H:%M:%S %Z"`
+END=`date "+%F %H:%M:%S %Z"`
 
 # 'final' shows the difference between the old and new results
-echo                                                      >  final
-echo "Nightly build on" $ABT_MACHINE "(" $ABT_DETAILS ")" >> final
-echo "Started at" $ABT_START                              >> final
-echo "Ended   at" $ABT_END                                >> final
+echo                                               >  final
+echo "Nightly build on" $TAG "(" $ABT_DETAILS ")" >> final
+echo "Started at" $START                          >> final
+echo "Ended   at" $END                            >> final
 
 # If the results differ from 24 hours ago, print extra stuff.
 diff -C1 old.short new.short > diff.short
@@ -234,7 +231,7 @@
 fi
 
 # Use the conf/<tag>.sendmail script to email the results.
-conf/$ABT_MACHINE.sendmail \
-   "$changed_str$ABT_START nightly build ($ABT_MACHINE, $ABT_DETAILS)" \
+conf/$TAG.sendmail \
+   "$changed_str$START nightly build ($TAG, $ABT_DETAILS)" \
    final \
    diffs > sendmail.log 2>&1
diff --git a/nightly/conf/georgia-tech-cellbuzz-cross.conf b/nightly/conf/georgia-tech-cellbuzz-cross.conf
index 2c0970e..524a0c6 100644
--- a/nightly/conf/georgia-tech-cellbuzz-cross.conf
+++ b/nightly/conf/georgia-tech-cellbuzz-cross.conf
@@ -14,7 +14,6 @@
 ABT_JOBS=3
 
 cellbuzz_run_regtest() {
-  cd valgrind || return $?
   rm -f regtest-output.txt
   jobid=`echo "{ cd $PWD && perl tests/vg_regtest --all; } >& $PWD/regtest-output.txt" | qsub`
   echo "Job ID = ${jobid}"