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

Annotation of /MITgcm_contrib/test_scripts/faulks/test_lcs

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


Revision 1.7 - (hide annotations) (download)
Mon Jul 12 14:24:30 2004 UTC (22 years, 1 month ago) by edhill
Branch: MAIN
Changes since 1.6: +14 -7 lines
 o add dir option

1 edhill 1.1 #! /usr/bin/env bash
2    
3 edhill 1.7 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/faulks/test_lcs,v 1.6 2004/07/10 01:30:36 edhill Exp $
4 edhill 1.1
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 edhill 1.7 (-dir | -d) TDIR specify testing directory
19     (def="$TDIR")
20     (-of | -optfile) FILE specify an OPTFILE
21     (def="$OPTFILE")
22 edhill 1.1 (-[no]ieee) IEEE math flag
23 edhill 1.7 (def="$IEEE")
24 edhill 1.1
25     EOF
26     exit 1
27     }
28    
29    
30     # defaults
31     OPTFILE="../tools/build_options/linux_ia32_g77"
32 edhill 1.7 TESTDIR="/scratch/edhill/test_"`hostname`
33 edhill 1.1 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 edhill 1.7 -dir | --d)
54     ac_prev=TESTDIR ;;
55     --dir=* | -d=*)
56     TESTDIR=$ac_optarg ;;
57    
58 edhill 1.1 -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 edhill 1.7 tdir=$TESTDIR"_"$file
81 edhill 1.1 test -e $tdir && rm -rf $tdir
82     mkdir $tdir
83     echo " done"
84    
85 edhill 1.7 echo -n "Downloading the MITgcm code from CVS pserver..."
86 edhill 1.1 cd $tdir
87 edhill 1.5 export CVSROOT='/u/gcmpack'
88 edhill 1.1 cvs co MITgcm > /dev/null 2>&1
89     echo " done"
90    
91     echo "Running testreport using:"
92     cd MITgcm/verification
93 edhill 1.6 comm="./testreport $IEEE -a edhill@mitgcm.org" | tail -100
94 edhill 1.1 if test "x$OPTFILE" != x ; then
95     comm="$comm -of=$OPTFILE"
96     fi
97     echo " \"$comm\""
98     echo "======================"
99     echo
100 edhill 1.3 $comm
101    
102 edhill 1.6 echo
103     echo "======================"
104     echo "Cleaning test directories:"
105     ./testreport -clean > /dev/null 2>&1
106     echo "======================"
107     echo
108    
109 edhill 1.3 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
118    

  ViewVC Help
Powered by ViewVC 1.1.22