/[MITgcm]/MITgcm_contrib/test_scripts/faulks/test_lcs
ViewVC logotype

Contents of /MITgcm_contrib/test_scripts/faulks/test_lcs

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download)
Mon Jul 12 15:03:19 2004 UTC (22 years, 1 month ago) by edhill
Branch: MAIN
Changes since 1.7: +6 -6 lines
 o fix syntax

1 #! /usr/bin/env bash
2
3 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/faulks/test_lcs,v 1.7 2004/07/12 14:24:30 edhill Exp $
4
5 # Ed Hill
6
7 # Test script for MITgcm that should work on most of the lcs.mit.edu
8 # Linux machines.
9
10 usage()
11 {
12 cat << EOF
13
14 Usage: $0 [OPTIONS]
15
16 where possible OPTIONS are:
17 (-help|-h) print usage
18 (-dir | -d) TDIR specify testing directory
19 (def="$TDIR")
20 (-of | -optfile) FILE specify an OPTFILE
21 (def="$OPTFILE")
22 (-[no]ieee) IEEE math flag
23 (def="$IEEE")
24
25 EOF
26 exit 1
27 }
28
29
30 # defaults
31 OPTFILE="../tools/build_options/linux_ia32_g77"
32 TESTDIR="/scratch/edhill/test_"`hostname`
33 IEEE="-ieee"
34
35 # Parse options
36 ac_prev=
37 for ac_option ; do
38
39 # If the previous option needs an argument, assign it.
40 if test -n "$ac_prev"; then
41 eval "$ac_prev=\$ac_option"
42 ac_prev=
43 continue
44 fi
45
46 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
47
48 case $ac_option in
49
50 -help | --help | -h | --h)
51 usage ;;
52
53 -dir | --dir | -d | --d)
54 ac_prev=TESTDIR ;;
55 -dir=* | --dir=* | -d=* | --d=*)
56 TESTDIR=$ac_optarg ;;
57
58 -of | --of | -optfile | --optfile)
59 ac_prev=OPTFILE ;;
60 --of=* | -of=* | --optfile=* | -optfile=*)
61 OPTFILE=$ac_optarg ;;
62
63 -ieee)
64 IEEE="-ieee" ;;
65 -noieee)
66 IEEE= ;;
67
68 *)
69 echo "Error: don't understand argument \"$ac_option\""
70 usage
71 ;;
72
73 esac
74
75 done
76
77 echo -n "Creating a temp directory ..."
78 mach=`hostname`
79 file=${OPTFILE##*/}
80 tdir=$TESTDIR"_"$file
81 test -e $tdir && rm -rf $tdir
82 mkdir $tdir
83 echo " done"
84
85 echo -n "Downloading the MITgcm code from CVS pserver..."
86 cd $tdir
87 export CVSROOT='/u/gcmpack'
88 cvs co MITgcm > /dev/null 2>&1
89 echo " done"
90
91 echo "Running testreport using:"
92 cd MITgcm/verification
93 comm="./testreport $IEEE -a edhill@mitgcm.org"
94 if test "x$OPTFILE" != x ; then
95 comm="$comm -of=$OPTFILE"
96 fi
97 echo " \"$comm\""
98 echo "======================"
99 echo
100 $comm | tail -100
101
102 echo
103 echo "======================"
104 echo "Cleaning test directories:"
105 ./testreport -clean > /dev/null 2>&1
106 echo "======================"
107 echo
108
109 echo "Running testreport using:"
110 comm="./testreport -adm $IEEE -a edhill@mitgcm.org"
111 if test "x$OPTFILE" != x ; then
112 comm="$comm -of=$OPTFILE"
113 fi
114 echo " \"$comm\""
115 echo "======================"
116 echo
117 $comm | tail -100
118

  ViewVC Help
Powered by ViewVC 1.1.22