cleanup old isabelle-* dirs before test start
authorisatest
Fri Jun 21 15:41:07 2002 +0200 (2002-06-21)
changeset 13237493d61afa731
parent 13236 568bc754d303
child 13238 a6cb18a25cbb
cleanup old isabelle-* dirs before test start
included master log file
Admin/isatest-makedist
     1.1 --- a/Admin/isatest-makedist	Fri Jun 21 15:39:19 2002 +0200
     1.2 +++ b/Admin/isatest-makedist	Fri Jun 21 15:41:07 2002 +0200
     1.3 @@ -6,8 +6,13 @@
     1.4  #
     1.5  # DESCRIPTION: Build distribution and run isatest-make for lots of platforms.
     1.6  
     1.7 +# source bashrc, we're called by cron
     1.8 +. ~/.bashrc
     1.9 +
    1.10 +
    1.11  ## global settings
    1.12  LOGPREFIX=~/log
    1.13 +MASTERLOG=$LOGPREFIX/isatest.log
    1.14  DISTPREFIX=~/isadist
    1.15  MAKEDIST=~/bin/makedist
    1.16  MAKEALL=~/bin/isatest-makeall
    1.17 @@ -50,12 +55,17 @@
    1.18  echo "### cleaning up old dist directory"  >> $DISTLOG 2>&1
    1.19  rm -rf $DISTPREFIX >> $DISTLOG 2>&1
    1.20  
    1.21 +echo "### cleaning up old isabelle-* directories" >> $DISTLOG 2>&1
    1.22 +rm -rf ~/isabelle-*
    1.23 +
    1.24  echo "### building distribution"  >> $DISTLOG 2>&1
    1.25  $MAKEDIST - >> $DISTLOG 2>&1
    1.26  
    1.27  if [ $? -ne 0 ]
    1.28  then
    1.29      echo ------------------- DIST BUILD FAILED --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    1.30 +    ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
    1.31 +    echo "$(date) $HOSTNAME $PRG: dist build FAILED, elapsed time $ELAPSED." >> $MASTERLOG
    1.32      # more action here
    1.33      exit 1
    1.34  fi
    1.35 @@ -64,6 +74,11 @@
    1.36  $TAR xvzf `cat $DISTPREFIX/ISABELLE_DIST` >> $DISTLOG 2>&1
    1.37  
    1.38  echo ------------------- prepared test successfully --- `date` --- $HOSTNAME >> $DISTLOG 2>&1
    1.39 +gzip -f $DISTLOG
    1.40 +
    1.41 +ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
    1.42 +echo "$(date) $HOSTNAME $PRG: dist build successful, elapsed time $ELAPSED." >> $MASTERLOG
    1.43 +
    1.44  
    1.45  ## spawn test runs
    1.46