regressiontest_edge 10.6 KB
Newer Older
brugger's avatar
   
brugger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
#
# Modifications:
#   Mark C. Miller, Thu Jul 29 23:35:19 PDT 2010
#   Added option to ignore third party lib problems to cmake invokation.
#
#   Eric Brugger, Thu Mar 31 09:38:38 PDT 2011
#   Modified the script to work with the 2.2RC instead of the 2.0RC.
#
#   Eric Brugger, Tue Apr 12 10:53:02 PDT 2011
#   Removed the specular lighting tests from the skip list.
#
#   Jeremy Meredith, Tue Aug  9 17:19:55 EDT 2011
#   Updated the subversion host/path.
#
#   Eric Brugger, Thu Aug 25 11:22:39 PDT 2011
#   Modified the script to work on edge.
brugger's avatar
   
brugger committed
18
19
20
21
#
#   Eric Brugger, Thu Aug 25 14:11:16 PDT 2011
#   Modified the script to send out the e-mail only after the results
#   were posted.
brugger's avatar
   
brugger committed
22
23
24
25
26
#
#   Eric Brugger, Wed Jan 25 13:26:36 PST 2012
#   Modified the command that submits the batch job to run the test suite
#   to specify that it isn't using any of the Lustre file systems so that
#   the job will run even if one of the Lustre file systems is down.
brugger's avatar
   
brugger committed
27
28
29
30
#
#   Eric Brugger, Fri Jun 22 07:54:19 PDT 2012
#   I modified the script to use cmake 2.8.8. I also added several failing
#   tests to the skip list.
31
32
33
34
#
#   Mark C. Miller, Wed Jun 27 12:30:13 PDT 2012
#   Removed zipwrapper tests from skip list because the tests were updated
#   to use STL in place of VTK.
35
#
cyrush's avatar
cyrush committed
36
#   Cyrus Harrison, Wed Aug 15 12:31:00 PDT 2012
37
38
#   Update to use python test suite
#
brugger's avatar
   
brugger committed
39
40
41
42
#   Eric Brugger, Fri Oct 11 14:10:51 PDT 2013
#   Change the path to the cmake used to build visit to the latest 2.8.10.2
#   version.
#
brugger's avatar
   
brugger committed
43
44
45
46
#   Eric Brugger, Fri Oct 18 15:01:56 PDT 2013
#   I changed "make test" to "make testdata" in the data directory since the
#   name of the target changed.
#
47

brugger's avatar
   
brugger committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

#
# Determine the users name and e-mail address.
#
user=`whoami`

#
# Set the user e-mail address.
#
userNersc=unknown
userEmail=unknown
case $user in
    bonnell)
        userNersc=bonnell
        userEmail=bonnell2@llnl.gov
        ;;
    kbonnell)
        userNersc=bonnell
        userEmail=bonnell2@llnl.gov
        ;;
    brugger)
        userNersc=brugger
        userEmail=brugger1@llnl.gov
        ;;
72
73
74
75
    cyrush)
        userNersc=cyrush
        userEmail=cyrush@llnl.gov
        ;;
brugger's avatar
   
brugger committed
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    hrchilds)
        userNersc=hrchilds
        userEmail=hankchilds3@gmail.com
        ;;
    mcmiller)
        userNersc=miller86
        userEmail=miller86@llnl.gov
        ;;
    miller)
        userNersc=miller86
        userEmail=miller86@llnl.gov
        ;;
    miller86)
        userNersc=miller86
        userEmail=miller86@llnl.gov
        ;;
92
93
94
95
96
97
98
99
    harrison37)
        userNersc=cyrush
        userEmail=cyrush@llnl.gov
        ;;
    cyrush)
        userNersc=cyrush
        userEmail=cyrush@llnl.gov
        ;;
brugger's avatar
   
brugger committed
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
esac

if test "$userEmail" = "unknown" ; then
    echo "Unknown user name. Exiting."
    exit 1
fi

#
# Parse the command line to determine if we should run the test suite
# on the trunk or RC.
#
debug="false"
branch="trunk"
revision="latest"
serial="false"
testHost="edge"
cyrush's avatar
cyrush committed
116
testDir="/nfs/tmp2/"
117
post="true"
brugger's avatar
   
brugger committed
118
nerscHost="hopper.nersc.gov"
brugger's avatar
   
brugger committed
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
146
147
148
149
150

for abc
do
    case $1 in
        -trunk)
            branch="trunk"
            shift
            ;;
        -2.3RC)
            branch="2.3RC"
            shift
            ;;
        -serial)
            serial="true"
            shift
            ;;
        -parallel)
            serial="false"
            shift
            ;;
        -d)
            debug="true"
            shift
            ;;
        -r)
            revision=$2
            shift 2
            ;;
        -host)
            testHost=$2
            shift 2
            ;;
151
152
153
154
        -no-post)
            post="false"
            shift
            ;;
brugger's avatar
   
brugger committed
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
    esac
done

if test "$branch" = "trunk" ; then
    workingDir="test_trunk"
else
    workingDir="test_rc"
fi

#
# Run the test suite on $testHost.
#
rm -f $testHost
cat <<EOF > $testHost
#!/bin/sh

cyrush's avatar
cyrush committed
171
dateTag=\`date +%Y-%m-%d-%H:%M\`
brugger's avatar
   
brugger committed
172
173
174
175
176
177
178

if test "$serial" = "true" ; then
    modes="$testHost,serial"
else
    modes="$testHost,serial $testHost,parallel $testHost,scalable,parallel,icet"
fi

179
180
181
182
# Check out the source
if test "$debug" = "true" ; then
   echo "Removing any old test files at: $testDir/$user/$workingDir" | mail -s "Checkout started" $userEmail
fi
brugger's avatar
   
brugger committed
183

cyrush's avatar
cyrush committed
184
185
echo "Removing any old test files at: $testDir/$user/$workingDir"

brugger's avatar
   
brugger committed
186
187
188
189
190
191
192
193
194
195
196
197
# Create the test directory.
if test ! -e $testDir/$user; then
    mkdir $testDir/$user
fi
rm -rf $testDir/$user/$workingDir
mkdir $testDir/$user/$workingDir
cd $testDir/$user/$workingDir

# Check out the source
if test "$debug" = "true" ; then
   echo "Checkout of $branch started at: \`date\`" | mail -s "Checkout started" $userEmail
fi
cyrush's avatar
cyrush committed
198
199
200

echo "Checkout of $branch started at: \`date\`"

brugger's avatar
   
brugger committed
201
202
203
204
205
206
207
208
209
210
211
212
if test "$branch" = "trunk" ; then
    if test "$revision" = "latest" ; then
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/trunk/src > buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/trunk/data >> buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/trunk/test >> buildlog 2>&1
    else
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/trunk/src -r $revision > buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/trunk/data -r $revision >> buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/trunk/test -r $revision >> buildlog 2>&1
    fi
else
    if test "$revision" = "latest" ; then
213
214
215
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/branches/2.5RC/src > buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/branches/2.5RC/data >> buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/branches/2.5RC/test >> buildlog 2>&1
brugger's avatar
   
brugger committed
216
    else
217
218
219
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/branches/2.5RC/src -r $revision > buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/branches/2.5RC/data -r $revision >> buildlog 2>&1
        svn co svn+ssh://$userNersc@portal-auth.nersc.gov/project/projectdirs/visit/svn/visit/branches/2.5RC/test -r $revision >> buildlog 2>&1
brugger's avatar
   
brugger committed
220
221
222
223
224
225
    fi
fi
if test "$debug" = "true" ; then
    echo "Checkout of $branch completed at: \`date\`" | mail -s "Checkout completed" $userEmail
fi

cyrush's avatar
cyrush committed
226
227
echo "Checkout of $branch completed at: \`date\`"

brugger's avatar
   
brugger committed
228
229
230
# Build the code
cd src
export PATH=\$PATH:/usr/bin/X11
231

brugger's avatar
   
brugger committed
232
if test "$serial" = "true" ; then
233
    sed -i "s/VISIT_PARALLEL ON/VISIT_PARALLEL OFF/" config-site/edge83.cmake
brugger's avatar
   
brugger committed
234
fi
brugger's avatar
   
brugger committed
235
/usr/gapps/visit/thirdparty_shared/2.7.0/cmake/2.8.10.2/linux-x86_64_gcc-4.4/bin/cmake \
cyrush's avatar
cyrush committed
236
237
238
    -DVISIT_CONFIG_SITE=config-site/edge83.cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DVISIT_BUILD_ALL_PLUGINS=1 \
239
    -DVISIT_DATA_MANUAL_EXAMPLES:BOOL=ON \
cyrush's avatar
cyrush committed
240
    -DIGNORE_THIRD_PARTY_LIB_PROBLEMS:BOOL=ON \
241
242
    -DCMAKE_CXX_FLAGS_DEBUG:STRING="-Wall" \
    -DCMAKE_C_FLAGS_DEBUG:STRING="-Wall" \
cyrush's avatar
cyrush committed
243
    . >> ../buildlog 2>&1
brugger's avatar
   
brugger committed
244
245
246
247
248
make -j 12 >> ../buildlog 2>&1
if test "$debug" = "true" ; then
    echo "Source build completed at: \`date\`" | mail -s "Source build completed" $userEmail
fi

cyrush's avatar
cyrush committed
249
250
echo "Source build completed at: \`date\`"

brugger's avatar
   
brugger committed
251
252
# Build the test data
cd ../data
brugger's avatar
   
brugger committed
253
make -j 8 testdata >> ../buildlog 2>&1
brugger's avatar
   
brugger committed
254
255
256
257
if test "$debug" = "true" ; then
    echo "Data build completed at: \`date\`" | mail -s "Data build completed" $userEmail
fi

cyrush's avatar
cyrush committed
258
echo "Data build completed at: \`date\`"
259
260
261
262
263

if test "$debug" = "true" ; then
    echo "Starting tests:\`date\`" | mail -s "Starting tests" $userEmail
fi

cyrush's avatar
cyrush committed
264
265
echo "Starting tests:\`date\`"

brugger's avatar
   
brugger committed
266
267
268
269
# Run the tests, consolidating the results in one directory
cd ../test
rm -rf \$dateTag
mkdir \$dateTag
cyrush's avatar
cyrush committed
270
mkdir output
brugger's avatar
   
brugger committed
271
for m in \$modes; do
272
    theMode=\`echo \$m | tr ',' '_'\`
cyrush's avatar
cyrush committed
273
    resDir=output/\$theMode
274
275
276

    if test "$debug" = "true" ; then
        echo "runtest with mode = \$m" | mail -s "runtest with mode = \$m" $userEmail
brugger's avatar
   
brugger committed
277
278
    fi

cyrush's avatar
cyrush committed
279
280
281
    echo "runtest with mode = \$m"


brugger's avatar
   
brugger committed
282
    # Run the test
cyrush's avatar
cyrush committed
283
    ./runtest -o \$resDir -m "\$m" -n 1 >> buildlog 2>&1
284
    mv \$resDir/html \$dateTag/\$theMode
brugger's avatar
   
brugger committed
285
286
287
288
289

    # Move the results to the consolidation directory
    if test "$debug" = "true" ; then
        echo "Test \$m completed at: \`date\`" | mail -s "Tests completed" $userEmail
    fi
cyrush's avatar
cyrush committed
290
    echo "Test \$m completed at: \`date\`"
brugger's avatar
   
brugger committed
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
done

# Determine if the test suite passed or failed.
hasFailed=""
for m in \$modes; do
    theMode=\`echo \$m | tr ',' '_'\`
    if test "\$hasFailed" = ""; then
        hasFailed=\`cat "\$dateTag/\$theMode/index.html" | grep -m 1 Failed 2>/dev/null\`
    fi
    if test "\$hasFailed" = ""; then
        hasFailed=\`cat "\$dateTag/\$theMode/index.html" | grep -m 1 Unacceptable 2>/dev/null\`
    fi
    if test "\$hasFailed" = ""; then
        hasFailed=\`cat "\$dateTag/\$theMode/index.html" | grep -m 1 OS-Killed 2>/dev/null\`
    fi
done

308
309
310
311
312
313
314
315
316
317
318
if test "$post" = "true" ; then
    # If the test suite passed then update the revision number indicating the
    # last pass.
    cd ..
    if test "\$hasFailed" = ""; then
        svn update src/svn_bin/lastpass_$testHost
        svnRevision=\`svn info src | grep "Revision:" | cut -d' ' -f2\`
        rm -f src/svn_bin/lastpass_$testHost
        echo "\$svnRevision" > src/svn_bin/lastpass_$testHost
        svn commit -m "Update the revision number of the last test suite pass." src/svn_bin/lastpass_$testHost
    fi
brugger's avatar
   
brugger committed
319

320
321
    # Tar up the results
    cd test
cyrush's avatar
cyrush committed
322
    tar -czvf  html.tar.gz \$dateTag
brugger's avatar
   
brugger committed
323

cyrush's avatar
cyrush committed
324
325
    # Copy the results to nersc
    scp html.tar.gz $userNersc@$nerscHost:
326
    if test "$debug" = "true" ; then
cyrush's avatar
cyrush committed
327
        echo "Results copied to $nerscHost at: `date`" | mail -s "Results copied" $userEmail
328
    fi
brugger's avatar
   
brugger committed
329

cyrush's avatar
cyrush committed
330
331
    echo "Results copied to $nerscHost at: `date`"

332
333
    # Post the results.
    cd ..
cyrush's avatar
cyrush committed
334
335
    scp src/svn_bin/visit-update-test-website $userNersc@$nerscHost:
    ssh $userNersc@$nerscHost "./visit-update-test-website"
336
337
338
    if test "$debug" = "true" ; then
        echo "Results posted at: `date`" | mail -s "Results posted" $userEmail
    fi
brugger's avatar
   
brugger committed
339

cyrush's avatar
cyrush committed
340
341
    echo "Results posted at: `date`"

342
343
344
345
346
347
    # Send out an e-mail notifying the users of the test suite status.
    if test "\$hasFailed" = ""; then
        src/svn_bin/visit-notify-test-failure -pass -host $testHost
    else
        src/svn_bin/visit-notify-test-failure -host $testHost
    fi
brugger's avatar
   
brugger committed
348

349
350
351
352
353
    # Set the permissions so that others may access the test directory.
    cd ..
    chgrp -R visit $workingDir
    chmod -R g+rwX,o+rX $workingDir
fi
brugger's avatar
   
brugger committed
354
355
356
357
358
359
360
361

EOF

chmod 750 $testHost

# Run the test suite.
if test "$testHost" = "edge" ; then
    scp edge edge:edge_testit
cyrush's avatar
cyrush committed
362
363
    subTag=`date +%Y-%m-%d-%H:%M`
    ssh edge "msub -l nodes=1:ppn=12 -l gres=ignore -l walltime=12:00:00 -o edge_testit_$subTag.out -q pbatch -A bdivp -z ./edge_testit"
brugger's avatar
   
brugger committed
364
fi