~ubuntu-branches/ubuntu/vivid/mpich/vivid-proposed

« back to all changes in this revision

Viewing changes to doc/windev/testmpich.wsf

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-04-01 20:24:20 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: package-import@ubuntu.com-20140401202420-t5ey1ia2klt5dkq3
Tags: 3.1-4
* [c3e3398] Disable test_primitives, which is unreliable on some platforms.
            (Closes: #743047)
* [265a699] Add minimal autotest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<package>
2
 
<job id="testmpich">
3
 
    <runtime>
4
 
        <description>This script checks out mpich and builds it and the test suites </description>
5
 
        <named
6
 
            name = "buildonly"
7
 
            helpstring = "build mpich and the test suites"
8
 
            type = "simple"
9
 
            required = "false"
10
 
        />
11
 
        <named
12
 
                        name = "buildbatch"
13
 
                        helpstring = "build mpich, the test suites, and the batch files to run the tests"
14
 
                        type = "simple"
15
 
                        required = "false"
16
 
                />
17
 
        <named
18
 
            name = "testonly"
19
 
            helpstring = "run the test suites"
20
 
            type = "simple"
21
 
            required = "false"
22
 
        />
23
 
        <named
24
 
            name = "tag"
25
 
            helpstring = "check out mpich using the version tag specified"
26
 
            type = "string"
27
 
            required = "false"
28
 
        />
29
 
        <named
30
 
            name = "test"
31
 
            helpstring = "build and run the tests specified: c++, mpich, intel, mpich"
32
 
            type = "string"
33
 
            required = "false"
34
 
        />
35
 
        <named
36
 
            name = "fortran"
37
 
            helpstring = "build the fortran tests"
38
 
            type = "boolean"
39
 
            required = "false"
40
 
        />
41
 
                <named
42
 
                        name = "ch"
43
 
                        helpstring = "channel to build"
44
 
                        type = "string"
45
 
                        required = "false"
46
 
                />
47
 
                <named
48
 
                        name = "remove-cvs-dirs"
49
 
                        helpstring = "delete the directories before checking them out"
50
 
                        type = "simple"
51
 
                        required = "false"
52
 
                />
53
 
        <named
54
 
            name = "mpich"
55
 
            helpstring = "path to mpich"
56
 
            type = "string"
57
 
            required = "false"
58
 
        />
59
 
        <named
60
 
            name = "mpichi"
61
 
            helpstring = "path to installed mpich"
62
 
            type = "string"
63
 
            required = "false"
64
 
        />
65
 
        <named
66
 
            name = "test_installed"
67
 
            helpstring = "test the installed mpich"
68
 
            type = "simple"
69
 
            required = "false"
70
 
        />
71
 
        <named
72
 
            name = "make"
73
 
            helpstring = "make mpich or use existing build"
74
 
            type = "boolean"
75
 
            required = "false"
76
 
        />
77
 
        <named
78
 
            name = "configure"
79
 
            helpstring = "configure mpich or use existing configuration"
80
 
            type = "boolean"
81
 
            required = "false"
82
 
        />
83
 
        <named
84
 
            name = "mpich"
85
 
            helpstring = "path to mpich test suite"
86
 
            type = "string"
87
 
            required = "false"
88
 
        />
89
 
        <named
90
 
            name = "cpp"
91
 
            helpstring = "path to c++ test suite"
92
 
            type = "string"
93
 
            required = "false"
94
 
        />
95
 
        <named
96
 
            name = "intel"
97
 
            helpstring = "path to intel test suite"
98
 
            type = "string"
99
 
            required = "false"
100
 
        />
101
 
        <named
102
 
            name = "ssh-user"
103
 
            helpstring = "user name to use with ssh commands"
104
 
            type = "string"
105
 
            required = "false"
106
 
        />
107
 
        <named
108
 
            name = "ssh"
109
 
            helpstring = "ssh command name - default = ssh"
110
 
            type = "string"
111
 
            required = "false"
112
 
        />
113
 
        <named
114
 
                        name = "cvs_host"
115
 
                        helpstring = "cvs host to use - cvs -d username@cvs_host:rootdir co mpichallWithMPE"
116
 
                        type = "string"
117
 
                        required = "false"
118
 
        />
119
 
        <named
120
 
            name = "noexecute"
121
 
            helpstring = "generate batch files and don't execute any tests"
122
 
            type = "simple"
123
 
            required = "false"
124
 
        />
125
 
        <named
126
 
            name = "vs05"
127
 
            helpstring = "add compiler options for VS 2005 to minimize warnings"
128
 
            type = "simple"
129
 
            required = "false"
130
 
        />
131
 
        <named
132
 
                        name = "batch"
133
 
                        helpstring = "create batch files for each test suite"
134
 
                        type = "boolean"
135
 
                        required = "false"
136
 
                />
137
 
                <named
138
 
                        name = "localonly"
139
 
                        helpstring = "add -localonly to the mpiexec command"
140
 
                        type = "simple"
141
 
                        required = "false"
142
 
                />
143
 
                <named
144
 
                        name = "summarize"
145
 
                        helpstring = "create the summary directory by parsing the previously created tests.output files"
146
 
                        type = "simple"
147
 
                        required = "false"
148
 
                />
149
 
                <named
150
 
                        name = "win64"
151
 
                        helpstring = "use the win64 include directory"
152
 
                        type = "simple"
153
 
                        required = "false"
154
 
                />
155
 
    </runtime>
156
 
<object id="f" progid="Scripting.FileSystemObject" />
157
 
<object id="WshShell" progid="WScript.Shell" />
158
 
<object id="WshNetwork" progid="WScript.Network" />
159
 
<script language="VBScript">
160
 
 
161
 
' global variables
162
 
'Dim WshShell
163
 
'Set WshShell = CreateObject("WScript.Shell")
164
 
'Set WshNetwork = WScript.CreateObject("WScript.Network")
165
 
set env = WshShell.Environment("PROCESS")
166
 
'Set f = WScript.CreateObject("Scripting.FileSystemObject")
167
 
Set root_folder = f.GetFolder(".")
168
 
hostname = WshNetwork.ComputerName 
169
 
rootdir = ""
170
 
bTestMPICH = true
171
 
bTestCPP = true
172
 
bTestINTEL = true
173
 
bTestMPICH = true
174
 
bBuildOnly = false
175
 
bTestOnly = false
176
 
cvsTag = "HEAD"
177
 
bCheckoutMPICH = true
178
 
bConfigureMPICH = true
179
 
bConfigureMPICHTests = true
180
 
bMakeMPICH = true
181
 
bCheckoutMPICH = true
182
 
bCheckoutCPP = true
183
 
bCheckoutINTEL = true
184
 
pathMPICH = ""
185
 
pathMPICHInstalled = ""
186
 
pathMPICH = ""
187
 
pathCPP = ""
188
 
pathINTEL = ""
189
 
username = env("USERNAME")
190
 
mpich_outputdir = ""
191
 
intel_rootdir = ""
192
 
CC = "cl"
193
 
CPP = "cl"
194
 
FC = "ifort"
195
 
CPPFLAGS = " /nologo /EHsc /W4 /DHAVE_MPI_CXX /DUSE_STDARG /DHAVE_WINDOWS_H /DHAVE_LONG_LONG_INT /DHAVE_LONG_DOUBLE /DHAVE_MPI_DARRAY_SUBARRAY"
196
 
CFLAGS = " /nologo /W4 /DUSE_STDARG /DHAVE_WINDOWS_H /DHAVE_LONG_LONG_INT /DHAVE_LONG_DOUBLE /DHAVE_MPI_DARRAY_SUBARRAY /DMPICH_SKIP_MPICXX"
197
 
'mpichlib = "mpichd.lib"
198
 
mpichlib = "mpi.lib"
199
 
fmpichlib = "fmpich.lib"
200
 
cppmpichlib = "cxx.lib"
201
 
bFortran = true
202
 
bRemoveDirs = false
203
 
cvs_host = "harley.mcs.anl.gov"
204
 
cvs_root_dir = "/home/MPI/cvsMaster"
205
 
temp_out_name = "tempout.txt"
206
 
ssh_cmd = "ssh"
207
 
scp_cmd = "scp"
208
 
channel = ""
209
 
mpiexec = "mpiexec"
210
 
testdirname = "testmpich"
211
 
mpiexec_args = ""
212
 
timeoutarg = " -timeout 180"
213
 
bCommandsOnly = False
214
 
commands_filename = "runcommands.bat"
215
 
bBatch = False
216
 
bSummarize = False
217
 
bBatchFilesOnly = false
218
 
bWin64 = false
219
 
 
220
 
' er.xsl file contents required to display the summary.xml files
221
 
erfilecontents = _
222
 
"<?xml version='1.0' ?>" & vbCrLf & _
223
 
"<!-- <xsl:stylesheet  xmlns:xsl=""http://www.w3.org/TR/WD-xsl""> -->" & vbCrLf & _
224
 
"<xsl:stylesheet  xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" version=""1.0"">" & vbCrLf & _
225
 
"<!-- <xsl:output method=""html""/>-->" & vbCrLf & _
226
 
"<xsl:template match=""/"">" & vbCrLf & _
227
 
"" & vbCrLf & _
228
 
"<html>" & vbCrLf & _
229
 
"<head>" & vbCrLf & _
230
 
"<title>MPICH Error Report</title>" & vbCrLf & _
231
 
"</head>" & vbCrLf & _
232
 
"<body>" & vbCrLf & _
233
 
"    <h1> Error Report </h1>" & vbCrLf & _
234
 
"    <table border=""2"" bgcolor=""Green"">" & vbCrLf & _
235
 
"    <xsl:apply-templates select=""MPITESTRESULTS""/>" & vbCrLf & _
236
 
"    </table>" & vbCrLf & _
237
 
"</body>" & vbCrLf & _
238
 
"</html>" & vbCrLf & _
239
 
"</xsl:template>" & vbCrLf & _
240
 
"" & vbCrLf & _
241
 
"<xsl:template match=""MPITESTRESULTS"">" & vbCrLf & _
242
 
"    <xsl:apply-templates select=""DATE""/>" & vbCrLf & _
243
 
"    <xsl:apply-templates select=""MPITEST""/>" & vbCrLf & _
244
 
"</xsl:template>" & vbCrLf & _
245
 
"" & vbCrLf & _
246
 
"<xsl:template match=""DATE"">" & vbCrLf & _
247
 
"    <tr><td bgcolor=""white"" colspan=""4"">Test run on  <xsl:value-of select="".""/></td></tr>" & vbCrLf & _
248
 
"</xsl:template>" & vbCrLf & _
249
 
"" & vbCrLf & _
250
 
"<xsl:template match=""MPITEST"">" & vbCrLf & _
251
 
"    <tr bgcolor=""white"">" & vbCrLf & _
252
 
"    <td valign=""top"">" & vbCrLf & _
253
 
"    <xsl:value-of select=""NAME""/>" & vbCrLf & _
254
 
"    </td><td valign=""top"">" & vbCrLf & _
255
 
"    <xsl:value-of select=""STATUS""/>" & vbCrLf & _
256
 
"    </td><td WIDTH=""40%""><pre>" & vbCrLf & _
257
 
"    <xsl:value-of select=""TESTDIFF""/>" & vbCrLf & _
258
 
"    </pre>" & vbCrLf & _
259
 
"    </td>" & vbCrLf & _
260
 
"    <td valign=""top"">" & vbCrLf & _
261
 
"    <pre>" & vbCrLf & _
262
 
"    <xsl:value-of select=""TRACEBACK""/>" & vbCrLf & _
263
 
"    </pre>" & vbCrLf & _
264
 
"    </td>" & vbCrLf & _
265
 
"    </tr>" & vbCrLf & _
266
 
"</xsl:template>" & vbCrLf & _
267
 
"" & vbCrLf & _
268
 
"<xsl:template match=""TRACEBACK"">" & vbCrLf & _
269
 
"    <a>" & vbCrLf & _
270
 
"    <xsl:attribute name=""HREF"">" & vbCrLf & _
271
 
"    <xsl:value-of select="".""/>" & vbCrLf & _
272
 
"    </xsl:attribute>" & vbCrLf & _
273
 
"    Traceback" & vbCrLf & _
274
 
"    </a>" & vbCrLf & _
275
 
"</xsl:template>" & vbCrLf & _
276
 
"" & vbCrLf & _
277
 
"" & vbCrLf & _
278
 
"</xsl:stylesheet>" & vbCrLf
279
 
 
280
 
 
281
 
' check if we are running cscript or wscript
282
 
bEcho = false
283
 
If InStr(1, LCase(WScript.FullName), "cscript") > 0 Then
284
 
        bEcho = true
285
 
End If
286
 
Function cEcho(str)
287
 
        If bEcho Then
288
 
                On Error Resume Next
289
 
                WScript.Echo str
290
 
                if err <> 0 then
291
 
                        num_chars = Len(str) / 2
292
 
                        if num_chars > 4096 then
293
 
                                num_chars = 4096
294
 
                        end if
295
 
                        WScript.Echo Left(str, num_chars) & vbCrLf & "..." & vbCrLf
296
 
                        WScript.Echo Right(str, num_chars)
297
 
                end if
298
 
        End If
299
 
End Function
300
 
 
301
 
' parse the command line arguments
302
 
 
303
 
if WScript.Arguments.Named.Exists("noexecute") then
304
 
        bCommandsOnly = true
305
 
        if WScript.Arguments.Named.Item("noexecute") <> "" then
306
 
                commands_filename = WScript.Arguments.Named.Item("noexecute")
307
 
        end if
308
 
        set commands_file = f.CreateTextFile(commands_filename, true)
309
 
end if
310
 
 
311
 
if WScript.Arguments.Named.Exists("vs05") then
312
 
        CPPFLAGS = CPPFLAGS & " /D_CRT_SECURE_NO_DEPRECATE"
313
 
        CFLAGS = CFLAGS & " /D_CRT_SECURE_NO_DEPRECATE"
314
 
end if
315
 
 
316
 
if WScript.Arguments.Named.Exists("buildonly") then
317
 
        bBuildOnly = true
318
 
end if
319
 
 
320
 
if WScript.Arguments.Named.Exists("buildbatch") then
321
 
        bBatchFilesOnly = true
322
 
        bBatch = true
323
 
end if
324
 
 
325
 
if WScript.Arguments.Named.Exists("testonly") then
326
 
        bTestOnly = true
327
 
end if
328
 
 
329
 
if WScript.Arguments.Named.Exists("summarize") then
330
 
        bSummarize = true
331
 
        bBatch = true
332
 
        bTestOnly = true
333
 
end if
334
 
 
335
 
if WScript.Arguments.Named.Exists("localonly") then
336
 
        mpiexec_args = mpiexec_args & " -localonly"
337
 
end if
338
 
 
339
 
if WScript.Arguments.Named.Exists("batch") then
340
 
        bBatch = WScript.Arguments.Named.Item("batch")
341
 
end if
342
 
 
343
 
if WScript.Arguments.Named.Exists("remove-cvs-dirs") then
344
 
        bRemoveDirs = true
345
 
end if
346
 
 
347
 
if WScript.Arguments.Named.Exists("fortran") then
348
 
        bFortran = WScript.Arguments.Named.Item("fortran")
349
 
end if
350
 
 
351
 
if WScript.Arguments.Named.Exists("tag") then
352
 
        cvsTag = WScript.Arguments.Named.Item("tag")
353
 
end if
354
 
 
355
 
if WScript.Arguments.Named.Exists("ch") then
356
 
        Select Case WScript.Arguments.Named.Item("ch")
357
 
                Case "sock"
358
 
                Case "ssm"
359
 
                        channel = "ch3ssmDebug"
360
 
                Case "essm"
361
 
                        channel = "ch3essmDebug"
362
 
                Case "shm"
363
 
                        channel = "ch3shmDebug"
364
 
                Case "sshm"
365
 
                        channel = "ch3sshmDebug"
366
 
                Case "ib"
367
 
                        channel = "ch3ibDebug"
368
 
        End Select
369
 
end if
370
 
 
371
 
if WScript.Arguments.Named.Exists("mpich") then
372
 
        bCheckoutMPICH = false
373
 
        bMakeMPICH = false
374
 
        bConfigureMPICH = false
375
 
        bConfigureMPICHTests = false
376
 
        pathMPICH = WScript.Arguments.Named.Item("mpich")
377
 
        mpiexec = pathMPICH & "\bin\mpiexec.exe"
378
 
end if
379
 
 
380
 
if WScript.Arguments.Named.Exists("mpichi") then
381
 
        bMakeMPICH = false
382
 
        bConfigureMPICH = false
383
 
        pathMPICHInstalled = WScript.Arguments.Named.Item("mpichi")
384
 
        mpiexec = pathMPICHInstalled & "\bin\mpiexec.exe"
385
 
end if
386
 
 
387
 
if WScript.Arguments.Named.Exists("test_installed") then
388
 
        bMakeMPICH = false
389
 
        bConfigureMPICH = false
390
 
        On Error Resume Next
391
 
        pathMPICHInstalled = WshShell.RegRead("HKLM\Software\MPICH\Path")
392
 
        if err <> 0 then
393
 
                cEcho "MPICH not installed on this machine."
394
 
                WScript.Quit
395
 
        end if
396
 
        if Right(pathMPICHInstalled, 1) = "\" then
397
 
                pathMPICHInstalled = Left(pathMPICHInstalled, Len(pathMPICHInstalled) - 1)
398
 
        end if
399
 
        mpiexec = """" & pathMPICHInstalled & "\bin\mpiexec.exe"""
400
 
        cEcho "Testing installed mpich: " & pathMPICHInstalled
401
 
end if
402
 
 
403
 
if WScript.Arguments.Named.Exists("make") then
404
 
        bMakeMPICH = WScript.Arguments.Named.Item("make")
405
 
end if
406
 
 
407
 
if WScript.Arguments.Named.Exists("configure") then
408
 
        bConfigureMPICH = WScript.Arguments.Named.Item("configure")
409
 
end if
410
 
 
411
 
if WScript.Arguments.Named.Exists("mpich") then
412
 
        bCheckoutMPICH = false
413
 
        pathMPICH = WScript.Arguments.Named.Item("mpich")
414
 
end if
415
 
 
416
 
if WScript.Arguments.Named.Exists("intel") then
417
 
        bCheckoutINTEL = false
418
 
        pathINTEL = WScript.Arguments.Named.Item("intel")
419
 
end if
420
 
 
421
 
if WScript.Arguments.Named.Exists("cpp") then
422
 
        bCheckoutCPP = false
423
 
        pathCPP = WScript.Arguments.Named.Item("cpp")
424
 
end if
425
 
 
426
 
if WScript.Arguments.Named.Exists("ssh_user") then
427
 
        username = WScript.Arguments.Named.Item("ssh_user")
428
 
end if
429
 
 
430
 
if WScript.Arguments.Named.Exists("ssh-user") then
431
 
        username = WScript.Arguments.Named.Item("ssh-user")
432
 
end if
433
 
 
434
 
if WScript.Arguments.Named.Exists("ssh") then
435
 
        ssh_cmd = WScript.Arguments.Named.Item("ssh")
436
 
end if
437
 
 
438
 
if WScript.Arguments.Named.Exists("cvs_host") then
439
 
        cvs_host = WScript.Arguments.Named.Item("cvs_host")
440
 
end if
441
 
 
442
 
if WScript.Arguments.Named.Exists("cvs-host") then
443
 
        cvs_host = WScript.Arguments.Named.Item("cvs-host")
444
 
end if
445
 
 
446
 
if WScript.Arguments.Named.Exists("win64") then
447
 
        bWin64 = true
448
 
        mpichlib = mpichlib & " bufferoverflowU.lib"
449
 
        fmpichlib = fmpichlib & " bufferoverflowU.lib"
450
 
end if
451
 
 
452
 
if WScript.Arguments.Named.Exists("test") then
453
 
        tests = Split(WScript.Arguments.Named.Item("test"), ",")
454
 
        bTestMPICH = false
455
 
        bTestCPP = false
456
 
        bTestINTEL = false
457
 
        bTestMPICH = false
458
 
        for each test in tests
459
 
                Select Case test
460
 
                        Case "c++"
461
 
                                bTestCPP = true
462
 
                        Case "mpich"
463
 
                                bTestMPICH = true
464
 
                        Case "intel"
465
 
                                bTestINTEL = true
466
 
                        Case Else
467
 
                                cEcho "unknown test: " & test
468
 
                End Select
469
 
        next
470
 
end if
471
 
 
472
 
' test the command line parsing
473
 
'tests = ""
474
 
'if bTestMPICH then
475
 
'       tests = tests & "mpich "
476
 
'end if
477
 
'if bTestCPP then
478
 
'       tests = tests & "c++ "
479
 
'end if
480
 
'if bTestINTEL then
481
 
'       tests = tests & "intel "
482
 
'end if
483
 
'if bTestMPICH then
484
 
'       tests = tests & "mpich "
485
 
'end if
486
 
'if bBuildOnly then
487
 
'       cEcho "buildonly"
488
 
'end if
489
 
'if bTestOnly then
490
 
'       cEcho "testonly"
491
 
'end if
492
 
'cEcho tests
493
 
'cEcho "cvsTag = " & cvsTag
494
 
'WScript.Quit
495
 
 
496
 
' utility functions
497
 
last_commands_dir = ""
498
 
Function RunCommand(cmd_line)
499
 
        if bCommandsOnly then
500
 
                if WshShell.CurrentDirectory <> last_commands_dir then
501
 
                        commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
502
 
                end if
503
 
                last_commands_dir = WshShell.CurrentDirectory
504
 
                commands_file.WriteLine(cmd_line & " 2>&1")
505
 
                RunCommand = ""
506
 
        else
507
 
                Set oExec = WshShell.Exec("cmd /C " & cmd_line & " 2>&1")
508
 
                cmd_output = oExec.StdOut.ReadAll()
509
 
                'cmd_output = cmd_output & oExec.StdErr.ReadAll()
510
 
                RunCommand = cmd_output
511
 
        end if
512
 
End Function
513
 
 
514
 
Function RunEchoCommand(cmd_line)
515
 
        cEcho cmd_line
516
 
        cmd_line = "cmd /C " & cmd_line & " 2>&1"
517
 
        Set oExec = WshShell.Exec(cmd_line)
518
 
        while not oExec.Stdout.AtEndOfStream
519
 
                cEcho oExec.Stdout.ReadLine()
520
 
        wend
521
 
End Function
522
 
 
523
 
Function RunEchoCommandError(cmd_line)
524
 
        cEcho cmd_line
525
 
        cmd_line = "cmd /C " & cmd_line & " 2>&1"
526
 
        Set oExec = WshShell.Exec(cmd_line)
527
 
        while not oExec.Stdout.AtEndOfStream
528
 
                cEcho oExec.Stdout.ReadLine()
529
 
        wend
530
 
        RunEchoCommand = oExec.ExitCode
531
 
End Function
532
 
 
533
 
Function RunEchoCommandToFile(cmd_line, file)
534
 
        cEcho cmd_line
535
 
        cmd_line = "cmd /C " & cmd_line & " 2>&1"
536
 
        Set oExec = WshShell.Exec(cmd_line)
537
 
        while not oExec.Stdout.AtEndOfStream
538
 
                line = oExec.Stdout.ReadLine()
539
 
                cEcho line
540
 
                file.Write(line)
541
 
        wend
542
 
        RunEchoCommandToFile = oExec.ExitCode
543
 
End Function
544
 
 
545
 
Function ReplaceBetweenTags(str, tag1, find_str, tag2, replace_str)
546
 
        Dim index, left_str, right_str, start_index, end_index
547
 
        index = InStr(str, find_str)
548
 
        If index = 0 Then
549
 
                'MsgBox find_str & " not found in: " & str
550
 
                ReplaceBetweenTags = str
551
 
                Exit Function
552
 
        End If
553
 
        left_str = Left(str, index)
554
 
        right_str = Right(str, Len(str) - index)
555
 
        start_index = InStrRev(left_str, tag1)
556
 
        If start_index = 0 Then
557
 
                'MsgBox tag1 & " not found in: " & left_str
558
 
                ReplaceBetweenTags = str
559
 
                Exit Function
560
 
        End If
561
 
        end_index = InStr(right_str, tag2)
562
 
        If end_index = 0 Then
563
 
                'MsgBox tag2 & " not found in: " & right_str
564
 
                ReplaceBetweenTags = str
565
 
                Exit Function
566
 
        End If
567
 
        end_index = end_index + index
568
 
        ReplaceBetweenTags = Left(str, start_index-1) & replace_str & Right(str, Len(str) - end_index - Len(tag2) + 1)
569
 
End Function
570
 
 
571
 
Function ReplaceBetweenTagsAll(str, tag1, find_str, tag2, replace_str)
572
 
        str2 = ReplaceBetweenTags(str, tag1, find_str, tag2, replace_str)
573
 
        while str <> str2
574
 
                str = str2
575
 
                str2 = ReplaceBetweenTags(str, tag1, find_str, tag2, replace_str)
576
 
        wend
577
 
        ReplaceBetweenTagsAll = str
578
 
End Function
579
 
 
580
 
Function ParseFailed(str)
581
 
        set rx = new RegExp
582
 
        ' remove the passed fields
583
 
        rx.Global = True
584
 
        rx.Pattern = "<MPITEST>.*" & vbCrLf & "<NAME>.*</NAME>.*" & vbCrLf & "<STATUS>pass</STATUS>.*" & vbCrLf & "</MPITEST>.*" & vbCrLf
585
 
        str = rx.Replace(str, "")
586
 
        ' remove failures due to missing executables
587
 
        str = ReplaceBetweenTagsAll(str, "<MPITEST>", "no executable, test skipped", "</MPITEST>" & vbCrLf, "")
588
 
        ParseFailed = str
589
 
End Function
590
 
 
591
 
Function CountInstances(filename, str)
592
 
        set fin = f.OpenTextFile(filename)
593
 
        set rx = new RegExp
594
 
        rx.Global = True
595
 
        rx.Pattern = str
596
 
        count = 0
597
 
        if not fin.AtEndOfStream then
598
 
                Set Matches = rx.Execute(fin.ReadAll())
599
 
                For Each Match in Matches
600
 
                        count = count + 1
601
 
                Next
602
 
        end if
603
 
        CountInstances = count
604
 
End Function
605
 
 
606
 
Function CheckOut(package)
607
 
        Select Case package
608
 
                Case "mpich"
609
 
                        if bRemoveDirs and f.FolderExists("mpich") then
610
 
                                f.DeleteFolder "mpich", true
611
 
                        end if
612
 
                        co = "mpichallWithMPE"
613
 
                Case "mpich"
614
 
                        if bRemoveDirs and f.FolderExists("mpi1") then
615
 
                                f.DeleteFolder "mpi1", true
616
 
                        end if
617
 
                        co = "-d mpi1 mpich/examples/test"
618
 
                Case "c++"
619
 
                        if bRemoveDirs and f.FolderExists("mpicxxtest") then
620
 
                                f.DeleteFolder "mpicxxtest", true
621
 
                        end if
622
 
                        co = "mpicxxtest"
623
 
                Case "intel"
624
 
                        if bRemoveDirs and f.FolderExists("IntelMPITEST") then
625
 
                                f.DeleteFolder "IntelMPITEST", true
626
 
                        end if
627
 
                        co = "IntelMPITEST"
628
 
                Case Else
629
 
                        if bRemoveDirs and f.FolderExists(package) then
630
 
                                f.DeleteFolder package, true
631
 
                        end if
632
 
                        co = package
633
 
        End Select
634
 
        cmd = "cvs -q -d :ext:" & username & "@" & cvs_host & ":" & cvs_root_dir & " co " & co
635
 
        'cEcho cmd
636
 
        env("CVS_RSH") = ssh_cmd
637
 
        RunEchoCommand cmd
638
 
        if package = "mpich" then
639
 
                cEcho "changing into directory " & WshShell.CurrentDirectory & "\mpi1"
640
 
                WshShell.CurrentDirectory = "mpi1"
641
 
                cmd = "cvs -q co -d io romio/test"
642
 
                'cEcho cmd
643
 
                RunEchoCommand cmd
644
 
                cEcho "changing into directory " & rootdir
645
 
                WshShell.CurrentDirectory = rootdir
646
 
        end if
647
 
End Function
648
 
 
649
 
num_files = 0
650
 
Function internalFindFiles(ByRef files, folder, filename)
651
 
        For Each sub_folder in folder.SubFolders
652
 
                internalFindFiles files, sub_folder, filename
653
 
        Next
654
 
        For Each file in folder.Files
655
 
                If file.Name = filename Then
656
 
                        files.Add num_files, file.Path
657
 
                        num_files = num_files + 1
658
 
                End If
659
 
        Next
660
 
End Function
661
 
Function FindFiles(ByRef files, folder, filename)
662
 
        files.RemoveAll()
663
 
        num_files = 0
664
 
        internalFindFiles files, folder, filename
665
 
End Function
666
 
 
667
 
Function BuildMPICHTestList(filename, testlistfile)
668
 
        Set fin = f.OpenTextFile(filename)
669
 
        while not fin.AtEndOfStream
670
 
                line = fin.ReadLine()
671
 
                line = Trim(line)
672
 
                ' Find and parse the RunTest lines
673
 
                if InStr(1, line, "RunTest") then
674
 
                        words = Split(line, " ", -1, 1)
675
 
                        if UBound(words) > 2 then
676
 
                                testlistfile.WriteLine(words(1) & " " & words(2))
677
 
                        end if
678
 
                end if
679
 
                ' The romio tests don't use RunTest lines so find and parse lines with "$mpirun -np" in them.
680
 
                if InStr(1, line, "$mpirun -np") > 0 and InStr(1, line, "FILENAME") > 0 then
681
 
                        words = Split(line, " ", -1, 1)
682
 
                        if UBound(words) > 3 then
683
 
                                if InStr(1, words(3), "./") then
684
 
                                        testlistfile.WriteLine(Right(words(3), len(words(3))-2) & " " & words(2))
685
 
                                else
686
 
                                        testlistfile.WriteLine(words(3) & " " & words(2))
687
 
                                end if
688
 
                        end if
689
 
                end if
690
 
        wend
691
 
        fin.Close()
692
 
End Function
693
 
 
694
 
Function BuildMPICHMakefile(filename, outputfile)
695
 
        Set fin = f.OpenTextFile(filename)
696
 
        while not fin.AtEndOfStream
697
 
                line = fin.ReadLine()
698
 
                line = Trim(line)
699
 
                ' FIXME: Add code to handle the io\Makefile.in format
700
 
                if InStr(1, line, " -o ", 1) > 0 and InStr(1, line, ".o", 1) > 0 then
701
 
                        if InStr(1, line, "FLINKER") then
702
 
                                bFort = true
703
 
                                ext = ".f"
704
 
                        else
705
 
                                bFort = false
706
 
                                ext = ".c"
707
 
                        end if
708
 
                        first = InStr(1, line, " -o ")
709
 
                        last = InStr(first+4, line, " ")
710
 
                        test = Mid(line, first + 4, last - first - 4)
711
 
                        test = Replace(test, "./", "")
712
 
                        if test <> "$*" then
713
 
                                if bFort then
714
 
                                        cmd = FC & " /nologo -o " & test & ".exe"
715
 
                                else
716
 
                                        cmd = CC & CFLAGS & " -o " & test & ".exe"
717
 
                                end if
718
 
                                words = Split(line, " ", -1, 1)
719
 
                                for each word in words
720
 
                                        if instr(1, word, ".o") then
721
 
                                                cmd = cmd & " " & Replace(filename, "Makefile.in", Replace(word, ".o", ext))
722
 
                                        end if
723
 
                                next
724
 
                                if bFort then
725
 
                                        cmd = cmd & " " & fmpichlib '& " " & mpichlib
726
 
                                else
727
 
                                        cmd = cmd & " " & mpichlib
728
 
                                end if
729
 
                                cEcho cmd
730
 
                                if not bFortran and bFort then
731
 
                                        result = "not building fortran"
732
 
                                else
733
 
                                        if f.FileExists(test & ".exe") then
734
 
                                                f.DeleteFile(test & ".exe")
735
 
                                        end if
736
 
                                        'result = RunCommand(cmd)
737
 
                                end if
738
 
                                'cEcho result
739
 
                                outputfile.WriteLine(cmd)
740
 
                                'outputfile.Write(result)
741
 
                                stdoutfile = Replace(filename, "Makefile.in", test & ".std")
742
 
                                if f.FileExists(stdoutfile) then
743
 
                                        f.CopyFile stdoutfile, mpich_outputdir, true
744
 
                                end if
745
 
                        end if
746
 
                end if
747
 
        wend
748
 
        fin.Close()
749
 
End Function
750
 
 
751
 
Function BuildCPPMakefile(filename)
752
 
        Set fin = f.OpenTextFile(filename)
753
 
        Set buildout = f.CreateTextFile("build.out", True)
754
 
        Set testlistout = f.CreateTextFile("testlist", True)
755
 
        while not fin.AtEndOfStream
756
 
                line = fin.ReadLine()
757
 
                line = Trim(line)
758
 
                if InStr(1, line, " -o ", 1) > 0 then
759
 
                        first = InStr(1, line, " -o ")
760
 
                        last = InStr(first+4, line, " ")
761
 
                        test = Mid(line, first + 4, last - first - 4)
762
 
                        test = Replace(test, "./", "")
763
 
                        ' check to make sure we've matched a valid source file
764
 
                        if f.FileExists(Replace(filename, "Makefile.in", test & ".cc ")) then
765
 
                                cmd = CPP & CPPFLAGS & " /DTEST_ROUTINE=" & test & " /DTEST_NAME=\""" & test & "\"" -o " & test & ".exe "
766
 
                                cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", test & ".cc ")
767
 
                                if test <> "range" then ' the range test provides its own main and conflicts with the suplementary source files
768
 
                                        cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "cxxtest.cc ")
769
 
                                        cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "initialized1.cc ")
770
 
                                        cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "messages.cc ")
771
 
                                        cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "stack.cc ")
772
 
                                        cmd = cmd & "/Tp" & Replace(filename, "Makefile.in", "signal.cc ")
773
 
                                end if
774
 
                                cmd = cmd & cppmpichlib & " " & mpichlib
775
 
                                cEcho cmd
776
 
                                if f.FileExists(test & ".exe") then
777
 
                                        f.DeleteFile(test & ".exe")
778
 
                                end if
779
 
                                result = RunCommand(cmd)
780
 
                                cEcho result
781
 
                                buildout.WriteLine(cmd)
782
 
                                buildout.Write(result)
783
 
                                if test = "range" then
784
 
                                        testlistout.WriteLine(test & " 8")
785
 
                                else
786
 
                                        if test <> "initialized1" then ' initialized1 is an invalid test so skip it
787
 
                                                testlistout.WriteLine(test & " 4")
788
 
                                        end if
789
 
                                end if
790
 
                        end if
791
 
                end if
792
 
        wend
793
 
        fin.Close()
794
 
        buildout.Close()
795
 
        testlistout.Close()
796
 
End Function
797
 
 
798
 
Function BuildINTELTest(testdir, np, buildout, testlistout)
799
 
        bCTest = false
800
 
        bFortranTest = false
801
 
        cmd = ""
802
 
        test = Mid(testdir, InStrRev(testdir, "\")+1)
803
 
        if f.FileExists(testdir & "\node.c") then
804
 
                bCTest = true
805
 
                cmd = CC & CFLAGS & " -o " & test & ".exe "
806
 
        end if
807
 
        if f.FileExists(testdir & "\node.f") then
808
 
                bFortranTest = true
809
 
                test = test & "f" ' add an f to the fortran tests to prevent name collisions with the c tests
810
 
                cmd = FC & " /nologo /fpp -o " & test & ".exe "
811
 
        end if
812
 
        if bCTest then
813
 
                cmd = cmd & "-I" & intel_rootdir & "\include "
814
 
                for each file in f.GetFolder(testdir).Files
815
 
                        if Instr(file.Name, ".c") > 0 then
816
 
                                cmd = cmd & testdir & "\" & file.Name & " "
817
 
                        end if
818
 
                next
819
 
                cmd = cmd & intel_rootdir & "\lib\libmpitest.c " & mpichlib
820
 
        end if
821
 
        if bFortranTest then
822
 
                cmd = cmd & "-I" & intel_rootdir & "\include "
823
 
                for each file in f.GetFolder(testdir).Files
824
 
                        if Instr(file.Name, ".f") > 0 or Instr(file.Name, ".F") > 0 then
825
 
                                cmd = cmd & testdir & "\" & file.Name & " "
826
 
                        end if
827
 
                next
828
 
                cmd = cmd & intel_rootdir & "\lib\libmpitestf.f " & fmpichlib '& " " & mpichlib
829
 
        end if
830
 
'       cEcho cmd
831
 
'       if f.FileExists("node.obj") then
832
 
'               f.DeleteFile("node.obj")
833
 
'       end if
834
 
        ' If you don't delete the old object file you can link previous code when a build fails
835
 
        buildout.WriteLine("del node.obj")
836
 
 
837
 
        do_command = false
838
 
        if bCTest then
839
 
                do_command = true
840
 
        end if
841
 
        if bFortranTest then
842
 
                ' If this is a fortran test, let the global variable determine whether we compile it or not.
843
 
                do_command = bFortran
844
 
        end if
845
 
        
846
 
        if do_command then
847
 
                ' redirect the output to a file to prevent output buffer deadlock
848
 
                cmd = cmd '& " > cmdout.txt"
849
 
                if f.FileExists(test & ".exe") then
850
 
                        f.DeleteFile(test & ".exe")
851
 
                end if
852
 
'               result = RunCommand(cmd)
853
 
'               if f.FileExists("cmdout.txt") then
854
 
'                       set outfile = f.OpenTextFile("cmdout.txt")
855
 
'                       if not outfile.AtEndOfStream then
856
 
'                               result = outfile.ReadAll()
857
 
'                       else
858
 
'                               result = ""
859
 
'                       end if
860
 
'                       outfile.Close()
861
 
'                       f.DeleteFile("cmdout.txt")
862
 
'               end if
863
 
        else
864
 
'               result = "skipping build"
865
 
                cmd = "REM skipping build"
866
 
        end if
867
 
 
868
 
'       cEcho result
869
 
        buildout.WriteLine(cmd)
870
 
'       buildout.Write(result)
871
 
        testlistout.WriteLine(test & " " & np)
872
 
End Function
873
 
 
874
 
Function BuildMPICHTestList(filename, srcdir, buildout)
875
 
        cEcho "building testlist: " & filename
876
 
        buildout.WriteLine("building testlist: " & filename)
877
 
        set fin = f.OpenTextFile(filename)
878
 
        while not fin.AtEndOfStream
879
 
                twostrings = split(Trim(fin.ReadLine()), " ", -1, 1)
880
 
                if not IsNull(twostrings) then
881
 
                        count = 0
882
 
                        for each s in twostrings
883
 
                                count = count + 1
884
 
                        next
885
 
                        if count > 1 then
886
 
                                test = twostrings(0)
887
 
                                basefilename = Replace(filename, "testlist", test)
888
 
                                bCTest = false
889
 
                                bFortranTest = false
890
 
                                bCppTest = false
891
 
                                cmd = ""
892
 
                                If f.FileExists(basefilename & ".c") Then
893
 
                                        bCTest = true
894
 
                                        cmd = CC & CFLAGS & " -o " & test & ".exe "
895
 
                                        cmd = cmd & "-I" & srcdir & "\include " & basefilename & ".c "
896
 
                                        cmd = cmd & srcdir & "\util\mtest.c " & mpichlib & " ws2_32.lib" ' the join test needs the socket library
897
 
                                ElseIf f.FileExists(basefilename & ".f") Then
898
 
                                        bFortranTest = true
899
 
                                        cmd = FC & " /nologo /fpp -o " & test & ".exe "
900
 
                                        cmd = cmd & "-I" & srcdir & "\include " & basefilename & ".f "
901
 
                                        cmd = cmd & srcdir & "\f77\util\mtestf.f " & fmpichlib '& " " & mpichlib
902
 
                                ElseIf f.FileExists(basefilename & ".cxx") Then
903
 
                                        bCppTest = true
904
 
                                        cmd = CPP & CPPFLAGS & " -o " & test & ".exe "
905
 
                                        cmd = cmd & "-I" & srcdir & "\include " & basefilename & ".cxx "
906
 
                                        cmd = cmd & srcdir & "\cxx\util\mtest.cxx " & cppmpichlib & " " & mpichlib
907
 
                                Else
908
 
                                        cmd = "no source file " & basefilename & ".c .f or .cxx"
909
 
                                End If
910
 
 
911
 
                                cEcho cmd
912
 
                                do_command = false
913
 
                                if bCTest then
914
 
                                        do_command = true
915
 
                                end if
916
 
                                if bFortranTest then
917
 
                                        ' If this is a fortran test, let the global variable determine whether we compile it or not.
918
 
                                        do_command = bFortran
919
 
                                end if
920
 
                                if bCppTest then
921
 
                                        do_command = true
922
 
                                end if
923
 
        
924
 
                                if do_command then
925
 
                                        ' redirect the output to a file to prevent output buffer deadlock
926
 
                                        cmd = cmd '& " > cmdout.txt"
927
 
                                        if f.FileExists(test & ".exe") then
928
 
                                                f.DeleteFile(test & ".exe")
929
 
                                        end if
930
 
'                                       result = RunCommand(cmd)
931
 
'                                       if f.FileExists("cmdout.txt") then
932
 
'                                               set outfile = f.OpenTextFile("cmdout.txt")
933
 
'                                               if not outfile.AtEndOfStream then
934
 
'                                                       result = outfile.ReadAll()
935
 
'                                               else
936
 
'                                                       result = ""
937
 
'                                               end if
938
 
'                                               outfile.Close()
939
 
'                                               f.DeleteFile("cmdout.txt")
940
 
'                                       end if
941
 
                                else
942
 
                                        cmd = "REM skipping build"
943
 
                                end if
944
 
 
945
 
'                               cEcho result
946
 
                                buildout.WriteLine(cmd)
947
 
'                               buildout.Write(result)
948
 
                        end if
949
 
                end if
950
 
        wend
951
 
End Function
952
 
 
953
 
Function ReplaceAts( str )
954
 
        Dim regEx, Match, Matches
955
 
        Set regEx = New RegExp
956
 
        regEx.Pattern = "@.*@"
957
 
        regEx.IgnoreCase = True
958
 
        regEx.Global = True
959
 
        Set Matches = regEx.Execute(str)
960
 
        For Each Match in Matches
961
 
                Select Case Match
962
 
                        Case "@F77_AINT@"
963
 
                                str = Replace(str, "@F77_AINT@", "INTEGER")
964
 
                        Case "@OPT_FCMDLINE@"
965
 
                                str = Replace(str, "@OPT_FCMDLINE@", "")
966
 
                        Case "@OPT_FREAL2@"
967
 
                                str = Replace(str, "@OPT_FREAL2@", "C ")
968
 
                        Case "@OPT_FREAL4@"
969
 
                                str = Replace(str, "@OPT_FREAL4@", "")
970
 
                        Case "@OPT_FREAL8@"
971
 
                                str = Replace(str, "@OPT_FREAL8@", "")
972
 
                        Case "@OPT_FDOUBLE_COMPLEX@"
973
 
                                str = Replace(str, "@OPT_FDOUBLE_COMPLEX@", "")
974
 
                        Case "@OPT_FINT1@"
975
 
                                str = Replace(str, "@OPT_FINT1@", "")
976
 
                        Case "@OPT_FINT2@"
977
 
                                str = Replace(str, "@OPT_FINT2@", "")
978
 
                        Case "@OPT_FINT4@"
979
 
                                str = Replace(str, "@OPT_FINT4@", "")
980
 
                End Select
981
 
        Next
982
 
        ReplaceAts = str
983
 
End Function
984
 
 
985
 
Function CountTests(outdir)
986
 
        Set fin = f.OpenTextFile(outdir & "testlist")
987
 
        num_tests = 0
988
 
        while not fin.AtEndOfStream
989
 
                line = fin.ReadLine()
990
 
                line = Trim(line)
991
 
                twostrings = split(line, " ", -1, 1)
992
 
                if not IsNull(twostrings) then
993
 
                        count = 0
994
 
                        for each s in twostrings
995
 
                                count = count + 1
996
 
                        next
997
 
                        if count = 2 then
998
 
                         if Left(twostrings(0), 1) <> "#" then
999
 
                          if Len(twostrings(1)) > 0 then
1000
 
                                num_tests = num_tests + 1
1001
 
                          end if
1002
 
                         end if
1003
 
                        end if
1004
 
                end if
1005
 
        wend
1006
 
        fin.Close()
1007
 
        CountTests = num_tests
1008
 
End Function
1009
 
 
1010
 
Function BuildMPICHTestSuite(srcdir, builddir)
1011
 
        mpich_outputdir = f.GetAbsolutePathName(builddir) & "\"
1012
 
        if Not f.FolderExists(builddir) then
1013
 
                f.CreateFolder(builddir)
1014
 
        end if
1015
 
 
1016
 
        set makefilein_files = CreateObject("Scripting.Dictionary")
1017
 
        set test_files = CreateObject("Scripting.Dictionary")
1018
 
        FindFiles makefilein_files, f.GetFolder(srcdir), "Makefile.in"
1019
 
        FindFiles test_files, f.GetFolder(srcdir), "runtests.in"
1020
 
 
1021
 
        ' move into the build directory
1022
 
        cEcho "changing into directory " & builddir
1023
 
        WshShell.CurrentDirectory = builddir
1024
 
 
1025
 
        set buildout = f.CreateTextFile("build.bat", True)
1026
 
        a = makefilein_files.Items
1027
 
        If makefilein_files.Count > 0 Then
1028
 
                For i = 0 to makefilein_files.Count - 1
1029
 
                        BuildMPICHMakefile a(i), buildout
1030
 
                Next
1031
 
        End If
1032
 
        buildout.Close()
1033
 
        RunCommand("build.bat 2>&1 | tee build.out")
1034
 
        ' for some reason the mpich test suite copies longuser.exe to use in then -np 4 case
1035
 
        ' rather than just making two entries in the runtests.in file
1036
 
        if f.FileExists(mpich_outputdir & "longuser.exe") then
1037
 
                f.CopyFile mpich_outputdir & "longuser.exe", mpich_outputdir & "longuser1.exe"
1038
 
        end if
1039
 
 
1040
 
        set testlistout = f.CreateTextFile("testlist", True)
1041
 
        a = test_files.Items
1042
 
        if test_files.Count > 0 Then
1043
 
                for i = 0 to test_files.Count - 1
1044
 
                        BuildMPICHTestList a(i), testlistout
1045
 
                next
1046
 
        end if
1047
 
        testlistout.Close()
1048
 
 
1049
 
        ' move back to the root directory
1050
 
        cEcho "changing into directory " & rootdir
1051
 
        WshShell.CurrentDirectory = rootdir
1052
 
End Function
1053
 
 
1054
 
Function RunMPICHTestSuite(outdir)
1055
 
        cEcho "changing into directory " & outdir
1056
 
        WshShell.CurrentDirectory = outdir
1057
 
        cur_test = 1
1058
 
        num_tests = CountTests(outdir)
1059
 
        set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
1060
 
        set fout = f.CreateTextFile(outdir & "summary.xml")
1061
 
        Set fin = f.OpenTextFile(outdir & "testlist")
1062
 
        if not f.FileExists("er.xsl") then
1063
 
                set erfile = f.CreateTextFile(outdir & "er.xsl")
1064
 
                erfile.Write(erfilecontents)
1065
 
                erfile.Close()
1066
 
        end if
1067
 
        fout.WriteLine("<?xml version='1.0' ?>")
1068
 
        fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1069
 
        fout.WriteLine("<MPITESTRESULTS>")
1070
 
        fout.WriteLine("<DATE>" & Date)
1071
 
        fout.WriteLine("</DATE>")
1072
 
        fout.WriteLine("<MPISOURCE></MPISOURCE>")
1073
 
        while not fin.AtEndOfStream
1074
 
                line = fin.ReadLine()
1075
 
                line = Trim(line)
1076
 
                twostrings = split(line, " ", -1, 1)
1077
 
                if not IsNull(twostrings) then
1078
 
                        count = 0
1079
 
                        for each s in twostrings
1080
 
                                count = count + 1
1081
 
                        next
1082
 
                        if count = 2 then
1083
 
                         if Left(twostrings(0), 1) <> "#" then
1084
 
                          if Len(twostrings(1)) > 0 then
1085
 
                                exe = outdir & twostrings(0) & ".exe"
1086
 
                                cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1087
 
                                cEcho "test " & cur_test & " of " & num_tests
1088
 
                                cur_test = cur_test + 1
1089
 
                                cEcho cmd
1090
 
                                fout.WriteLine("<MPITEST>")
1091
 
                                fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1092
 
                                if f.FileExists(exe) then
1093
 
                                    fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1094
 
                                    if bCommandsOnly then
1095
 
                                        result = "not executing test"
1096
 
                                        if WshShell.CurrentDirectory <> last_commands_dir then
1097
 
                                                        commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1098
 
                                                end if
1099
 
                                                last_commands_dir = WshShell.CurrentDirectory
1100
 
                                        commands_file.WriteLine(cmd & " 2>&1")
1101
 
                                    else
1102
 
                                            result = RunCommand(cmd)
1103
 
                                        end if
1104
 
                                else
1105
 
                                        result = "no executable, test skipped"
1106
 
                                        num_skipped = num_skipped + 1
1107
 
                                end if
1108
 
                                cEcho result
1109
 
                                if (Instr(result, " No Errors") or Instr(result, "No errors")) And len(result) < 14 Then
1110
 
                                        fout.WriteLine("<STATUS>pass</STATUS>")
1111
 
                                        num_passed = num_passed + 1
1112
 
                                else
1113
 
                                        std = ""
1114
 
                                        altstd = ""
1115
 
                                        fstd = ""
1116
 
                                        stdfilename = outdir & twostrings(0) & ".std"
1117
 
                                        if f.FileExists(stdfilename) then
1118
 
                                                set stdfile = f.OpenTextFile(stdfilename, 1, false)
1119
 
                                                ' std contains the file minus the first and last lines
1120
 
                                                ' altstd contains the entire file
1121
 
                                                ' fstd contains the same as std with one space added to the beginning of each line
1122
 
                                                std = stdfile.ReadLine()
1123
 
                                                altstd = std & vbCrLf
1124
 
                                                std = stdfile.ReadLine() & vbCrLf
1125
 
                                                altstd = altstd & std
1126
 
                                                fstd = " " & std
1127
 
                                                while not stdfile.AtEndOfStream
1128
 
                                                        line = stdfile.ReadLine()
1129
 
                                                        if not stdfile.AtEndOfStream then
1130
 
                                                                std = std & line & vbCrLf
1131
 
                                                                altstd = altstd & line & vbCrLf
1132
 
                                                                fstd = fstd & " " & line & vbCrLf
1133
 
                                                        else
1134
 
                                                                altstd = altstd & line & vbCrLf
1135
 
                                                        end if
1136
 
                                                wend
1137
 
                                                stdfile.Close()
1138
 
                                        end if
1139
 
                                        if (std <> "") and (result = std or result = altstd or result = fstd) then
1140
 
                                                fout.WriteLine("<STATUS>pass</STATUS>")
1141
 
                                                num_passed = num_passed + 1
1142
 
                                        else
1143
 
                                                if std <> "" then
1144
 
                                                        cEcho "************* std ***************"
1145
 
                                                        cEcho std
1146
 
                                                        cEcho "************* != ****************"
1147
 
                                                        cEcho result
1148
 
                                                        cEcho "*********************************"
1149
 
                                                end if
1150
 
                                                fout.WriteLine("<STATUS>fail</STATUS>")
1151
 
                                                fout.WriteLine("<TESTDIFF>")
1152
 
                                                cmd = Replace(cmd, "&", "&amp;")
1153
 
                                                cmd = Replace(cmd, "<", "&lt;")
1154
 
                                                cmd = Replace(cmd, ">", "&gt;")
1155
 
                                                fout.WriteLine(cmd)
1156
 
                                                if std <> "" then
1157
 
                                                        fout.WriteLine("************* std ***************")
1158
 
                                                        std = Replace(std, "&", "&amp;")
1159
 
                                                        std = Replace(std, "<", "&lt;")
1160
 
                                                        std = Replace(std, ">", "&gt;")
1161
 
                                                        fout.WriteLine(std)
1162
 
                                                        fout.WriteLine("************* != ****************")
1163
 
                                                end if
1164
 
                                                result = Replace( result, "&", "&amp;" )
1165
 
                                                result = Replace( result, "<", "&lt;" )
1166
 
                                                result = Replace( result, ">", "&gt;" )
1167
 
                                                fout.WriteLine(result)
1168
 
                                                if std <> "" then
1169
 
                                                        fout.WriteLine("*********************************")
1170
 
                                                end if
1171
 
                                                fout.WriteLine("</TESTDIFF>")
1172
 
                                                if f.FileExists(exe) then
1173
 
                                                        num_failed = num_failed + 1
1174
 
                                                end if
1175
 
                                        end if
1176
 
                                end if
1177
 
                                fout.WriteLine("</MPITEST>")
1178
 
                          end if
1179
 
                         end if
1180
 
                        end if
1181
 
                end if
1182
 
        wend
1183
 
        fin.Close()
1184
 
        fout.WriteLine("</MPITESTRESULTS>")
1185
 
        fout.Close()
1186
 
        fcmds.Close()
1187
 
        ' move back to the root directory
1188
 
        cEcho "changing into directory " & rootdir
1189
 
        WshShell.CurrentDirectory = rootdir
1190
 
End Function
1191
 
 
1192
 
Function RunMPICHTestSuiteBatch(outdir)
1193
 
        cEcho "changing into directory " & outdir
1194
 
        WshShell.CurrentDirectory = outdir
1195
 
        cur_test = 1
1196
 
        num_tests = CountTests(outdir)
1197
 
 
1198
 
        if not bSummarize then
1199
 
                ' first pass generates the batch file
1200
 
                set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
1201
 
                Set fin = f.OpenTextFile(outdir & "testlist")
1202
 
                while not fin.AtEndOfStream
1203
 
                        line = fin.ReadLine()
1204
 
                        line = Trim(line)
1205
 
                        twostrings = split(line, " ", -1, 1)
1206
 
                        if not IsNull(twostrings) then
1207
 
                                count = 0
1208
 
                                for each s in twostrings
1209
 
                                        count = count + 1
1210
 
                                next
1211
 
                                if count = 2 then
1212
 
                                 if Left(twostrings(0), 1) <> "#" then
1213
 
                                  if Len(twostrings(1)) > 0 then
1214
 
                                        exe = outdir & twostrings(0) & ".exe"
1215
 
                                        cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1216
 
                                        fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
1217
 
                                        cur_test = cur_test + 1
1218
 
                                        if f.FileExists(exe) then
1219
 
                                            fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1220
 
                                        else
1221
 
                                                fcmds.WriteLine("REM no executable, test skipped")
1222
 
                                        end if
1223
 
                                  end if
1224
 
                                 end if
1225
 
                                end if
1226
 
                        end if
1227
 
                wend
1228
 
                fin.Close()
1229
 
                fcmds.Close()
1230
 
 
1231
 
                ' run the tests
1232
 
                if Not bCommandsOnly then
1233
 
                        if not bBatchFilesOnly Then
1234
 
                                RunEchoCommand(outdir & "mpich_cmds.bat")
1235
 
                        end if
1236
 
                end if
1237
 
        end if
1238
 
 
1239
 
        if not bBatchFilesOnly then
1240
 
                ' second pass parses the output
1241
 
                set fout = f.CreateTextFile(outdir & "summary.xml")
1242
 
                if not f.FileExists("er.xsl") then
1243
 
                        set erfile = f.CreateTextFile(outdir & "er.xsl")
1244
 
                        erfile.Write(erfilecontents)
1245
 
                        erfile.Close()
1246
 
                end if
1247
 
                fout.WriteLine("<?xml version='1.0' ?>")
1248
 
                fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1249
 
                fout.WriteLine("<MPITESTRESULTS>")
1250
 
                fout.WriteLine("<DATE>" & Date)
1251
 
                fout.WriteLine("</DATE>")
1252
 
                fout.WriteLine("<MPISOURCE></MPISOURCE>")
1253
 
                Set fin = f.OpenTextFile(outdir & "testlist")
1254
 
                while not fin.AtEndOfStream
1255
 
                        line = fin.ReadLine()
1256
 
                        line = Trim(line)
1257
 
                        twostrings = split(line, " ", -1, 1)
1258
 
                        if not IsNull(twostrings) then
1259
 
                                count = 0
1260
 
                                for each s in twostrings
1261
 
                                        count = count + 1
1262
 
                                next
1263
 
                                if count = 2 then
1264
 
                                 if Left(twostrings(0), 1) <> "#" then
1265
 
                                  if Len(twostrings(1)) > 0 then
1266
 
                                        exe = outdir & twostrings(0) & ".exe"
1267
 
                                        cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1268
 
                                        fout.WriteLine("<MPITEST>")
1269
 
                                        fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1270
 
                                        if f.FileExists(exe) then
1271
 
                                            if bCommandsOnly then
1272
 
                                                result = "not executing test"
1273
 
                                                if WshShell.CurrentDirectory <> last_commands_dir then
1274
 
                                                                commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1275
 
                                                        end if
1276
 
                                                        last_commands_dir = WshShell.CurrentDirectory
1277
 
                                                commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1278
 
                                            else
1279
 
                                                        if f.FileExists(twostrings(0) & "." & twostrings(1) & ".output") then
1280
 
                                                                Set foutput = f.OpenTextFile(twostrings(0) & "." & twostrings(1) & ".output")
1281
 
                                                                if not foutput.AtEndOfStream then
1282
 
                                                                        result = foutput.ReadAll()
1283
 
                                                                else
1284
 
                                                                        result = ""
1285
 
                                                                end if
1286
 
                                                                foutput.Close()
1287
 
                                                        else
1288
 
                                                                result = ""
1289
 
                                                        end if
1290
 
                                                end if
1291
 
                                        else
1292
 
                                                result = "no executable, test skipped"
1293
 
                                                num_skipped = num_skipped + 1
1294
 
                                        end if
1295
 
                                        if (Instr(result, " No Errors") or Instr(result, "No errors")) And len(result) < 14 Then
1296
 
                                                fout.WriteLine("<STATUS>pass</STATUS>")
1297
 
                                                num_passed = num_passed + 1
1298
 
                                        else
1299
 
                                                std = ""
1300
 
                                                altstd = ""
1301
 
                                                fstd = ""
1302
 
                                                stdfilename = outdir & twostrings(0) & ".std"
1303
 
                                                if f.FileExists(stdfilename) then
1304
 
                                                        set stdfile = f.OpenTextFile(stdfilename, 1, false)
1305
 
                                                        ' std contains the file minus the first and last lines
1306
 
                                                        ' altstd contains the entire file
1307
 
                                                        ' fstd contains the same as std with one space added to the beginning of each line
1308
 
                                                        std = stdfile.ReadLine()
1309
 
                                                        altstd = std & vbCrLf
1310
 
                                                        std = stdfile.ReadLine() & vbCrLf
1311
 
                                                        altstd = altstd & std
1312
 
                                                        fstd = " " & std
1313
 
                                                        while not stdfile.AtEndOfStream
1314
 
                                                                line = stdfile.ReadLine()
1315
 
                                                                if not stdfile.AtEndOfStream then
1316
 
                                                                        std = std & line & vbCrLf
1317
 
                                                                        altstd = altstd & line & vbCrLf
1318
 
                                                                        fstd = fstd & " " & line & vbCrLf
1319
 
                                                                else
1320
 
                                                                        altstd = altstd & line & vbCrLf
1321
 
                                                                end if
1322
 
                                                        wend
1323
 
                                                        stdfile.Close()
1324
 
                                                end if
1325
 
                                                if (std <> "") and (result = std or result = altstd or result = fstd) then
1326
 
                                                        fout.WriteLine("<STATUS>pass</STATUS>")
1327
 
                                                        num_passed = num_passed + 1
1328
 
                                                else
1329
 
                                                        if std <> "" then
1330
 
                                                                cEcho "************* std ***************"
1331
 
                                                                cEcho std
1332
 
                                                                cEcho "************* != ****************"
1333
 
                                                                cEcho result
1334
 
                                                                cEcho "*********************************"
1335
 
                                                        end if
1336
 
                                                        fout.WriteLine("<STATUS>fail</STATUS>")
1337
 
                                                        fout.WriteLine("<TESTDIFF>")
1338
 
                                                        cmd = Replace(cmd, "&", "&amp;")
1339
 
                                                        cmd = Replace(cmd, "<", "&lt;")
1340
 
                                                        cmd = Replace(cmd, ">", "&gt;")
1341
 
                                                        fout.WriteLine(cmd)
1342
 
                                                        if std <> "" then
1343
 
                                                                fout.WriteLine("************* std ***************")
1344
 
                                                                std = Replace(std, "&", "&amp;")
1345
 
                                                                std = Replace(std, "<", "&lt;")
1346
 
                                                                std = Replace(std, ">", "&gt;")
1347
 
                                                                fout.WriteLine(std)
1348
 
                                                                fout.WriteLine("************* != ****************")
1349
 
                                                        end if
1350
 
                                                        result = Replace( result, "&", "&amp;" )
1351
 
                                                        result = Replace( result, "<", "&lt;" )
1352
 
                                                        result = Replace( result, ">", "&gt;" )
1353
 
                                                        fout.WriteLine(result)
1354
 
                                                        if std <> "" then
1355
 
                                                                fout.WriteLine("*********************************")
1356
 
                                                        end if
1357
 
                                                        fout.WriteLine("</TESTDIFF>")
1358
 
                                                        if f.FileExists(exe) then
1359
 
                                                                num_failed = num_failed + 1
1360
 
                                                        end if
1361
 
                                                end if
1362
 
                                        end if
1363
 
                                        fout.WriteLine("</MPITEST>")
1364
 
                                  end if
1365
 
                                 end if
1366
 
                                end if
1367
 
                        end if
1368
 
                wend
1369
 
                fin.Close()
1370
 
                fout.WriteLine("</MPITESTRESULTS>")
1371
 
                fout.Close()
1372
 
        end if
1373
 
 
1374
 
        ' move back to the root directory
1375
 
        cEcho "changing into directory " & rootdir
1376
 
        WshShell.CurrentDirectory = rootdir
1377
 
End Function
1378
 
 
1379
 
Function BuildCPPTestSuite(srcdir, builddir)
1380
 
        if not f.FileExists(srcdir & "\cxxtestconf.h") then
1381
 
                set fout = f.CreateTextFile(srcdir & "\cxxtestconf.h")
1382
 
                fout.WriteLine("#ifndef CXXTESTCONF_H")
1383
 
                fout.WriteLine("#define CXXTESTCONF_H")
1384
 
                fout.WriteLine("#define HAVE_EXCEPTIONS")
1385
 
                fout.WriteLine("#define HAVE_IOSTREAM")
1386
 
                fout.WriteLine("#define USE_XMLOUT")
1387
 
                fout.WriteLine("#endif")
1388
 
                fout.Close()
1389
 
        end if
1390
 
        if f.FileExists(srcdir & "\Makefile.in") then
1391
 
                filename = f.GetAbsolutePathName(srcdir & "\Makefile.in")
1392
 
                if Not f.FolderExists(builddir) then
1393
 
                        f.CreateFolder(builddir)
1394
 
                end if
1395
 
                cEcho "changing into directory " & builddir
1396
 
                WshShell.CurrentDirectory = builddir
1397
 
                BuildCPPMakefile filename
1398
 
                ' move back to the root directory
1399
 
                cEcho "changing into directory " & rootdir
1400
 
                WshShell.CurrentDirectory = rootdir
1401
 
        end if
1402
 
End Function
1403
 
 
1404
 
Function RunCPPTestSuite(outdir)
1405
 
        cEcho "changing into directory " & outdir
1406
 
        WshShell.CurrentDirectory = outdir ' the c++ suite must be run from the output directory because the tests assume summary.xml is in the current directory
1407
 
        cur_test = 1
1408
 
        num_tests = CountTests(outdir)
1409
 
        set fcmds = f.CreateTextFile(outdir & "cpp_cmds.bat")
1410
 
        set fout = f.CreateTextFile(outdir & "summary.xml")
1411
 
        Set fin = f.OpenTextFile(outdir & "testlist")
1412
 
        if not f.FileExists("er.xsl") then
1413
 
                set erfile = f.CreateTextFile(outdir & "er.xsl")
1414
 
                erfile.Write(erfilecontents)
1415
 
                erfile.Close()
1416
 
        end if
1417
 
        fout.WriteLine("<?xml version='1.0' ?>")
1418
 
        fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1419
 
        fout.WriteLine("<MPITESTRESULTS>")
1420
 
        fout.WriteLine("<DATE>" & Date)
1421
 
        fout.WriteLine("</DATE>")
1422
 
        fout.WriteLine("<MPISOURCE></MPISOURCE>")
1423
 
        fout.Close()
1424
 
        while not fin.AtEndOfStream
1425
 
                line = fin.ReadLine()
1426
 
                line = Trim(line)
1427
 
                twostrings = split(line, " ", -1, 1)
1428
 
                if not IsNull(twostrings) then
1429
 
                        count = 0
1430
 
                        for each s in twostrings
1431
 
                                count = count + 1
1432
 
                        next
1433
 
                        if count = 2 then
1434
 
                         if Left(twostrings(0), 1) <> "#" then
1435
 
                          if Len(twostrings(1)) > 0 then
1436
 
                                exe = outdir & twostrings(0) & ".exe"
1437
 
                                cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1438
 
                                cEcho "test " & cur_test & " of " & num_tests
1439
 
                                cur_test = cur_test + 1
1440
 
                                cEcho cmd
1441
 
                                if f.FileExists(exe) then
1442
 
                                    fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1443
 
                                    if bCommandsOnly then
1444
 
                                        result = "not executing test"
1445
 
                                        if WshShell.CurrentDirectory <> last_commands_dir then
1446
 
                                                        commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1447
 
                                                end if
1448
 
                                                last_commands_dir = WshShell.CurrentDirectory
1449
 
                                        commands_file.WriteLine(cmd & " 2>&1")
1450
 
                                    else
1451
 
                                            result = RunCommand(cmd)
1452
 
                                        end if
1453
 
                                else
1454
 
                                        result = "no executable, test skipped"
1455
 
                                        num_skipped = num_skipped + 1
1456
 
                                end if
1457
 
                                cEcho result
1458
 
                          end if
1459
 
                         end if
1460
 
                        end if
1461
 
                end if
1462
 
        wend
1463
 
        fin.Close()
1464
 
        set fout = f.OpenTextFile(outdir & "summary.xml", 8, True)
1465
 
        fout.WriteLine("</MPITESTRESULTS>")
1466
 
        fout.Close()
1467
 
        fcmds.Close()
1468
 
        ' move back to the root directory
1469
 
        cEcho "changing into directory " & rootdir
1470
 
        WshShell.CurrentDirectory = rootdir
1471
 
End Function
1472
 
 
1473
 
Function RunCPPTestSuiteBatch(outdir)
1474
 
        cEcho "changing into directory " & outdir
1475
 
        WshShell.CurrentDirectory = outdir ' the c++ suite must be run from the output directory because the tests assume summary.xml is in the current directory
1476
 
        cur_test = 1
1477
 
        num_tests = CountTests(outdir)
1478
 
 
1479
 
        if not bSummarize then
1480
 
                ' first pass creates the batch file
1481
 
                set fcmds = f.CreateTextFile(outdir & "cpp_cmds.bat")
1482
 
                Set fin = f.OpenTextFile(outdir & "testlist")
1483
 
                while not fin.AtEndOfStream
1484
 
                        line = fin.ReadLine()
1485
 
                        line = Trim(line)
1486
 
                        twostrings = split(line, " ", -1, 1)
1487
 
                        if not IsNull(twostrings) then
1488
 
                                count = 0
1489
 
                                for each s in twostrings
1490
 
                                        count = count + 1
1491
 
                                next
1492
 
                                if count = 2 then
1493
 
                                 if Left(twostrings(0), 1) <> "#" then
1494
 
                                  if Len(twostrings(1)) > 0 then
1495
 
                                        exe = outdir & twostrings(0) & ".exe"
1496
 
                                        cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1497
 
                                        fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
1498
 
                                        cur_test = cur_test + 1
1499
 
                                        'cEcho cmd
1500
 
                                        if f.FileExists(exe) then
1501
 
                                            fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1502
 
                                            if bCommandsOnly then
1503
 
                                                if WshShell.CurrentDirectory <> last_commands_dir then
1504
 
                                                                commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1505
 
                                                        end if
1506
 
                                                        last_commands_dir = WshShell.CurrentDirectory
1507
 
                                                commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1508
 
                                                end if
1509
 
                                        else
1510
 
                                                fcmds.WriteLine("REM no executable, test skipped")
1511
 
                                                num_skipped = num_skipped + 1
1512
 
                                        end if
1513
 
                                  end if
1514
 
                                 end if
1515
 
                                end if
1516
 
                        end if
1517
 
                wend
1518
 
                fin.Close()
1519
 
                fcmds.Close()
1520
 
 
1521
 
                ' run the tests
1522
 
                if not bCommandsOnly then
1523
 
                        if not bBatchFilesOnly then
1524
 
                                if f.FileExists(outdir & "summary.xml") then
1525
 
                                        f.DeleteFile(outdir & "summary.xml")
1526
 
                                end if
1527
 
                                RunEchoCommand(outdir & "cpp_cmds.bat")
1528
 
                        end if
1529
 
                end if
1530
 
        end if
1531
 
 
1532
 
        if not bBatchFilesOnly then
1533
 
                ' create summary2.xml from summary.xml with the correct header and footer
1534
 
                set fout = f.CreateTextFile(outdir & "summary2.xml")
1535
 
                if not f.FileExists("er.xsl") then
1536
 
                        set erfile = f.CreateTextFile(outdir & "er.xsl")
1537
 
                        erfile.Write(erfilecontents)
1538
 
                        erfile.Close()
1539
 
                end if
1540
 
                fout.WriteLine("<?xml version='1.0' ?>")
1541
 
                fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1542
 
                fout.WriteLine("<MPITESTRESULTS>")
1543
 
                fout.WriteLine("<DATE>" & Date)
1544
 
                fout.WriteLine("</DATE>")
1545
 
                fout.WriteLine("<MPISOURCE></MPISOURCE>")
1546
 
                If f.FileExists(outdir & "summary.xml") Then
1547
 
                        set fin = f.OpenTextFile(outdir & "summary.xml") ' summary.xml is created by the tests themselves
1548
 
                        if not fin.AtEndOfStream then
1549
 
                                fout.Write(fin.ReadAll())
1550
 
                        end if
1551
 
                End If
1552
 
                fout.WriteLine("</MPITESTRESULTS>")
1553
 
                fout.Close()
1554
 
        end if
1555
 
 
1556
 
        ' move back to the root directory
1557
 
        cEcho "changing into directory " & rootdir
1558
 
        WshShell.CurrentDirectory = rootdir
1559
 
End Function
1560
 
 
1561
 
Function BuildINTELTestSuite(srcdir, builddir)
1562
 
        intel_rootdir = f.GetAbsolutePathName(srcdir)
1563
 
        if Not f.FolderExists(builddir) then
1564
 
                f.CreateFolder(builddir)
1565
 
        end if
1566
 
        cEcho "changing into directory " & builddir
1567
 
        WshShell.CurrentDirectory = builddir
1568
 
        set buildout = f.CreateTextFile("build.bat", True)
1569
 
        set testlistout = f.CreateTextFile("testlist", True)
1570
 
        ' create foptions.h
1571
 
        if (not f.FileExists(intel_rootdir & "\include\foptions.h")) and f.FileExists(intel_rootdir & "\include\foptions.h.in") then
1572
 
                set fin = f.OpenTextFile(intel_rootdir & "\include\foptions.h.in")
1573
 
                set fout = f.CreateTextFile(intel_rootdir & "\include\foptions.h")
1574
 
                contents = fin.ReadAll()
1575
 
                contents = ReplaceAts(contents)
1576
 
                fout.Write(contents)
1577
 
                fin.Close()
1578
 
                fout.Close()
1579
 
        end if
1580
 
 
1581
 
        ' build the tests in each of the various testlists
1582
 
        if f.FileExists(intel_rootdir & "\Test\testlist2l") then
1583
 
                set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist2l")
1584
 
                while not fin.AtEndOfStream
1585
 
                        line = fin.ReadLine()
1586
 
                        line = Replace(line, "/", "\")', 1, -1, 1)
1587
 
                        BuildINTELTest intel_rootdir & "\Test\" & line, "2", buildout, testlistout
1588
 
                wend
1589
 
                fin.Close()
1590
 
        end if
1591
 
        if f.FileExists(intel_rootdir & "\Test\testlist2-2l") then
1592
 
                set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist2-2l")
1593
 
                while not fin.AtEndOfStream
1594
 
                        line = fin.ReadLine()
1595
 
                        line = Replace(line, "/", "\")', 1, -1, 1)
1596
 
                        BuildINTELTest intel_rootdir & "\Test\" & line, "2", buildout, testlistout
1597
 
                wend
1598
 
                fin.Close()
1599
 
        end if
1600
 
        if f.FileExists(intel_rootdir & "\Test\testlist4") then
1601
 
                set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist4")
1602
 
                while not fin.AtEndOfStream
1603
 
                        line = fin.ReadLine()
1604
 
                        line = Replace(line, "/", "\")', 1, -1, 1)
1605
 
                        BuildINTELTest intel_rootdir & "\Test\" & line, "4", buildout, testlistout
1606
 
                wend
1607
 
                fin.Close()
1608
 
        end if
1609
 
        if f.FileExists(intel_rootdir & "\Test\testlist4lg") then
1610
 
                set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist4lg")
1611
 
                while not fin.AtEndOfStream
1612
 
                        line = fin.ReadLine()
1613
 
                        line = Replace(line, "/", "\")', 1, -1, 1)
1614
 
                        BuildINTELTest intel_rootdir & "\Test\" & line, "4", buildout, testlistout
1615
 
                wend
1616
 
                fin.Close()
1617
 
        end if
1618
 
        if f.FileExists(intel_rootdir & "\Test\testlist6") then
1619
 
                set fin = f.OpenTextFile(intel_rootdir & "\Test\testlist6")
1620
 
                while not fin.AtEndOfStream
1621
 
                        line = fin.ReadLine()
1622
 
                        line = Replace(line, "/", "\")', 1, -1, 1)
1623
 
                        BuildINTELTest intel_rootdir & "\Test\" & line, "6", buildout, testlistout
1624
 
                wend
1625
 
                fin.Close()
1626
 
        end if
1627
 
        buildout.Close()
1628
 
        testlistout.Close()
1629
 
        RunEchoCommand("build.bat 2>&1 | tee build.out")
1630
 
        ' move back to the root directory
1631
 
        cEcho "changing into directory " & rootdir
1632
 
        WshShell.CurrentDirectory = rootdir
1633
 
End Function
1634
 
 
1635
 
Function RunINTELTestSuite(outdir)
1636
 
        cEcho "changing into directory " & outdir
1637
 
        WshShell.CurrentDirectory = outdir
1638
 
        cur_test = 1
1639
 
        num_tests = CountTests(outdir)
1640
 
        set fcmds = f.CreateTextFile(outdir & "intel_cmds.bat")
1641
 
        set fout = f.CreateTextFile(outdir & "summary.xml")
1642
 
        Set fin = f.OpenTextFile(outdir & "testlist")
1643
 
        if not f.FileExists("er.xsl") then
1644
 
                set erfile = f.CreateTextFile(outdir & "er.xsl")
1645
 
                erfile.Write(erfilecontents)
1646
 
                erfile.Close()
1647
 
        end if
1648
 
        fout.WriteLine("<?xml version='1.0' ?>")
1649
 
        fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1650
 
        fout.WriteLine("<MPITESTRESULTS>")
1651
 
        fout.WriteLine("<DATE>" & Date)
1652
 
        fout.WriteLine("</DATE>")
1653
 
        fout.WriteLine("<MPISOURCE></MPISOURCE>")
1654
 
        while not fin.AtEndOfStream
1655
 
                line = fin.ReadLine()
1656
 
                line = Trim(line)
1657
 
                twostrings = split(line, " ", -1, 1)
1658
 
                if not IsNull(twostrings) then
1659
 
                        count = 0
1660
 
                        for each s in twostrings
1661
 
                                count = count + 1
1662
 
                        next
1663
 
                        if count = 2 then
1664
 
                         if Left(twostrings(0), 1) <> "#" then
1665
 
                          if Len(twostrings(1)) > 0 then
1666
 
                                exe = outdir & twostrings(0) & ".exe"
1667
 
                                cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1668
 
                                cEcho "test " & cur_test & " of " & num_tests
1669
 
                                cur_test = cur_test + 1
1670
 
                                cEcho cmd
1671
 
                                fout.WriteLine("<MPITEST>")
1672
 
                                fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1673
 
                                if f.FileExists(exe) then
1674
 
                                    fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1675
 
                                    if bCommandsOnly then
1676
 
                                        result = "not executing test"
1677
 
                                        if WshShell.CurrentDirectory <> last_commands_dir then
1678
 
                                                        commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1679
 
                                                end if
1680
 
                                                last_commands_dir = WshShell.CurrentDirectory
1681
 
                                        commands_file.WriteLine(cmd & " 2>&1")
1682
 
                                    else
1683
 
                                            result = RunCommand(cmd)
1684
 
                                        end if
1685
 
                                else
1686
 
                                        result = "no executable, test skipped"
1687
 
                                        num_skipped = num_skipped + 1
1688
 
                                end if
1689
 
                                cEcho result
1690
 
                                if (Instr(result, "No errors") And len(result) < 14) or (Instr(result, "PASSED") > 0) Then
1691
 
                                        fout.WriteLine("<STATUS>pass</STATUS>")
1692
 
                                        num_passed = num_passed + 1
1693
 
                                else
1694
 
                                        fout.WriteLine("<STATUS>fail</STATUS>")
1695
 
                                        fout.WriteLine("<TESTDIFF>")
1696
 
                                        result = cmd & vbCrLf & result
1697
 
                                        result = Replace( result, "&", "&amp;" )
1698
 
                                        result = Replace( result, "<", "&lt;" )
1699
 
                                        result = Replace( result, ">", "&gt;" )
1700
 
                                        fout.WriteLine(result)
1701
 
                                        fout.WriteLine("</TESTDIFF>")
1702
 
                                        if f.FileExists(exe) then
1703
 
                                                num_failed = num_failed + 1
1704
 
                                        end if
1705
 
                                end if
1706
 
                                fout.WriteLine("</MPITEST>")
1707
 
                          end if
1708
 
                         end if
1709
 
                        end if
1710
 
                end if
1711
 
        wend
1712
 
        fin.Close()
1713
 
        fout.WriteLine("</MPITESTRESULTS>")
1714
 
        fout.Close()
1715
 
        fcmds.Close()
1716
 
        ' move back to the root directory
1717
 
        cEcho "changing into directory " & rootdir
1718
 
        WshShell.CurrentDirectory = rootdir
1719
 
End Function
1720
 
 
1721
 
Function RunINTELTestSuiteBatch(outdir)
1722
 
        cEcho "changing into directory " & outdir
1723
 
        WshShell.CurrentDirectory = outdir
1724
 
        cur_test = 1
1725
 
        num_tests = CountTests(outdir)
1726
 
 
1727
 
        if not bSummarize then
1728
 
                ' first pass generates the commands
1729
 
                set fcmds = f.CreateTextFile(outdir & "intel_cmds.bat")
1730
 
                Set fin = f.OpenTextFile(outdir & "testlist")
1731
 
                while not fin.AtEndOfStream
1732
 
                        line = fin.ReadLine()
1733
 
                        line = Trim(line)
1734
 
                        twostrings = split(line, " ", -1, 1)
1735
 
                        if not IsNull(twostrings) then
1736
 
                                count = 0
1737
 
                                for each s in twostrings
1738
 
                                        count = count + 1
1739
 
                                next
1740
 
                                if count = 2 then
1741
 
                                 if Left(twostrings(0), 1) <> "#" then
1742
 
                                  if Len(twostrings(1)) > 0 then
1743
 
                                        exe = outdir & twostrings(0) & ".exe"
1744
 
                                        cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1745
 
                                        fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
1746
 
                                        cur_test = cur_test + 1
1747
 
                                        if f.FileExists(exe) then
1748
 
                                            fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1749
 
                                            if bCommandsOnly then
1750
 
                                                result = "not executing test"
1751
 
                                                if WshShell.CurrentDirectory <> last_commands_dir then
1752
 
                                                                commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1753
 
                                                        end if
1754
 
                                                        last_commands_dir = WshShell.CurrentDirectory
1755
 
                                                commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
1756
 
                                                end if
1757
 
                                        else
1758
 
                                                fcmds.WriteLine("REM no executable, test skipped")
1759
 
                                        end if
1760
 
                                  end if
1761
 
                                 end if
1762
 
                                end if
1763
 
                        end if
1764
 
                wend
1765
 
                fin.Close()
1766
 
                fcmds.Close()
1767
 
 
1768
 
                ' run the tests
1769
 
                if not bCommandsOnly then
1770
 
                        if not bBatchFilesOnly then
1771
 
                                RunEchoCommand(outdir & "intel_cmds.bat")
1772
 
                        end if
1773
 
                end if
1774
 
        end if
1775
 
 
1776
 
        if not bBatchFilesOnly then
1777
 
                ' second pass parses the output
1778
 
                set fout = f.CreateTextFile(outdir & "summary.xml")
1779
 
                if not f.FileExists("er.xsl") then
1780
 
                        set erfile = f.CreateTextFile(outdir & "er.xsl")
1781
 
                        erfile.Write(erfilecontents)
1782
 
                        erfile.Close()
1783
 
                end if
1784
 
                fout.WriteLine("<?xml version='1.0' ?>")
1785
 
                fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1786
 
                fout.WriteLine("<MPITESTRESULTS>")
1787
 
                fout.WriteLine("<DATE>" & Date)
1788
 
                fout.WriteLine("</DATE>")
1789
 
                fout.WriteLine("<MPISOURCE></MPISOURCE>")
1790
 
                Set fin = f.OpenTextFile(outdir & "testlist")
1791
 
                while not fin.AtEndOfStream
1792
 
                        line = fin.ReadLine()
1793
 
                        line = Trim(line)
1794
 
                        twostrings = split(line, " ", -1, 1)
1795
 
                        if not IsNull(twostrings) then
1796
 
                                count = 0
1797
 
                                for each s in twostrings
1798
 
                                        count = count + 1
1799
 
                                next
1800
 
                                if count = 2 then
1801
 
                                 if Left(twostrings(0), 1) <> "#" then
1802
 
                                  if Len(twostrings(1)) > 0 then
1803
 
                                        exe = outdir & twostrings(0) & ".exe"
1804
 
                                        cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1805
 
                                        fout.WriteLine("<MPITEST>")
1806
 
                                        fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1807
 
                                        if f.FileExists(exe) then
1808
 
                                            if bCommandsOnly then
1809
 
                                                result = "not executing test"
1810
 
                                            else
1811
 
                                                        if f.FileExists(twostrings(0) & "." & twostrings(1) & ".output") then
1812
 
                                                                Set foutput = f.OpenTextFile(twostrings(0) & "." & twostrings(1) & ".output")
1813
 
                                                                if not foutput.AtEndOfStream then
1814
 
                                                                        result = foutput.ReadAll()
1815
 
                                                                else
1816
 
                                                                        result = ""
1817
 
                                                                end if
1818
 
                                                                foutput.Close()
1819
 
                                                        else
1820
 
                                                                result = ""
1821
 
                                                        end if
1822
 
                                                end if
1823
 
                                        else
1824
 
                                                result = "no executable, test skipped"
1825
 
                                                num_skipped = num_skipped + 1
1826
 
                                        end if
1827
 
                                        if (Instr(result, "No errors") And len(result) < 14) or (Instr(result, "PASSED") > 0) Then
1828
 
                                                fout.WriteLine("<STATUS>pass</STATUS>")
1829
 
                                                num_passed = num_passed + 1
1830
 
                                        else
1831
 
                                                fout.WriteLine("<STATUS>fail</STATUS>")
1832
 
                                                fout.WriteLine("<TESTDIFF>")
1833
 
                                                result = cmd & vbCrLf & result
1834
 
                                                result = Replace( result, "&", "&amp;" )
1835
 
                                                result = Replace( result, "<", "&lt;" )
1836
 
                                                result = Replace( result, ">", "&gt;" )
1837
 
                                                fout.WriteLine(result)
1838
 
                                                fout.WriteLine("</TESTDIFF>")
1839
 
                                                if f.FileExists(exe) then
1840
 
                                                        num_failed = num_failed + 1
1841
 
                                                end if
1842
 
                                        end if
1843
 
                                        fout.WriteLine("</MPITEST>")
1844
 
                                  end if
1845
 
                                 end if
1846
 
                                end if
1847
 
                        end if
1848
 
                wend
1849
 
                fin.Close()
1850
 
                fout.WriteLine("</MPITESTRESULTS>")
1851
 
                fout.Close()
1852
 
        end if
1853
 
 
1854
 
        ' move back to the root directory
1855
 
        cEcho "changing into directory " & rootdir
1856
 
        WshShell.CurrentDirectory = rootdir
1857
 
End Function
1858
 
 
1859
 
'Function BuildMPICHTestSuite(srcdir, builddir)
1860
 
'       cEcho "changing into directory " & srcdir
1861
 
'       WshShell.CurrentDirectory = srcdir
1862
 
'       RunEchoCommand "cscript createprojects.wsf"
1863
 
'       RunEchoCommand "devenv.com test.sln /build Debug"
1864
 
'       ' move back to the root directory
1865
 
'       cEcho "changing into directory " & rootdir
1866
 
'       WshShell.CurrentDirectory = rootdir
1867
 
'End Function
1868
 
 
1869
 
'Function RunMPICHTestSuite(outdir)
1870
 
'       cEcho "changing into directory " & outdir
1871
 
'       WshShell.CurrentDirectory = outdir
1872
 
'       RunEchoCommand "cscript runtests.wsf /config:Debug"
1873
 
'       ' move back to the root directory
1874
 
'       cEcho "changing into directory " & rootdir
1875
 
'       WshShell.CurrentDirectory = rootdir
1876
 
'End Function
1877
 
 
1878
 
Function BuildMPICHTestSuite(srcdir, builddir)
1879
 
        if Not f.FolderExists(builddir) then
1880
 
                f.CreateFolder(builddir)
1881
 
        end if
1882
 
 
1883
 
        set testlists = CreateObject("Scripting.Dictionary")
1884
 
        FindFiles testlists, f.GetFolder(srcdir), "testlist"
1885
 
 
1886
 
        ' move into the build directory
1887
 
        cEcho "changing into directory " & builddir
1888
 
        WshShell.CurrentDirectory = builddir
1889
 
 
1890
 
        set buildout = f.CreateTextFile("build.bat", True)
1891
 
        set testlistout = f.CreateTextFile("testlist", True)
1892
 
        a = testlists.Items
1893
 
        If testlists.Count > 0 Then
1894
 
                For i = 0 to testlists.Count - 1
1895
 
                        BuildMPICHTestList a(i), srcdir, buildout
1896
 
                        ' copy the testlist in to the master testlist
1897
 
                        set fin = f.OpenTextFile(a(i))
1898
 
                        contents = fin.ReadAll()
1899
 
                        fin.Close()
1900
 
                        testlistout.Write(contents)
1901
 
                Next
1902
 
        End If
1903
 
        buildout.Close()
1904
 
        testlistout.Close()
1905
 
        RunEchoCommand("build.bat 2>&1 | tee build.out")
1906
 
 
1907
 
        ' move back to the root directory
1908
 
        cEcho "changing into directory " & rootdir
1909
 
        WshShell.CurrentDirectory = rootdir
1910
 
End Function
1911
 
 
1912
 
Function RunMPICHTestSuite(outdir)
1913
 
        cEcho "changing into directory " & outdir
1914
 
        WshShell.CurrentDirectory = outdir
1915
 
        cur_test = 1
1916
 
        num_tests = CountTests(outdir)
1917
 
        set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
1918
 
        set fout = f.CreateTextFile(outdir & "summary.xml")
1919
 
        Set fin = f.OpenTextFile(outdir & "testlist")
1920
 
        if not f.FileExists("er.xsl") then
1921
 
                set erfile = f.CreateTextFile(outdir & "er.xsl")
1922
 
                erfile.Write(erfilecontents)
1923
 
                erfile.Close()
1924
 
        end if
1925
 
        fout.WriteLine("<?xml version='1.0' ?>")
1926
 
        fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
1927
 
        fout.WriteLine("<MPITESTRESULTS>")
1928
 
        fout.WriteLine("<DATE>" & Date)
1929
 
        fout.WriteLine("</DATE>")
1930
 
        fout.WriteLine("<MPISOURCE></MPISOURCE>")
1931
 
        while not fin.AtEndOfStream
1932
 
                line = fin.ReadLine()
1933
 
                line = Trim(line)
1934
 
                twostrings = split(line, " ", -1, 1)
1935
 
                if not IsNull(twostrings) then
1936
 
                        count = 0
1937
 
                        for each s in twostrings
1938
 
                                count = count + 1
1939
 
                        next
1940
 
                        if count = 2 then
1941
 
                         if Left(twostrings(0), 1) <> "#" then
1942
 
                          if Len(twostrings(1)) > 0 then
1943
 
                                exe = outdir & twostrings(0) & ".exe"
1944
 
                                cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
1945
 
                                cEcho "test " & cur_test & " of " & num_tests
1946
 
                                cur_test = cur_test + 1
1947
 
                                cEcho cmd
1948
 
                                fout.WriteLine("<MPITEST>")
1949
 
                                fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
1950
 
                                if f.FileExists(exe) then
1951
 
                                    fcmds.WriteLine(cmd & " > " & twostrings(0) & "." & twostrings(1) & ".output")
1952
 
                                    if bCommandsOnly then
1953
 
                                        result = "not executing test"
1954
 
                                        if WshShell.CurrentDirectory <> last_commands_dir then
1955
 
                                                        commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
1956
 
                                                end if
1957
 
                                                last_commands_dir = WshShell.CurrentDirectory
1958
 
                                        commands_file.WriteLine(cmd & " 2>&1")
1959
 
                                    else
1960
 
                                            result = RunCommand(cmd)
1961
 
                                        end if
1962
 
                                else
1963
 
                                        result = "no executable, test skipped"
1964
 
                                        num_skipped = num_skipped + 1
1965
 
                                end if
1966
 
                                cEcho result
1967
 
                                if (Instr(result, "No Errors") And len(result) < 14) Then
1968
 
                                        fout.WriteLine("<STATUS>pass</STATUS>")
1969
 
                                        num_passed = num_passed + 1
1970
 
                                else
1971
 
                                        fout.WriteLine("<STATUS>fail</STATUS>")
1972
 
                                        fout.WriteLine("<TESTDIFF>")
1973
 
                                        result = cmd & vbCrLf & result
1974
 
                                        result = Replace( result, "&", "&amp;" )
1975
 
                                        result = Replace( result, "<", "&lt;" )
1976
 
                                        result = Replace( result, ">", "&gt;" )
1977
 
                                        fout.WriteLine(result)
1978
 
                                        fout.WriteLine("</TESTDIFF>")
1979
 
                                        if f.FileExists(exe) then
1980
 
                                                num_failed = num_failed + 1
1981
 
                                        end if
1982
 
                                end if
1983
 
                                fout.WriteLine("</MPITEST>")
1984
 
                          end if
1985
 
                         end if
1986
 
                        end if
1987
 
                end if
1988
 
        wend
1989
 
        fin.Close()
1990
 
        fout.WriteLine("</MPITESTRESULTS>")
1991
 
        fout.Close()
1992
 
        fcmds.Close()
1993
 
        ' move back to the root directory
1994
 
        cEcho "changing into directory " & rootdir
1995
 
        WshShell.CurrentDirectory = rootdir
1996
 
End Function
1997
 
 
1998
 
Function RunMPICHTestSuiteBatch(outdir)
1999
 
        cEcho "changing into directory " & outdir
2000
 
        WshShell.CurrentDirectory = outdir
2001
 
        cur_test = 1
2002
 
        num_tests = CountTests(outdir)
2003
 
 
2004
 
        if not bSummarize then
2005
 
                ' first pass generates the commands
2006
 
                set fcmds = f.CreateTextFile(outdir & "mpich_cmds.bat")
2007
 
                Set fin = f.OpenTextFile(outdir & "testlist")
2008
 
                while not fin.AtEndOfStream
2009
 
                        line = fin.ReadLine()
2010
 
                        line = Trim(line)
2011
 
                        twostrings = split(line, " ", -1, 1)
2012
 
                        if not IsNull(twostrings) then
2013
 
                                count = 0
2014
 
                                for each s in twostrings
2015
 
                                        count = count + 1
2016
 
                                next
2017
 
                                if count = 2 then
2018
 
                                 if Left(twostrings(0), 1) <> "#" then
2019
 
                                  if Len(twostrings(1)) > 0 then
2020
 
                                        exe = outdir & twostrings(0) & ".exe"
2021
 
                                        cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
2022
 
                                        fcmds.WriteLine("REM test " & cur_test & " of " & num_tests)
2023
 
                                        cur_test = cur_test + 1
2024
 
                                        if f.FileExists(exe) then
2025
 
                                            fcmds.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
2026
 
                                            if bCommandsOnly then
2027
 
                                                result = "not executing test"
2028
 
                                                if WshShell.CurrentDirectory <> last_commands_dir then
2029
 
                                                                commands_file.WriteLine("cd " & WshShell.CurrentDirectory)
2030
 
                                                        end if
2031
 
                                                        last_commands_dir = WshShell.CurrentDirectory
2032
 
                                                commands_file.WriteLine(cmd & " 2>&1 | tee " & twostrings(0) & "." & twostrings(1) & ".output")
2033
 
                                                end if
2034
 
                                        else
2035
 
                                                fcmds.WriteLine("REM no executable, test skipped")
2036
 
                                        end if
2037
 
                                  end if
2038
 
                                 end if
2039
 
                                end if
2040
 
                        end if
2041
 
                wend
2042
 
                fin.Close()
2043
 
                fcmds.Close()
2044
 
 
2045
 
                ' run the tests
2046
 
                if not bCommandsOnly then
2047
 
                        if not bBatchFilesOnly then
2048
 
                                RunEchoCommand(outdir & "mpich_cmds.bat")
2049
 
                        end if
2050
 
                end if
2051
 
        end if
2052
 
 
2053
 
        if not bBatchFilesOnly then
2054
 
                ' second pass parses the results
2055
 
                set fout = f.CreateTextFile(outdir & "summary.xml")
2056
 
                if not f.FileExists("er.xsl") then
2057
 
                        set erfile = f.CreateTextFile(outdir & "er.xsl")
2058
 
                        erfile.Write(erfilecontents)
2059
 
                        erfile.Close()
2060
 
                end if
2061
 
                fout.WriteLine("<?xml version='1.0' ?>")
2062
 
                fout.WriteLine("<?xml-stylesheet href=""er.xsl"" type=""text/xsl"" ?>")
2063
 
                fout.WriteLine("<MPITESTRESULTS>")
2064
 
                fout.WriteLine("<DATE>" & Date)
2065
 
                fout.WriteLine("</DATE>")
2066
 
                fout.WriteLine("<MPISOURCE></MPISOURCE>")
2067
 
                Set fin = f.OpenTextFile(outdir & "testlist")
2068
 
                while not fin.AtEndOfStream
2069
 
                        line = fin.ReadLine()
2070
 
                        line = Trim(line)
2071
 
                        twostrings = split(line, " ", -1, 1)
2072
 
                        if not IsNull(twostrings) then
2073
 
                                count = 0
2074
 
                                for each s in twostrings
2075
 
                                        count = count + 1
2076
 
                                next
2077
 
                                if count = 2 then
2078
 
                                 if Left(twostrings(0), 1) <> "#" then
2079
 
                                  if Len(twostrings(1)) > 0 then
2080
 
                                        exe = outdir & twostrings(0) & ".exe"
2081
 
                                        cmd = mpiexec & mpiexec_args & timeoutarg & " -n " + twostrings(1) + " " + exe
2082
 
                                        fout.WriteLine("<MPITEST>")
2083
 
                                        fout.WriteLine("<NAME>" & twostrings(0) & "</NAME>")
2084
 
                                        if f.FileExists(exe) then
2085
 
                                            if bCommandsOnly then
2086
 
                                                result = "not executing test"
2087
 
                                            else
2088
 
                                                        if f.FileExists(twostrings(0) & "." & twostrings(1) & ".output") then
2089
 
                                                                Set foutput = f.OpenTextFile(twostrings(0) & "." & twostrings(1) & ".output")
2090
 
                                                                if not foutput.AtEndOfStream then
2091
 
                                                                        result = foutput.ReadAll()
2092
 
                                                                else
2093
 
                                                                        result = ""
2094
 
                                                                end if
2095
 
                                                                foutput.Close()
2096
 
                                                        else
2097
 
                                                                result = ""
2098
 
                                                        end if
2099
 
                                                end if
2100
 
                                        else
2101
 
                                                result = "no executable, test skipped"
2102
 
                                                num_skipped = num_skipped + 1
2103
 
                                        end if
2104
 
                                        if (Instr(result, "No Errors") And len(result) < 14) Then
2105
 
                                                fout.WriteLine("<STATUS>pass</STATUS>")
2106
 
                                                num_passed = num_passed + 1
2107
 
                                        else
2108
 
                                                fout.WriteLine("<STATUS>fail</STATUS>")
2109
 
                                                fout.WriteLine("<TESTDIFF>")
2110
 
                                                result = cmd & vbCrLf & result
2111
 
                                                result = Replace( result, "&", "&amp;" )
2112
 
                                                result = Replace( result, "<", "&lt;" )
2113
 
                                                result = Replace( result, ">", "&gt;" )
2114
 
                                                fout.WriteLine(result)
2115
 
                                                fout.WriteLine("</TESTDIFF>")
2116
 
                                                if f.FileExists(exe) then
2117
 
                                                        num_failed = num_failed + 1
2118
 
                                                end if
2119
 
                                        end if
2120
 
                                        fout.WriteLine("</MPITEST>")
2121
 
                                  end if
2122
 
                                 end if
2123
 
                                end if
2124
 
                        end if
2125
 
                wend
2126
 
                fin.Close()
2127
 
                fout.WriteLine("</MPITESTRESULTS>")
2128
 
                fout.Close()
2129
 
        end if
2130
 
 
2131
 
        ' move back to the root directory
2132
 
        cEcho "changing into directory " & rootdir
2133
 
        WshShell.CurrentDirectory = rootdir
2134
 
End Function
2135
 
 
2136
 
' main script code
2137
 
 
2138
 
if Not f.FolderExists(testdirname) then
2139
 
        f.CreateFolder(testdirname)
2140
 
end if
2141
 
cEcho "changing into directory " & WshShell.CurrentDirectory & "\" & testdirname
2142
 
WshShell.CurrentDirectory = testdirname
2143
 
rootdir = root_folder.Path
2144
 
if Right(rootdir, 1) = "\" then
2145
 
        rootdir = rootdir & testdirname & "\"
2146
 
else
2147
 
        rootdir = rootdir & "\" & testdirname & "\"
2148
 
end if
2149
 
cEcho rootdir
2150
 
if Not f.FolderExists("summary") then
2151
 
        f.CreateFolder("summary")
2152
 
end if
2153
 
 
2154
 
' check out and build code
2155
 
if not bTestOnly then
2156
 
 
2157
 
        ' set the INCLUDE and LIB environment variables to be used by the command line build tools
2158
 
        old_include = env("INCLUDE")
2159
 
        old_lib = env("LIB")
2160
 
        if pathMPICHInstalled <> "" then
2161
 
                ' FIXME: mpitestconf.h needs to be copied to this include directory if the mpich test suite is to be run
2162
 
                env("INCLUDE") = old_include & ";" & pathMPICHInstalled & "\include"
2163
 
                env("LIB") = old_lib & ";" & pathMPICHInstalled & "\lib"
2164
 
        else
2165
 
                if pathMPICH = "" then
2166
 
                        if bWin64 then
2167
 
                                env("INCLUDE") = old_include & ";" & rootdir & "mpich\src\include" & ";" & rootdir & "mpich\src\include\win64"
2168
 
                        else
2169
 
                                env("INCLUDE") = old_include & ";" & rootdir & "mpich\src\include" & ";" & rootdir & "mpich\src\include\win32"
2170
 
                        end if
2171
 
                        env("LIB") = old_lib & ";" & rootdir & "mpich\lib"
2172
 
                else
2173
 
                        if bWin64 then
2174
 
                                env("INCLUDE") = old_include & ";" & pathMPICH & "\src\include" & ";" & pathMPICH & "\src\include\win64"
2175
 
                        else
2176
 
                                env("INCLUDE") = old_include & ";" & pathMPICH & "\src\include" & ";" & pathMPICH & "\src\include\win32"
2177
 
                        end if
2178
 
                        env("LIB") = old_lib & ";" & pathMPICH & "\lib"
2179
 
                end if
2180
 
        end if
2181
 
 
2182
 
        if bCheckoutMPICH then
2183
 
                ' check out mpich locally
2184
 
                CheckOut("mpich")
2185
 
                WshShell.CurrentDirectory = "mpich"
2186
 
                ' check out mpich remotely, run autogen.sh and tar up the .h.in files
2187
 
                set fout = f.CreateTextFile("sshcmds.txt")
2188
 
                fout.WriteLine( "cd /sandbox/" & username )
2189
 
                fout.WriteLine( "mkdir " & hostname & "dotintmp" )
2190
 
                fout.WriteLine( "cd " & hostname & "dotintmp" )
2191
 
                fout.WriteLine( "cvs -d " & cvs_root_dir & " export -r " & cvsTag & " mpichallWithMPE" )
2192
 
                fout.WriteLine( "cd mpich" )
2193
 
                fout.WriteLine( "autogen.sh" )
2194
 
                fout.WriteLine( "tar cvf dotin.tar `find . -name ""*.h.in""`" )
2195
 
                fout.WriteLine( "gzip dotin.tar" )
2196
 
                fout.WriteLine( "exit" )
2197
 
                fout.Close()
2198
 
                ' FIXME : are two 2>&1 allowed?
2199
 
                cmd = ssh_cmd & " -l " & username & " " & cvs_host & " 2>&1 < sshcmds.txt"
2200
 
                'cEcho cmd
2201
 
                RunEchoCommand cmd
2202
 
                f.DeleteFile("sshcmds.txt")
2203
 
                ' copy the .h.in tarball
2204
 
                RunEchoCommand scp_cmd & " " & username & "@" & cvs_host & ":/sandbox/" & username & "/" & hostname & "dotintmp/mpich/dotin.tar.gz ."
2205
 
                ' remove the remote temporary directory
2206
 
                RunEchoCommand ssh_cmd & " -l " & username & " " & cvs_host & " rm -rf /sandbox/" & username & "/" & hostname & "dotintmp"
2207
 
                ' extract the .h.in files and delete the tarball
2208
 
                RunEchoCommand "tar xvfz dotin.tar.gz"
2209
 
                if f.FileExists("dotin.tar.gz") then
2210
 
                        f.DeleteFile("dotin.tar.gz")
2211
 
                end if
2212
 
                WshShell.CurrentDirectory = rootdir
2213
 
        end if
2214
 
 
2215
 
        if bConfigureMPICH then
2216
 
                if pathMPICH <> "" then
2217
 
                        WshShell.CurrentDirectory = pathMPICH
2218
 
                else
2219
 
                        WshShell.CurrentDirectory = "mpich"
2220
 
                end if
2221
 
                if bFortran then
2222
 
                        RunEchoCommand "cscript winconfigure.wsf --cleancode"
2223
 
                else
2224
 
                        RunEchoCommand "cscript winconfigure.wsf --remove-fortran --cleancode"
2225
 
                end if
2226
 
                WshShell.CurrentDirectory = rootdir
2227
 
        else
2228
 
                if bConfigureMPICHTests then
2229
 
                        if pathMPICH <> "" then
2230
 
                                WshShell.CurrentDirectory = pathMPICH
2231
 
                        else
2232
 
                                WshShell.CurrentDirectory = "mpich"
2233
 
                        end if
2234
 
                        RunEchoCommand "cscript winconfigure.wsf --testdir"
2235
 
                        WshShell.CurrentDirectory = rootdir
2236
 
                end if
2237
 
        end if
2238
 
 
2239
 
        if bMakeMPICH then
2240
 
                ' stop a running smpd
2241
 
                smpd = ""
2242
 
                On Error resume next
2243
 
                smpd = WshShell.RegRead("HKLM\SOFTWARE\MPICH\SMPD\binary")
2244
 
                if Len(smpd) > 0 then
2245
 
                        error = RunEchoCommandError(smpd & " -remove")
2246
 
                end if
2247
 
                ' make the mpich libraries and dlls
2248
 
                if pathMPICH <> "" then
2249
 
                        WshShell.CurrentDirectory = pathMPICH
2250
 
                else
2251
 
                        WshShell.CurrentDirectory = "mpich"
2252
 
                end if
2253
 
                'error = RunEchoCommandError("devenv.com mpich.sln /build ch3sockDebug")
2254
 
                'if error <> 0 then
2255
 
                '       WScript.Echo("Error building the sock channel")
2256
 
                '       WScript.Quit
2257
 
                'end if
2258
 
                'error = RunEchoCommandError("devenv.com mpich.sln /project mpichs /build ch3sockDebug")
2259
 
                'if error <> 0 then
2260
 
                '       WScript.Echo("Error building the sock channel static library")
2261
 
                '       WScript.Quit
2262
 
                'end if
2263
 
                error = RunEchoCommandError("devenv.com mpich.sln /build ch3sockRelease")
2264
 
                if error <> 0 then
2265
 
                        WScript.Echo("Error building the sock channel release target")
2266
 
                        WScript.Quit
2267
 
                end if
2268
 
                error = RunEchoCommandError("devenv.com mpich.sln /project mpichs /build ch3sockRelease")
2269
 
                if error <> 0 then
2270
 
                        WScript.Echo("Error building the sock channel release target static library")
2271
 
                        WScript.Quit
2272
 
                end if
2273
 
                'error = RunEchoCommandError("devenv.com mpich.sln /build Debug")
2274
 
                'if error <> 0 then
2275
 
                '       WScript.Echo("Error building the utilities and process manager")
2276
 
                '       WScript.Quit
2277
 
                'end if
2278
 
                error = RunEchoCommandError("devenv.com mpich.sln /build Release")
2279
 
                if error <> 0 then
2280
 
                        WScript.Echo("Error building the release target utilities and process manager")
2281
 
                        WScript.Quit
2282
 
                end if
2283
 
                if bFortran then
2284
 
                        'error = RunEchoCommandError("devenv.com mpich.sln /build fortDebug")
2285
 
                        'if error <> 0 then
2286
 
                        '       WScript.Echo("Error building the fortran interface")
2287
 
                        '       WScript.Quit
2288
 
                        'end if
2289
 
                        error = RunEchoCommandError("devenv.com mpich.sln /build fortRelease")
2290
 
                        if error <> 0 then
2291
 
                                WScript.Echo("Error building the release target fortran interface")
2292
 
                                WScript.Quit
2293
 
                        end if
2294
 
                        'error = RunEchoCommandError("devenv.com mpich.sln /build gfortDebug")
2295
 
                        'if error <> 0 then
2296
 
                        '       WScript.Echo("Error building the cdecl fortran interface")
2297
 
                        '       WScript.Quit
2298
 
                        'end if
2299
 
                        'error = RunEchoCommandError("devenv.com mpich.sln /build gfortRelease")
2300
 
                        'if error <> 0 then
2301
 
                        '       WScript.Echo("Error building the release target cdecl fortran interface")
2302
 
                        '       WScript.Quit
2303
 
                        'end if
2304
 
                        'error = RunEchoCommandError("devenv.com mpich.sln /build sfortDebug")
2305
 
                        'if error <> 0 then
2306
 
                        '       WScript.Echo("Error building the stdcall fortran interface")
2307
 
                        '       WScript.Quit
2308
 
                        'end if
2309
 
                        'error = RunEchoCommandError("devenv.com mpich.sln /build sfortRelease")
2310
 
                        'if error <> 0 then
2311
 
                        '       WScript.Echo("Error building the release target stdcall fortran interface")
2312
 
                        '       WScript.Quit
2313
 
                        'end if
2314
 
                end if
2315
 
                'WshShell.CurrentDirectory = "maint"
2316
 
                'RunEchoCommand "makegcclibs.bat"
2317
 
                'WshShell.CurrentDirectory = ".."
2318
 
                'error = RunEchoCommandError("devenv.com examples\examples.sln /project cpi /build Release")
2319
 
                if channel <> "" then
2320
 
                        error = RunEchoCommandError("devenv.com mpich.sln /build " & channel)
2321
 
                        if error <> 0 then
2322
 
                                WScript.Echo("Error building the " & channel & " channel")
2323
 
                                WScript.Quit
2324
 
                        end if
2325
 
                end if
2326
 
                mpiexec = WshShell.CurrentDirectory & "\bin\mpiexec.exe"
2327
 
                ' install the newly built smpd
2328
 
                error = RunEchoCommandError(WshShell.CurrentDirectory & "\bin\smpd.exe -install")
2329
 
                WshShell.CurrentDirectory = rootdir
2330
 
        end if
2331
 
 
2332
 
        if bTestMPICH then
2333
 
                if bCheckoutMPICH then
2334
 
                        CheckOut("mpich")
2335
 
                end if
2336
 
                BuildMPICHTestSuite "mpi1", "buildMPICH"
2337
 
        end if
2338
 
 
2339
 
        if bTestCPP then
2340
 
                if bCheckoutCPP then
2341
 
                        CheckOut("c++")
2342
 
                end if
2343
 
                BuildCPPTestSuite "mpicxxtest", "buildCPP"
2344
 
        end if
2345
 
 
2346
 
        if bTestINTEL then
2347
 
                if bCheckoutINTEL then
2348
 
                        CheckOut("intel")
2349
 
                end if
2350
 
                BuildINTELTestSuite "IntelMPITEST", "buildINTEL"
2351
 
        end if
2352
 
 
2353
 
        if bTestMPICH then
2354
 
                'BuildMPICHTestSuite "mpich\test\mpi", ""
2355
 
                if pathMPICH = "" then
2356
 
                        BuildMPICHTestSuite rootdir & "mpich\test\mpi", "buildMPICH"
2357
 
                else
2358
 
                        BuildMPICHTestSuite pathMPICH & "\test\mpi", "buildMPICH"
2359
 
                end if
2360
 
        end if
2361
 
 
2362
 
end if
2363
 
 
2364
 
' run test suites
2365
 
if not bBuildOnly then
2366
 
        if not bBatchFilesOnly then
2367
 
                if not f.FileExists(rootdir & "summary\er.xsl") then
2368
 
                        set erfile = f.CreateTextFile(rootdir & "summary\er.xsl")
2369
 
                        erfile.Write(erfilecontents)
2370
 
                        erfile.Close()
2371
 
                end if
2372
 
                set webpage = f.CreateTextFile(rootdir & "summary\index.html", True)
2373
 
                webpage.WriteLine("<HTML>")
2374
 
                webpage.WriteLine("<BODY>")
2375
 
                webpage.WriteLine("<H2>Test suite summary page</H2>")
2376
 
                webpage.WriteLine("Date: " & Date() & "<BR>")
2377
 
                webpage.WriteLine("<TABLE>")
2378
 
        end if
2379
 
        if bTestMPICH then
2380
 
                if bBatch then
2381
 
                        RunMPICHTestSuiteBatch(rootdir & "buildMPICH\")
2382
 
                else
2383
 
                        RunMPICHTestSuite(rootdir & "buildMPICH\")
2384
 
                end if
2385
 
                if not bBatchFilesOnly then
2386
 
                        f.CopyFile rootdir & "buildMPICH\summary.xml", rootdir & "summary\summary.mpich.xml", True
2387
 
                        set fin = f.OpenTextFile(rootdir & "summary\summary.mpich.xml")
2388
 
                        set fout = f.CreateTextFile(rootdir & "summary\summary.mpich.failed.xml", True)
2389
 
                        fout.Write(ParseFailed(fin.ReadAll()))
2390
 
                        fin.Close()
2391
 
                        fout.Close()
2392
 
                        mpich_failed = CountInstances(rootdir & "summary\summary.mpich.failed.xml", "<STATUS>fail</STATUS>")
2393
 
                        mpich_passed = CountInstances(rootdir & "summary\summary.mpich.xml", "<STATUS>pass</STATUS>")
2394
 
                        mpich_skipped = CountInstances(rootdir & "summary\summary.mpich.xml", "no executable, test skipped")
2395
 
                        webpage.WriteLine("<TR><TD>MPICH</TD><TD>failed</TD><TD><A HREF=""summary.mpich.failed.xml"">" & mpich_failed & "</A></TD><TD>passed</TD><TD>" & mpich_passed & "</TD><TD>skipped</TD><TD>" & mpich_skipped & "</TD><TD><A HREF=""summary.mpich.xml"">summary.xml</A></TD>")
2396
 
                end if
2397
 
        end if
2398
 
        if bTestCPP then
2399
 
                if bBatch then
2400
 
                        RunCPPTestSuiteBatch(rootdir & "buildCPP\")
2401
 
                else
2402
 
                        RunCPPTestSuite(rootdir & "buildCPP\")
2403
 
                end if
2404
 
                if not bBatchFilesOnly then
2405
 
                        f.CopyFile rootdir & "buildCPP\summary.xml", rootdir & "summary\summary.cpp.xml", True
2406
 
                        set fin = f.OpenTextFile(rootdir & "summary\summary.cpp.xml")
2407
 
                        set fout = f.CreateTextFile(rootdir & "summary\summary.cpp.failed.xml", True)
2408
 
                        fout.Write(ParseFailed(fin.ReadAll()))
2409
 
                        fin.Close()
2410
 
                        fout.Close()
2411
 
                        cpp_failed = CountInstances(rootdir & "summary\summary.cpp.failed.xml", "<STATUS>fail</STATUS>")
2412
 
                        cpp_passed = CountInstances(rootdir & "summary\summary.cpp.xml", "<STATUS>pass</STATUS>")
2413
 
                        cpp_skipped = CountInstances(rootdir & "summary\summary.cpp.xml", "no executable, test skipped")
2414
 
                        webpage.WriteLine("<TR><TD>C++</TD><TD>failed</TD><TD><A HREF=""summary.cpp.failed.xml"">" & cpp_failed & "</A></TD><TD>passed</TD><TD>" & cpp_passed & "</TD><TD>skipped</TD><TD>" & cpp_skipped & "</TD><TD><A HREF=""summary.cpp.xml"">summary.xml</A></TD>")
2415
 
                end if
2416
 
        end if
2417
 
        if bTestINTEL then
2418
 
                if bBatch then
2419
 
                        RunINTELTestSuiteBatch(rootdir & "buildINTEL\")
2420
 
                else
2421
 
                        RunINTELTestSuite(rootdir & "buildINTEL\")
2422
 
                end if
2423
 
                if not bBatchFilesOnly then
2424
 
                        f.CopyFile rootdir & "buildINTEL\summary.xml", rootdir & "summary\summary.intel.xml", True
2425
 
                        set fin = f.OpenTextFile(rootdir & "summary\summary.intel.xml")
2426
 
                        set fout = f.CreateTextFile(rootdir & "summary\summary.intel.failed.xml", True)
2427
 
                        fout.Write(ParseFailed(fin.ReadAll()))
2428
 
                        fin.Close()
2429
 
                        fout.Close()
2430
 
                        intel_failed = CountInstances(rootdir & "summary\summary.intel.failed.xml", "<STATUS>fail</STATUS>")
2431
 
                        intel_passed = CountInstances(rootdir & "summary\summary.intel.xml", "<STATUS>pass</STATUS>")
2432
 
                        intel_skipped = CountInstances(rootdir & "summary\summary.intel.xml", "no executable, test skipped")
2433
 
                        webpage.WriteLine("<TR><TD>INTEL</TD><TD>failed</TD><TD><A HREF=""summary.intel.failed.xml"">" & intel_failed & "</A></TD><TD>passed</TD><TD>" & intel_passed & "</TD><TD>skipped</TD><TD>" & intel_skipped & "</TD><TD><A HREF=""summary.intel.xml"">summary.xml</A></TD>")
2434
 
                end if
2435
 
        end if
2436
 
        if bTestMPICH then
2437
 
                if bBatch then
2438
 
                        'RunMPICHTestSuiteBatch(rootdir & "mpich\test\mpi")
2439
 
                        RunMPICHTestSuiteBatch(rootdir & "buildMPICH\")
2440
 
                else
2441
 
                        'RunMPICHTestSuite(rootdir & "mpich\test\mpi")
2442
 
                        RunMPICHTestSuite(rootdir & "buildMPICH\")
2443
 
                end if
2444
 
                if not bBatchFilesOnly then
2445
 
                        f.CopyFile rootdir & "buildMPICH\summary.xml", rootdir & "summary\summary.mpich.xml", True
2446
 
                        set fin = f.OpenTextFile(rootdir & "summary\summary.mpich.xml")
2447
 
                        set fout = f.CreateTextFile(rootdir & "summary\summary.mpich.failed.xml", True)
2448
 
                        fout.Write(ParseFailed(fin.ReadAll()))
2449
 
                        fin.Close()
2450
 
                        fout.Close()
2451
 
                        mpich_failed = CountInstances(rootdir & "summary\summary.mpich.failed.xml", "<STATUS>fail</STATUS>")
2452
 
                        mpich_passed = CountInstances(rootdir & "summary\summary.mpich.xml", "<STATUS>pass</STATUS>")
2453
 
                        mpich_skipped = CountInstances(rootdir & "summary\summary.mpich.xml", "no executable, test skipped")
2454
 
                        webpage.WriteLine("<TR><TD>MPICH</TD><TD>failed</TD><TD><A HREF=""summary.mpich.failed.xml"">" & mpich_failed & "</A></TD><TD>passed</TD><TD>" & mpich_passed & "</TD><TD>skipped</TD><TD>" & mpich_skipped & "</TD><TD><A HREF=""summary.mpich.xml"">summary.xml</A></TD>")
2455
 
                end if
2456
 
        end if
2457
 
        if not bBatchFilesOnly then
2458
 
                webpage.WriteLine("</TABLE>")
2459
 
                webpage.WriteLine("</BODY>")
2460
 
                webpage.WriteLine("</HTML>")
2461
 
                webpage.Close()
2462
 
        end if
2463
 
        
2464
 
        ' Send the results of the tests to the Nightly Build server.
2465
 
        ' Insert code here ...
2466
 
end if
2467
 
 
2468
 
</script>
2469
 
</job>
2470
 
</package>