File: testbuild

package info (click to toggle)
mpich2 1.2.1.1-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 73,904 kB
  • ctags: 65,947
  • sloc: ansic: 343,583; makefile: 55,174; java: 34,959; sh: 27,558; perl: 17,355; cpp: 10,472; python: 9,649; f90: 5,753; fortran: 5,128; cs: 4,019; csh: 152; xml: 91; php: 8
file content (123 lines) | stat: -rwxr-xr-x 3,345 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#! /bin/sh
#
# This is a simple script that makes sure that checkbuilds can be 
# created and then runs it
# The cb suffix is for "check build"
srcdir=/home/MPI/testing/mpich2/mpich2
if [ ! -d $srcdir ] ; then
    if [ -d /homes/MPI/testing/mpich2/mpich2 ] ; then
        srcdir=/homes/MPI/testing/mpich2/mpich2
    else
        # We'll check for it later, after the args
        srcdir=
    fi
fi
outdir=/home/MPI/nightly
if [ ! -d $outdir ] ; then
    if [ -d /homes/MPI/nightly ] ; then
        outdir=/homes/MPI/nightly
    else
        # We'll check for it later, after the args
        outdir=
    fi
fi
if [ -z "$tmpdir" ] ; then tmpdir=/sandbox/$LOGNAME ; fi
if [ -z "$rundir" ] ; then rundir=$tmpdir/cb/mpich2 ; fi
if [ -z "$mpichtestdir" ] ; then mpichtestdir=$tmpdir/cb/mpitest ; fi
if [ -z "$mpicxxtestdir" ] ; then mpicxxtestdir=$tmpdir/cb/mpicxxtest ; fi
if [ -z "$inteltestdir" ] ; then inteltestdir=$tmpdir/cb/MPITEST ; fi

date=`date "+%Y-%m-%d"`
# default outfile
outfile=testbuild.xml
tests="mpich:mpicxx:intel:mpich2"
#
# Option options to checkbuild
other_opts=""
# Keep track of which compilers are set
ccset=no
cxxset=no
fcset=no
f90set=no
#
# Get options
for arg in "$@" ; do
    argval=""
    case $arg in 
        -*=*) argval=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    esac

    case $arg in 
    -outfile=*) outfile=$argval ;;
    -outdir=*)  outdir=$argval ;;
    -tests=*)   tests=$argval ;;
    -echo) set -x ;;
    *) other_opts="$other_opts '$arg'" 
    envset=`echo A$arg | sed -e 's/A-env=\([A-Z]*\).*/\1/'`
    if [ "$envset" != "$arg" ] ; then
        case $envset in 
	    CC) ccset=yes ;;
	    FC) fcset=yes ;;
	    CXX) cxxset=yes ;;
	    F90) f90set=yes ;;
	esac
    fi
    ;;
    esac
done

# Construct the full outfile name from the dir and file
outfile="$outdir/$outfile"
if [ ! -d "$srcdir" ] ; then
    echo "Could not find MPICH2 source dir"
    exit 1
fi
if [ ! -d $rundir ] ; then 
    # Assume that we have mkdir -p
    mkdir -p $rundir
fi
if [ ! -d $outdir ] ; then 
    # Assume that we have mkdir -p
    mkdir -p $outdir
fi
if [ ! -d "$rundir/maint" ] ; then
    mkdir "$rundir/maint"
fi
if [ ! -d $mpichtestdir ] ; then
    mkdir $mpichtestdir
fi
if [ ! -d $mpicxxtestdir ] ; then
    mkdir $mpicxxtestdir
fi
if [ ! -d $inteltestdir ] ; then
    mkdir $inteltestdir
fi
# We don't need to build the mpich2testdir because it is part of the mpich2
# distribution
# Build the current version of checkbuilds
(cd $rundir/maint && $srcdir/maint/configure 2>&1 >/dev/null)
if [ ! -x $rundir/maint/checkbuilds ] ; then
    echo "Could not build checkbuilds"
    exit 1
fi
#
#
# -tests="mpich:mpicxx:intel"
# Use -tests="mpich:mpicxx" to get a smaller list of tests.
# Use eval to make sure that quoted arguments containing spaces are handled
# correctly
# Set the default values of the CC and FC environment variables
#envargs='-envopt="CC;cc;gcc" -envopt="FC;f77;g77"'
envargs=""
if [ "$ccset" = no ] ; then
    envargs='-envopt="CC;cc;gcc"'
fi
if [ "$fcset" = no ] ; then
#    envargs="$envargs '-envopt="'"'"FC;f77;g77"'"'"'"
    envargs="$envargs -envopt="'"'"FC;f77;g77"'"'
fi
#			  '-envopt="CC;cc;gcc"' '-envopt="FC;f77;g77"' 
eval $rundir/maint/checkbuilds -rundir=$rundir \
			$envargs \
			  "-tests='""$tests""'" -tmpdir=$tmpdir \
			  -xml -maxcount=1 -outfile=$outfile $other_opts