File: testbuild

package info (click to toggle)
mpich 3.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 131,836 kB
  • sloc: ansic: 975,868; cpp: 57,437; f90: 53,762; perl: 19,562; xml: 12,464; sh: 12,303; fortran: 7,875; makefile: 7,078; ruby: 126; java: 100; python: 98; lisp: 19; php: 8; sed: 4
file content (145 lines) | stat: -rwxr-xr-x 4,185 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#! /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"
# Set defaults for the MPICH2 home
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 [ -d "/home/MPI/testing/tsuites" ] ; then 
    projectsdir="/home/MPI/testing/tsuites"
elif [ -d "/homes/MPI/testing/tsuites" ] ; then
    projectsdir="/homes/MPI/testing/tsuites"
elif [ -d "/Users/$LOGNAME/projects/software/testing" ] ; then
    projectsdir="/Users/$LOGNAME/projects/software/testing"
fi

date=`date "+%Y-%m-%d"`
# default outfile
outfile=testbuild.xml
tests="mpich:mpicxx:intel:testmpio" # Optional: 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 ;;
    -srcdir=*)  srcdir=$argval ;;
    -tests=*)   tests=$argval ;;
    -tmpdir=*)  tmpdir=$argval ;;
    -projectsdir=*) projectsdir=$argval ;;  # directory containing test sources
    -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

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
if [ -z "$testmpiodir" ] ; then testmpiodir=$tmpdir/cb/testmpio ; fi
if [ -z "$tmpdir" ] ; then tmpdir=/sandbox/$LOGNAME ; fi

# Construct the full outfile name from the dir and file
outfile="$outdir/$outfile"
if [ -z "$srcdir" ] ; then
    echo "Source directory for MPICH not specified!"
    exit 1
fi
if [ ! -d "$srcdir" ] ; then
    echo "Could not find MPICH2 source dir $srcdir"
    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 $testmpiodir ] ; then
    mkdir $testmpiodir
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 \
                        --srcdir=$srcdir \
                        --projectsdir=$projectsdir \
			$envargs \
			  "-tests='""$tests""'" -tmpdir=$tmpdir \
			  -xml -maxcount=1 -outfile=$outfile $other_opts