Admin/isatest/isatest-makeall
author wenzelm
Sat, 14 Jul 2012 21:05:29 +0200
changeset 48258 734384f35f8a
parent 48212 cccc92c0addc
child 48259 1635298d8fe7
permissions -rwxr-xr-x
actually remove former atbroy102/cygwin stuff (cf. 6301046146b6, 08cb859c53cd);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     1
#!/usr/bin/env bash
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     2
#
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     3
# Author: Gerwin Klein, TU Muenchen
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     4
#
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28500
diff changeset
     5
# DESCRIPTION: Run isabelle makeall from specified distribution and settings.
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     6
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     7
## global settings
22411
1956d895a4ed adjust paths
kleing
parents: 22410
diff changeset
     8
. ~/admin/isatest/isatest-settings
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
     9
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    10
# max time until test is aborted (in sec)
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    11
MAXTIME=28800
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    12
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    13
## diagnostics
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    14
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    15
PRG="$(basename "$0")"
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    16
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    17
function usage()
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    18
{
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    19
  echo
24753
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
    20
  echo "Usage: $PRG [-l logic targets] settings1 [settings2 ...]"
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    21
  echo
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28500
diff changeset
    22
  echo "  Runs isabelle makeall for specified settings."
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    23
  echo "  Leaves messages in ${ERRORLOG} and ${LOGPREFIX} if it fails."
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    24
  echo
24753
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
    25
  echo "Examples:"
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
    26
  echo "  $PRG ~/settings/at-poly ~/settings/at-sml"
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
    27
  echo "  $PRG -l HOL \"HOL-Library HOL-Bali\" ~/settings/at-poly"
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    28
  exit 1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    29
}
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    30
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    31
function fail()
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    32
{
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    33
  echo "$1" >&2
28539
bdb308737bfd do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents: 28527
diff changeset
    34
  log "FAILED, $1"
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    35
  exit 2
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    36
}
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    37
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    38
## main
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    39
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    40
# argument checking
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    41
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    42
[ "$1" = "-?" ] && usage
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    43
[ "$#" -lt "1" ] && usage
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    44
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    45
[ -d $DISTPREFIX ] || fail "$DISTPREFIX is not a directory."
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    46
45861
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
    47
TARGETS=all
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
    48
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    49
# make file flags and nice setup for different target platforms
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    50
case $HOSTNAME in
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    51
    atbroy51)
32165
dee62e8af256 make: keep going by default;
wenzelm
parents: 31582
diff changeset
    52
        MFLAGS="-k -j 2"
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    53
        NICE=""
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    54
        ;;
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    55
24758
53c1a0a46db3 swapped machines for at-sml-dev and at-sml-dev-p
isatest
parents: 24753
diff changeset
    56
    atbroy98)
32165
dee62e8af256 make: keep going by default;
wenzelm
parents: 31582
diff changeset
    57
        MFLAGS="-k"
26369
01ee1168088b tuned settings for target platforms;
wenzelm
parents: 25912
diff changeset
    58
        NICE=""
01ee1168088b tuned settings for target platforms;
wenzelm
parents: 25912
diff changeset
    59
        ;;
24647
212c9b342a67 move at-sml-dev to 2-processor atbroy100
isatest
parents: 23415
diff changeset
    60
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    61
    atbroy31)
32165
dee62e8af256 make: keep going by default;
wenzelm
parents: 31582
diff changeset
    62
        MFLAGS="-k -j 2"
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    63
        ;;
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
    64
  
31581
907616b9536c more isatests;
wenzelm
parents: 31496
diff changeset
    65
    macbroy2)
32165
dee62e8af256 make: keep going by default;
wenzelm
parents: 31582
diff changeset
    66
        MFLAGS="-k"
31581
907616b9536c more isatests;
wenzelm
parents: 31496
diff changeset
    67
        NICE=""
907616b9536c more isatests;
wenzelm
parents: 31496
diff changeset
    68
        ;;
907616b9536c more isatests;
wenzelm
parents: 31496
diff changeset
    69
44978
a04f3eb3943c isatest settings for macbroy6 (Mac OS X Lion);
wenzelm
parents: 41967
diff changeset
    70
    macbroy6)
a04f3eb3943c isatest settings for macbroy6 (Mac OS X Lion);
wenzelm
parents: 41967
diff changeset
    71
        MFLAGS="-k"
a04f3eb3943c isatest settings for macbroy6 (Mac OS X Lion);
wenzelm
parents: 41967
diff changeset
    72
        NICE=""
a04f3eb3943c isatest settings for macbroy6 (Mac OS X Lion);
wenzelm
parents: 41967
diff changeset
    73
        ;;
a04f3eb3943c isatest settings for macbroy6 (Mac OS X Lion);
wenzelm
parents: 41967
diff changeset
    74
32418
030be5c12d96 avoid macbroy21 for now -- hardware problems;
wenzelm
parents: 32320
diff changeset
    75
    macbroy22)
32320
8175fda90c46 options for more precise performance figures of at-poly, which happens to run on macbroy21;
wenzelm
parents: 32165
diff changeset
    76
        MFLAGS="-k"
8175fda90c46 options for more precise performance figures of at-poly, which happens to run on macbroy21;
wenzelm
parents: 32165
diff changeset
    77
        NICE=""
8175fda90c46 options for more precise performance figures of at-poly, which happens to run on macbroy21;
wenzelm
parents: 32165
diff changeset
    78
        ;;
8175fda90c46 options for more precise performance figures of at-poly, which happens to run on macbroy21;
wenzelm
parents: 32165
diff changeset
    79
48147
a29f3f44e198 use macbroy27 instead of macbroy28, which is broken for several weeks already;
wenzelm
parents: 46005
diff changeset
    80
    macbroy27 | macbroy28)
32165
dee62e8af256 make: keep going by default;
wenzelm
parents: 31582
diff changeset
    81
        MFLAGS="-k -j 2"
31581
907616b9536c more isatests;
wenzelm
parents: 31496
diff changeset
    82
        NICE="nice"
31496
c4b74075fc17 no parallel make jobs on macbroy23, which is the machine where SML/XL is tested -- attempt to consume less resources;
wenzelm
parents: 28982
diff changeset
    83
        ;;
c4b74075fc17 no parallel make jobs on macbroy23, which is the machine where SML/XL is tested -- attempt to consume less resources;
wenzelm
parents: 28982
diff changeset
    84
26369
01ee1168088b tuned settings for target platforms;
wenzelm
parents: 25912
diff changeset
    85
    macbroy2[0-9])
32165
dee62e8af256 make: keep going by default;
wenzelm
parents: 31582
diff changeset
    86
        MFLAGS="-k -j 2"
26369
01ee1168088b tuned settings for target platforms;
wenzelm
parents: 25912
diff changeset
    87
        NICE=""
01ee1168088b tuned settings for target platforms;
wenzelm
parents: 25912
diff changeset
    88
        ;;
01ee1168088b tuned settings for target platforms;
wenzelm
parents: 25912
diff changeset
    89
45861
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
    90
    macbroy30)
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
    91
        MFLAGS="-k"
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
    92
        NICE=""
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
    93
        ;;
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
    94
48158
68a32e12b999 more tests on lxbroy[234], which are 4 core Xeon machines;
wenzelm
parents: 48147
diff changeset
    95
    lxbroy[234])
68a32e12b999 more tests on lxbroy[234], which are 4 core Xeon machines;
wenzelm
parents: 48147
diff changeset
    96
        MFLAGS="-k -j 2"
68a32e12b999 more tests on lxbroy[234], which are 4 core Xeon machines;
wenzelm
parents: 48147
diff changeset
    97
        NICE=""
68a32e12b999 more tests on lxbroy[234], which are 4 core Xeon machines;
wenzelm
parents: 48147
diff changeset
    98
        ;;
68a32e12b999 more tests on lxbroy[234], which are 4 core Xeon machines;
wenzelm
parents: 48147
diff changeset
    99
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   100
    *)
32165
dee62e8af256 make: keep going by default;
wenzelm
parents: 31582
diff changeset
   101
        MFLAGS="-k"
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   102
        # be nice by default
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   103
        NICE=nice
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   104
        ;;
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   105
esac
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   106
28504
7ad7d7d6df47 simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents: 28500
diff changeset
   107
ISABELLE_TOOL="$DISTPREFIX/Isabelle/bin/isabelle"
24753
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   108
28500
4b79e5d3d0aa replaced ISATOOL by ISABELLE_TOOL;
wenzelm
parents: 26369
diff changeset
   109
[ -x $ISABELLE_TOOL ] || fail "Cannot run $ISABELLE_TOOL"
24753
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   110
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   111
if [ "$1" = "-l" ]; then
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   112
  shift
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   113
  [ "$#" -lt "3" ] && usage
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   114
  LOGIC="$1"
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   115
  TARGETS="$2"
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   116
  shift 2
28500
4b79e5d3d0aa replaced ISATOOL by ISABELLE_TOOL;
wenzelm
parents: 26369
diff changeset
   117
  ISABELLE_HOME="$($ISABELLE_TOOL getenv -b ISABELLE_HOME)"
46004
484ef66bc3a1 more selective target "full" -- avoid failure of HOL-Datatype_Benchmark on 32bit platforms;
wenzelm
parents: 45861
diff changeset
   118
  if [ "$LOGIC" = "." ]; then
484ef66bc3a1 more selective target "full" -- avoid failure of HOL-Datatype_Benchmark on 32bit platforms;
wenzelm
parents: 45861
diff changeset
   119
    DIR="."
484ef66bc3a1 more selective target "full" -- avoid failure of HOL-Datatype_Benchmark on 32bit platforms;
wenzelm
parents: 45861
diff changeset
   120
    TOOL="$ISABELLE_TOOL makeall $MFLAGS $TARGETS"
484ef66bc3a1 more selective target "full" -- avoid failure of HOL-Datatype_Benchmark on 32bit platforms;
wenzelm
parents: 45861
diff changeset
   121
  else
484ef66bc3a1 more selective target "full" -- avoid failure of HOL-Datatype_Benchmark on 32bit platforms;
wenzelm
parents: 45861
diff changeset
   122
    DIR="$ISABELLE_HOME/src/$LOGIC"
484ef66bc3a1 more selective target "full" -- avoid failure of HOL-Datatype_Benchmark on 32bit platforms;
wenzelm
parents: 45861
diff changeset
   123
    TOOL="$ISABELLE_TOOL make $MFLAGS $TARGETS"
484ef66bc3a1 more selective target "full" -- avoid failure of HOL-Datatype_Benchmark on 32bit platforms;
wenzelm
parents: 45861
diff changeset
   124
  fi
24753
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   125
else
24781
fd6d2040f89b fix shell quoting confusion
isatest
parents: 24758
diff changeset
   126
  DIR="."
45861
4bb0fc92247b some full isatest runs, which include benchmark targets;
wenzelm
parents: 44978
diff changeset
   127
  TOOL="$ISABELLE_TOOL makeall $MFLAGS $TARGETS"
24753
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   128
fi
88e34d7af6e3 accept single logic and target as argument
kleing
parents: 24647
diff changeset
   129
32505
eb82ed858b84 isatest: collect test results and logs in testdata repository
krauss
parents: 32418
diff changeset
   130
IDENT=$(cat "$DISTPREFIX/ISABELLE_IDENT")
eb82ed858b84 isatest: collect test results and logs in testdata repository
krauss
parents: 32418
diff changeset
   131
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   132
# main test loop
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   133
28597
e76e7b96a517 log start of test session
kleing
parents: 28539
diff changeset
   134
log "starting [$@]"
e76e7b96a517 log start of test session
kleing
parents: 28539
diff changeset
   135
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   136
for SETTINGS in $@; do
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   137
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   138
    [ -r $SETTINGS ] || fail "Cannot read $SETTINGS."
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   139
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   140
    # logfile setup
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   141
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   142
    DATE=$(date "+%Y-%m-%d")
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   143
    SHORT=${SETTINGS##*/}
28527
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   144
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   145
	if [ "${SHORT%-e}" == "$SHORT" ]; then
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   146
		# normal test
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   147
    	TESTLOG=$LOGPREFIX/isatest-makeall-$SHORT-$DATE-$HOSTNAME.log
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   148
 	else
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   149
	 	# experimental test
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   150
		TESTLOG=$LOGPREFIX/isatest-makeall-$SHORT-$DATE-$HOSTNAME-e.log
82b36daff4c1 make the test for experimental sessions in isatest-check actually work
kleing
parents: 28504
diff changeset
   151
	fi
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   152
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   153
    # the test
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   154
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   155
    touch $RUNNING/$SHORT.running
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   156
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   157
    echo ------------------- starting test --- `date` --- $HOSTNAME > $TESTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   158
39686
8b9f971ace20 isatest: indicate Isabelle version;
wenzelm
parents: 38434
diff changeset
   159
    echo "Isabelle version: $IDENT" >> $TESTLOG 2>&1
8b9f971ace20 isatest: indicate Isabelle version;
wenzelm
parents: 38434
diff changeset
   160
28982
75f221d67515 run test for sunbroy2 on /tmp,
kleing
parents: 28597
diff changeset
   161
    if [ "${ISABELLE_HOME_USER:0:14}" == "/tmp/isabelle-" ]; then
75f221d67515 run test for sunbroy2 on /tmp,
kleing
parents: 28597
diff changeset
   162
        echo "--- cleaning up old $ISABELLE_HOME_USER"
75f221d67515 run test for sunbroy2 on /tmp,
kleing
parents: 28597
diff changeset
   163
        rm -rf $ISABELLE_HOME_USER
75f221d67515 run test for sunbroy2 on /tmp,
kleing
parents: 28597
diff changeset
   164
    fi
75f221d67515 run test for sunbroy2 on /tmp,
kleing
parents: 28597
diff changeset
   165
41967
6aa69999da8f isatest: fresh copy of settings avoids odd cumulative environment;
wenzelm
parents: 39686
diff changeset
   166
    cp $DISTPREFIX/Isabelle/etc/settings.orig $DISTPREFIX/Isabelle/etc/settings
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   167
    cat $SETTINGS >> $DISTPREFIX/Isabelle/etc/settings
24781
fd6d2040f89b fix shell quoting confusion
isatest
parents: 24758
diff changeset
   168
    (ulimit -t $MAXTIME; cd $DIR; $NICE $TOOL >> $TESTLOG 2>&1)
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   169
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   170
    if [ $? -eq 0 ]
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   171
    then
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   172
        # test log and cleanup
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   173
        echo ------------------- test successful --- `date` --- $HOSTNAME >> $TESTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   174
        gzip -f $TESTLOG
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   175
    else
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   176
        # test log
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   177
        echo ------------------- test FAILED --- `date` --- $HOSTNAME >> $TESTLOG 2>&1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   178
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   179
        # error log
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   180
        echo "Test for platform ${SHORT} failed. Log file attached." >> $ERRORLOG
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   181
        echo "[...]" >> $ERRORLOG
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   182
        tail -3 $TESTLOG >> $ERRORLOG
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   183
        echo >> $ERRORLOG
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   184
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   185
        FAIL="$FAIL$SHORT "
38434
7aa0245aeede removed non-BSD compatible option from cp
kleing
parents: 37874
diff changeset
   186
        (cd $ERRORDIR; cp $TESTLOG .)
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   187
    fi
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   188
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   189
    rm -f $RUNNING/$SHORT.running
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   190
done
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   191
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   192
# time and success/failure to master log
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   193
ELAPSED=$("$HOME/bin/showtime" "$SECONDS")
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   194
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   195
if [ -z "$FAIL" ]; then
28539
bdb308737bfd do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents: 28527
diff changeset
   196
    log "all tests successful, elapsed time $ELAPSED."
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   197
else
28539
bdb308737bfd do logging to MASTERLOG centrally (avoid multiple writers over NFS as
kleing
parents: 28527
diff changeset
   198
    log "targets ${FAIL}FAILED, elapsed time $ELAPSED."
22410
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   199
    exit 1
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   200
fi
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   201
da313b67a04d moved all isatest/cron job related files to own directory
kleing
parents:
diff changeset
   202
# end