Megatest

Diff
Login

Differences From Artifact [6792205dc7]:

To Artifact [8244fd728a]:


1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
1
2
3
4
5
6


7
8
9
10
11
12
13
14
15






-
-
+
+







<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="generator" content="http://www.nongnu.org/elyxer/"/>
<meta name="create-date" content="2011-09-24"/>
<link rel="stylesheet" href="http://www.nongnu.org/elyxer/lyx.css" type="text/css" media="screen"/>
<meta name="create-date" content="2011-12-15"/>
<link rel="stylesheet" href="http://elyxer.nongnu.org/lyx.css" type="text/css" media="all"/>
<title>Megatest User Manual</title>
</head>
<body>
<div id="globalWrapper">
<div class="Standard">

</div>
25
26
27
28
29
30
31
32

33
34
35
36
37

38
39
40
41
42
43

44
45
46
47
48
49
50
51
52
53
54
55

56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

76
77
78

79
80
81

82
83
84

85
86
87
88
89
90

91
92
93

94
95
96

97
98
99

100
101

102
103
104
105
106
107
108
109
110
111
112



113
114
115
116
117
118
119
25
26
27
28
29
30
31

32
33
34
35
36

37
38
39
40
41
42

43



44
45
46
47
48




49
50
51

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

69
70
71

72
73
74

75
76
77

78
79
80
81
82
83

84
85
86

87
88
89

90
91
92

93


94


95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113







-
+




-
+





-
+
-
-
-





-
-
-
-
+


-
+
















-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+
-
-
+
-
-









+
+
+







<h2 class="author">
Matthew Welland
</h2>
<h2 class="Date">
Sept. 20, 
</h2>
<div class="Standard">

<span class="unknown">\thispagestyle</span>empty
</div>
<div class="Standard">
<p><br/>
</p>
2011 Matthew Welland. All rights reserved. 
©2011 Matthew Welland. All rights reserved. 
</div>
<div class="Standard">
Megatest is free software released under the General Public License v2.0. Please see the file COPYING in the source distribution for details. 
</div>
<div class="Standard">
<div class="medskip">
<div class="medskip"> </div>Email: matt@kiatoa.com. 

</div>
Email: matt@kiatoa.com. 
</div>
<div class="Standard">
Web: www.kiatoa.com/fossils/megatest
</div>
<div class="Standard">
<div class="medskip">

</div>
This document is believed to be acurate at the time of writing but as with any opensource project the source code itself is the final arbiter of the softwares behaviour. It is the responsibility of the end user to validate that the code will perform as they expect. The author assumes no responsibility for any inaccuracies that this document may contain. In no event will Matthew Welland be liable for direct, indirect, special, exemplary, incidental, or consequential damages resulting from any defect or omission in this document, even if advised of the possibility of such damages. 
<div class="medskip"> </div>This document is believed to be acurate at the time of writing but as with any opensource project the source code itself is the reference. It is the responsibility of the end user to validate that the code will perform as they expect. The author assumes no responsibility for any inaccuracies that this document may contain. In no event will Matthew Welland be liable for direct, indirect, special, exemplary, incidental, or consequential damages resulting from any defect or omission in this document, even if advised of the possibility of such damages. 
</div>
<div class="Standard">
This document is a snapshot in time and the Megatest software has likely been changed since publication. This document and the product that it describes may be improved at any time, without notice or obligation. 
This document is a snapshot in time and Megatest software has likely changed since publication. This document and Megatest may be improved at any time, without notice or obligation. 
</div>
<div class="Standard">
<p><br/>
</p>

</div>
<h1 class="Section-">
<a class="toc" name="toc-Section--1"></a>Megatest/document Revision History
</h1>
<div class="Standard">
<i>Notable revisions of the software are occasionally documented here</i>.
</div>
<div class="Standard">
<div class="center">
<table>
<tr>
<td align="center" valign="top">
<td align="center" valign="top" style="width: 0.5in;">
Version
</td>
<td align="center" valign="top">
<td align="center" valign="top" style="width: 0.5in;">
Author
</td>
<td align="justify" valign="top">
<td align="justify" valign="top" style="width: 3in;">
Description
</td>
<td align="center" valign="top">
<td align="center" valign="top" style="width: 1in;">
Date
</td>

</tr>
<tr>
<td align="center" valign="top">
<td align="center" valign="top" style="width: 0.5in;">
v1.25
</td>
<td align="center" valign="top">
<td align="center" valign="top" style="width: 0.5in;">
matt
</td>
<td align="justify" valign="top">
<td align="justify" valign="top" style="width: 3in;">
converted to new document template
</td>
<td align="center" valign="top">
<td align="center" valign="top" style="width: 1in;">
<div class="PlainVisible">

<span class="unknown">\thedate</span>
</div>

</td>

</tr>

</table>

</div>

</div>
<div class="Standard">
<p><br/>
</p>
<div class="fulltoc">
<div class="tocheader">
Table of Contents
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Section--1">Section: Megatest/document Revision History</a>
160
161
162
163
164
165
166
167

168



169
170
171

172
173
174

175
176
177

178
179
180

181
182
183
184

185
186
187
188

189
190
191

192



193

194
195

196
197



198
199

200
201
202

203
204
205

206

207
208

209
210
211

212


213
214
215

216

217
218

219
220




221

222
223
224
225

226
227

228
229

230

231
232

233

234
235

236
237
238

239
240
241

242


243
244




245

246
247
248

249
250
251

252
253
254

255
256
257
258

259
260
261

262
263
264
265
266

267
268
269

270


271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286

287
288
289
290
291
292

293
294
295
296
297
298
299
300
301

302
303
304
305
306
307
308
154
155
156
157
158
159
160

161
162
163
164
165
166
167

168
169
170

171
172
173

174
175
176

177
178
179
180

181
182
183
184

185
186
187

188
189
190
191
192
193
194
195

196
197

198
199
200
201

202
203
204

205
206
207

208
209
210
211

212
213
214

215
216
217
218
219
220

221
222
223
224

225
226
227
228
229
230
231

232
233
234
235

236
237

238
239

240
241
242
243

244
245
246
247

248
249
250

251
252
253

254
255
256
257
258
259
260
261
262
263

264
265
266

267
268
269

270
271
272

273
274
275
276

277
278
279

280
281
282
283
284

285
286
287

288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306

307
308
309
310
311
312

313
314
315
316
317
318
319
320
321

322
323
324
325
326
327
328
329







-
+

+
+
+


-
+


-
+


-
+


-
+



-
+



-
+


-
+

+
+
+

+

-
+

-
+
+
+

-
+


-
+


-
+

+

-
+


-
+

+
+


-
+

+

-
+


+
+
+
+
-
+



-
+

-
+

-
+

+

-
+

+

-
+


-
+


-
+

+
+


+
+
+
+
-
+


-
+


-
+


-
+



-
+


-
+




-
+


-
+

+
+















-
+





-
+








-
+







<a class="Link" href="#toc-Subsection-3.5">Subsection 3.5: Create your test running script, main.sh</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-3.6">Subsection 3.6: Run megatest and watch your run progress</a>
</div>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-4">Section 4: How to Write Tests</a>
<a class="Link" href="#toc-Section-4">Section 4: Choose Flow or Unstructured Run?</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-5">Section 5: How to Write Tests</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsection-4.1">Subsection 4.1: A Simple Test with one Step</a>
<a class="Link" href="#toc-Subsection-5.1">Subsection 5.1: A Simple Test with one Step</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-4.2">Subsection 4.2: Create your testconfig file</a>
<a class="Link" href="#toc-Subsection-5.2">Subsection 5.2: Create your testconfig file</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-4.3">Subsection 4.3: Create the main.csh script</a>
<a class="Link" href="#toc-Subsection-5.3">Subsection 5.3: Create the main.csh script</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-4.4">Subsection 4.4: Simple Test with Multiple Steps </a>
<a class="Link" href="#toc-Subsection-5.4">Subsection 5.4: Simple Test with Multiple Steps </a>
</div>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-5">Section 5: Simple Test with Multiple Steps, Some in Parallel</a>
<a class="Link" href="#toc-Section-6">Section 6: Simple Test with Multiple Steps, Some in Parallel</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsection-5.1">Subsection 5.1: The Makefile</a>
<a class="Link" href="#toc-Subsection-6.1">Subsection 6.1: The Makefile</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-5.2">Subsection 5.2: The main.csh file</a>
<a class="Link" href="#toc-Subsection-6.2">Subsection 6.2: The main.csh file</a>
</div>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-7">Section 7: Simple Test with Iteration</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Section-6">Section 6: Simple Test with Iteration</a>
<a class="Link" href="#toc-Subsection-7.1">Subsection 7.1: Update your testconfig file for iteration</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsection-7.2">Subsection 7.2: Rewrite your main.csh for iteration</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-6.1">Subsection 6.1: Update your testconfig file for iteration</a>
<a class="Link" href="#toc-Subsection-7.3">Subsection 7.3: Tests with Inter-test dependencies</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-6.2">Subsection 6.2: Rewrite your main.csh for iteration</a>
<a class="Link" href="#toc-Subsection-7.4">Subsection 7.4: Rolling up Miscellaneous Data</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-6.3">Subsection 6.3: Tests with Inter-test dependencies</a>
<a class="Link" href="#toc-Subsection-7.5">Subsection 7.5: Rolling up Runs</a>
</div>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-6.4">Subsection 6.4: Rolling up Miscellaneous Data</a>
<a class="Link" href="#toc-Section-8">Section 8: Dashboard</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-6.5">Subsection 6.5: Rolling up Runs</a>
<a class="Link" href="#toc-Section-9">Section 9: Generating an OpenDocument Spreadsheet from the Database</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-10">Section 10: Flows</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-7">Section 7: Dashboard</a>
<a class="Link" href="#toc-Section-11">Section 11: Flow Specification and Running (Not released yet)</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Section-8">Section 8: Generating an OpenDocument Spreadsheet from the Database</a>
<a class="Link" href="#toc-Subsection-11.1">Subsection 11.1: Write your flow file</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-11.2">Subsection 11.2: Run the flow</a>
</div>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-9">Section 9: Reference</a>
<a class="Link" href="#toc-Section-12">Section 12: Monitor based running</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsection-9.1">Subsection 9.1: Configuration file Syntax</a>
<a class="Link" href="#toc-Subsection-12.1">Subsection 12.1: Monitor logic</a>
</div>
<div class="tocindent">
</div>
<div class="toc">
<a class="Link" href="#toc-Subsubsection-9.1.1">Subsubsection 9.1.1: Sections</a>
<a class="Link" href="#toc-Section-13">Section 13: Reference</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsubsection-9.1.2">Subsubsection 9.1.2: Variables</a>
<a class="Link" href="#toc-Subsection-13.1">Subsection 13.1: Configuration file Syntax</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsubsection-9.1.3">Subsubsection 9.1.3: Includes</a>
<a class="Link" href="#toc-Subsubsection-13.1.1">Subsubsection 13.1.1: Sections</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsubsection-9.1.4">Subsubsection 9.1.4: Setting a variable by running a command</a>
<a class="Link" href="#toc-Subsubsection-13.1.2">Subsubsection 13.1.2: Variables</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsubsection-9.1.5">Subsubsection 9.1.5: Notes</a>
<a class="Link" href="#toc-Subsubsection-13.1.3">Subsubsection 13.1.3: Includes</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsubsection-13.1.4">Subsubsection 13.1.4: Setting a variable by running a command</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsubsection-13.1.5">Subsubsection 13.1.5: Notes</a>
</div>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-9.2">Subsection 9.2: Environment variables</a>
<a class="Link" href="#toc-Subsection-13.2">Subsection 13.2: Environment variables</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-9.3">Subsection 9.3: megatest.config</a>
<a class="Link" href="#toc-Subsection-13.3">Subsection 13.3: megatest.config</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-9.4">Subsection 9.4: runconfigs.config file</a>
<a class="Link" href="#toc-Subsection-13.4">Subsection 13.4: runconfigs.config file</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsection-9.5">Subsection 9.5: Writing tests</a>
<a class="Link" href="#toc-Subsection-13.5">Subsection 13.5: Writing tests</a>
</div>
<div class="tocindent">
<div class="toc">
<a class="Link" href="#toc-Subsubsection-9.5.1">Subsubsection 9.5.1: testconfig file</a>
<a class="Link" href="#toc-Subsubsection-13.5.1">Subsubsection 13.5.1: testconfig file</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Subsubsection-9.5.2">Subsubsection 9.5.2: Command line</a>
<a class="Link" href="#toc-Subsubsection-13.5.2">Subsubsection 13.5.2: Command line</a>
</div>
</div>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-A">Section A: Data</a>
<a class="Link" href="#toc-Appendix-A">Appendix A: Data</a>
</div>
<div class="toc">
<a class="Link" href="#toc-Section-B">Section B: References</a>
<a class="Link" href="#toc-Appendix-B">Appendix B: References</a>
</div>
</div>

</div>

</div>
<div class="Standard">
<p><br/>
</p>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-1">1</a> Introduction
</h1>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-1.1">1.1</a> Megatest design philosophy
</h2>
<div class="Standard">
Megatest is intended to provide the minimum needed resources to make writing a suite of tests for software, design engineering or process control (via owlfs for example) without being specialized for any specific problem space. Megatest in of itself does not know what constitutes a PASS or FAIL of a test. In most cases megatest is best used in conjunction with logpro or a similar tool to parse, analyze and decide on the test outcome. A call to megatest can then be made to record the result. 
Megatest is intended to provide the minimum needed resources to make writing a suite of tests and implementing continuous build for software, design engineering or process control (via owlfs for example) without being specialized for any specific problem space. Megatest in of itself does not know what constitutes a PASS or FAIL of a test. In most cases megatest is best used in conjunction with logpro or a similar tool to parse, analyze and decide on the test outcome.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-1.2">1.2</a> Megatest architecture
</h2>
<div class="Standard">
All data to specify the tests and configure the system is stored in plain text files. All system state is stored in an sqlite3 database. Tests are launched using the launching system available for the distributed compute platform in use. A template script is provided which can launch jobs on local and remote Linux hosts. Currently megatest uses the network filesystem to call home to your master sqlite3 database.
All data to specify the tests and configure the system is stored in plain text files. All system state is stored in an sqlite3 database. Tests are launched using the launching system available for the distributed compute platform in use. A template script is provided which can launch jobs on local and remote Linux hosts. Currently megatest uses the network filesystem to &ldquo;call home&rdquo; to your master sqlite3 database.
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-2">2</a> Installation
</h1>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-2.1">2.1</a> Dependencies
</h2>
<div class="Standard">
Chicken scheme and a number of eggs are required for building megatest. See the file utils/installall.sh for an automated way to install the dependencies on Linux.
Chicken scheme and a number of &ldquo;eggs&rdquo; are required for building megatest. See the file utils/installall.sh for an automated way to install the dependencies on Linux.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-2.2">2.2</a> Build and Install
</h2>
<div class="Standard">
Run “make test” to create the megatest executable. You may wish to copy the executable to a centrally accessible location.
</div>
406
407
408
409
410
411
412
413

414






415
416

417
418
419
420
421
422
423
424
425
426
427

428
429
430
431
432
433
434
435
436
437
438
439
440

441
442
443
444
445
446
447
427
428
429
430
431
432
433

434
435
436
437
438
439
440
441
442

443
444
445
446
447
448
449
450
451
452
453

454
455
456
457
458
459
460
461
462
463
464
465
466

467
468
469
470
471
472
473
474







-
+

+
+
+
+
+
+

-
+










-
+












-
+







​
dashboard &amp;
</pre>
</div>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-4">4</a> How to Write Tests
<a class="toc" name="toc-Section-4">4</a> Choose Flow or Unstructured Run?
</h1>
<div class="Standard">
A flow is a structured and specifically sequenced set of tests. See the Flows chapter to understand the difference.
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-5">5</a> How to Write Tests
</h1>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-4.1">4.1</a> A Simple Test with one Step
<a class="toc" name="toc-Subsection-5.1">5.1</a> A Simple Test with one Step
</h2>
<div class="Standard">
<div class="listing">
<pre class="listing">mkdir simpletest
cd simpletest
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-4.2">4.2</a> Create your testconfig file
<a class="toc" name="toc-Subsection-5.2">5.2</a> Create your testconfig file
</h2>
<div class="Standard">
<div class="listing">
<pre class="listing"># testconfig
​
[setup]
runscript main.csh
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-4.3">4.3</a> Create the main.csh script
<a class="toc" name="toc-Subsection-5.3">5.3</a> Create the main.csh script
</h2>
<div class="Standard">
Note: Using csh is NOT recommended. Use bash, perl, ruby, zsh or anything other than csh. We use csh here because it is popular in the EDA industry for which Megatest was originally created. 
</div>
<div class="Standard">
<div class="left">
<div class="listing">
460
461
462
463
464
465
466
467

468
469
470
471
472
473
474
487
488
489
490
491
492
493

494
495
496
497
498
499
500
501







-
+







</div>

</div>
<div class="Standard">
You can now run megatest and the created test directory will contain the new files “run_simulation.html” and “run_simulation.log”. If you are using the dashboard you can click on the run and then push the “View log” button to view the log file in firefox.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-4.4">4.4</a> Simple Test with Multiple Steps 
<a class="toc" name="toc-Subsection-5.4">5.4</a> Simple Test with Multiple Steps 
</h2>
<div class="Standard">
To run multiple steps simply add them to the main.csh file. Here we add a step to test “cpu2”. The second step that tests cpu2 will only run after the step that tested “cpu1” completes.
</div>
<div class="Standard">
<div class="listing">
<pre class="listing">#!/bin/tcsh -x
482
483
484
485
486
487
488
489

490
491
492

493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511

512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

531
532
533
534
535
536

537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553

554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572

573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588

589
590
591
592
593
594
595
509
510
511
512
513
514
515

516
517
518

519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537

538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556

557
558
559
560
561
562

563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579

580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598

599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614

615
616
617
618
619
620
621
622







-
+


-
+


















-
+


















-
+





-
+
















-
+


















-
+















-
+







$MT_MEGATEST -runstep run_simulation_cpu2 -logpro runsim.logpro "runsim cpu2"
$MT_MEGATEST -test-status :state COMPLETED :status $?
</pre>
</div>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-5">5</a> Simple Test with Multiple Steps, Some in Parallel
<a class="toc" name="toc-Section-6">6</a> Simple Test with Multiple Steps, Some in Parallel
</h1>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-5.1">5.1</a> The Makefile
<a class="toc" name="toc-Subsection-6.1">6.1</a> The Makefile
</h2>
<div class="Standard">
A good way to run steps in parallel within a single test, especially when there are following steps, is to use the Unix Make utility. Writing Makefiles is beyond the scope of this document but here is a minimal example that will run “runsim cpu1” and “runsim cpu2” in parallel. For more information on make try “info make” at the Linux command prompt.
</div>
<div class="Standard">
<div class="listing">
<pre class="listing"># Example Makefile to run two steps in parallel
​
RTLDIR=/path/to/rtl
CPUS = cpu1 cpu2
​
run_simulation_$(CPUS).html : $(RTLDIR)/$(CPUS)
	$(MT_MEGATEST) -runstep run_simulation_$(CPUS) -logpro runsim.logpro "runsim $(CPUS)
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-5.2">5.2</a> The main.csh file
<a class="toc" name="toc-Subsection-6.2">6.2</a> The main.csh file
</h2>
<div class="Standard">
<div class="listing">
<pre class="listing">#!/bin/tcsh -x
​
# run the cpu1 and cpu2 simulations in parallel. 
# The -j parameter tells make how many jobs it may run in parallel
​
<div class="left">
make -j 2 
</div>

$MT_MEGATEST -test-status :state COMPLETED :status $?
</pre>
</div>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-6">6</a> Simple Test with Iteration
<a class="toc" name="toc-Section-7">7</a> Simple Test with Iteration
</h1>
<div class="Standard">
Since no jobs run after the cpu1 and cpu2 simulations in this test it is possible to use iterated mode.
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.1">6.1</a> Update your testconfig file for iteration
<a class="toc" name="toc-Subsection-7.1">7.1</a> Update your testconfig file for iteration
</h2>
<div class="Standard">
<div class="listing">
<pre class="listing">[setup]
runscript main.csh
<div class="left">

</div>

[items]
CPU cpu1 cpu2
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.2">6.2</a> Rewrite your main.csh for iteration
<a class="toc" name="toc-Subsection-7.2">7.2</a> Rewrite your main.csh for iteration
</h2>
<div class="Standard">
<div class="listing">
<pre class="listing">#!/bin/tcsh -x

# run the cpu simulation but now use the environment variable $CPU
# to select what cpu to run the simulation against

$MT_MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim $CPU"
# As of version 1.07 Megatest automatically converts a status of "0"
# to "PASS", any other number to "FAIL" and directly uses the value of
# a string passed in.
$MT_MEGATEST -test-status :state COMPLETED :status $?
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.3">6.3</a> Tests with Inter-test dependencies
<a class="toc" name="toc-Subsection-7.3">7.3</a> Tests with Inter-test dependencies
</h2>
<div class="Standard">
Sometimes a test depends on the output from a previous test or it may not make sense to run a test is another test does not complete with status “PASS”. In either of these scenarios you can use the “waiton” keyword in your testconfig file to indicate that this test must wait on one or more tests to complete before being launched. In this example there is no point in running the “system” test if the “cpu” and “mem” tests either do not complete or complete but with status “FAIL”.
</div>
<div class="Standard">
<div class="listing">
<pre class="listing"># testconfig for the "system" test
[setup]
runscript main.csh
waiton cpu mem
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.4">6.4</a> Rolling up Miscellaneous Data
<a class="toc" name="toc-Subsection-7.4">7.4</a> Rolling up Miscellaneous Data
</h2>
<div class="Standard">
Use the -load-test-data switch to roll up arbitrary data from a test into the test_data table.
</div>
<div class="Standard">
<div class="listing">
<pre class="listing"># Fields are:
624
625
626
627
628
629
630
631

632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647

648
649
650
651
652
653
654
655
656
657

658
659
660
661
662
663
664

665
666
667
668

669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684

685






686






























687

688





























689
690

691
692
693
694
695
696
697
698
699
700
701
702
703

704
705
706
707
708
709
710
711
712
713
714
715
716

717
718
719
720
721
722
723
724
725
726
727
728
729

730
731
732
733
734
735
736
737
738
739
740
741
742

743
744
745
746
747
748
749
750
751
752
753
754

755
756
757
758
759

760
761
762

763
764
765
766
767
768

769
770
771

772
773
774
775
776
777

778
779
780

781
782
783
784
785
786

787
788
789

790
791
792
793
794
795

796
797
798

799
800
801
802
803
804

805
806
807

808
809
810
811
812
813

814
815
816

817
818
819
820
821
822

823
824
825

826
827
828
829
830
831

832
833
834

835
836
837
838
839
840
841
842
843
844

845
846
847
848
849

850
851
852

853
854
855

856
857
858

859
860
861

862
863
864
865
866
867

868
869
870

871
872
873

874
875
876

877
878
879

880
881
882
883
884
885

886
887
888

889
890
891

892
893
894

895
896
897

898
899
900
901
902
903

904
905
906

907
908
909

910
911
912

913
914
915

916
917
918
919
920
921

922
923
924

925
926
927

928
929
930

931
932
933

934
935
936
937
938
939

940
941
942

943
944
945

946
947
948

949
950
951

952
953
954
955
956
957

958
959
960

961
962
963

964
965
966

967
968
969

970
971


















972
973
974
975

976
977
978

979
980
981

982
983
984

985
986
987

988
989
990
991
992
993

994
995
996

997
998
999

1000
1001
1002

1003
1004
1005

1006
1007
1008
1009
1010
1011
1012
1013
1014
1015

1016
1017
1018
1019
1020

1021
1022
1023

1024
1025
1026

1027
1028
1029

1030
1031
1032

1033
1034
1035
1036
1037
1038

1039
1040
1041

1042
1043
1044

1045
1046
1047

1048
1049
1050

1051
1052
1053
1054
1055
1056

1057
1058
1059

1060
1061
1062

1063
1064
1065

1066
1067
1068

1069
1070
1071
1072
1073
1074
1075
651
652
653
654
655
656
657

658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673

674
675
676
677
678
679
680
681
682
683

684
685
686
687
688
689
690

691
692
693
694

695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710

711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749

750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781

782
783
784
785
786
787
788
789
790
791
792
793
794

795
796
797
798
799
800
801
802
803
804
805
806
807

808
809
810
811
812
813
814
815
816
817
818
819
820

821
822
823
824
825
826
827
828
829
830
831
832
833

834
835
836
837
838
839
840
841
842
843
844
845

846
847
848
849
850

851
852
853

854
855
856
857
858
859

860
861
862

863
864
865
866
867
868

869
870
871

872
873
874
875
876
877

878
879
880

881
882
883
884
885
886

887
888
889

890
891
892
893
894
895

896
897
898

899
900
901
902
903
904

905
906
907

908
909
910
911
912
913

914
915
916

917
918
919
920
921
922

923
924
925

926
927
928
929
930
931
932
933
934
935

936
937
938
939
940

941
942
943

944
945
946

947
948
949

950
951
952

953
954
955
956
957
958

959
960
961

962
963
964

965
966
967

968
969
970

971
972
973
974
975
976

977
978
979

980
981
982

983
984
985

986
987
988

989
990
991
992
993
994

995
996
997

998
999
1000

1001
1002
1003

1004
1005
1006

1007
1008
1009
1010
1011
1012

1013
1014
1015

1016
1017
1018

1019
1020
1021

1022
1023
1024

1025
1026
1027
1028
1029
1030

1031
1032
1033

1034
1035
1036

1037
1038
1039

1040
1041
1042

1043
1044
1045
1046
1047
1048

1049
1050
1051

1052
1053
1054

1055
1056
1057

1058
1059
1060

1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084

1085
1086
1087

1088
1089
1090

1091
1092
1093

1094
1095
1096

1097
1098
1099
1100
1101
1102

1103
1104
1105

1106
1107
1108

1109
1110
1111

1112
1113
1114

1115
1116
1117
1118
1119
1120
1121
1122
1123
1124

1125
1126
1127
1128
1129

1130
1131
1132

1133
1134
1135

1136
1137
1138

1139
1140
1141

1142
1143
1144
1145
1146
1147

1148
1149
1150

1151
1152
1153

1154
1155
1156

1157
1158
1159

1160
1161
1162
1163
1164
1165

1166
1167
1168

1169
1170
1171

1172
1173
1174

1175
1176
1177

1178
1179
1180
1181
1182
1183
1184
1185







-
+















-
+









-
+






-
+



-
+















-
+

+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

-
+












-
+












-
+












-
+












-
+











-
+




-
+


-
+





-
+


-
+





-
+


-
+





-
+


-
+





-
+


-
+





-
+


-
+





-
+


-
+





-
+


-
+





-
+


-
+









-
+




-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+


+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+









-
+




-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+







</li>
<li>
If status is specified its value overrides the above calculations.
</li>

</ul>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.5">6.5</a> Rolling up Runs
<a class="toc" name="toc-Subsection-7.5">7.5</a> Rolling up Runs
</h2>
<div class="Standard">
To roll up a number of tests in a sequence of runs to a single run use the -rollup command. 
</div>
<div class="Standard">
<div class="listing">
<pre class="listing">megatest -rollup :sysname ubuntu :fsname nfs :datapath none :runname rollup_ww38
</pre>
</div>

</div>
<div class="Standard">
All keys must be specified and the runname is the name of the run that will be created. All paths are kept original inside the database. When -remove-runs is used to delete runs the data is not deleted if there are rollups that refer to the data. 
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-7">7</a> Dashboard
<a class="toc" name="toc-Section-8">8</a> Dashboard
</h1>
<div class="Standard">
<div class="listing">
<pre class="listing">&gt; dashboard &amp;
</pre>
</div>

</div>
<div class="Standard">
<img class="embedded" src="dashboard.png" alt="figure dashboard.png" style="width: 730px; max-width: 913px; height: 626px; max-height: 783px; "/>
<img class="embedded" src="dashboard.png" alt="figure dashboard.png" style="width: 730px; max-width: 913px; height: 626px; max-height: 783px;"/>

</div>
<div class="Standard">
Pushing one of the buttons on the main dashboard will bring up the test specific dashboard. Values are updated in semi-real time as the test runs.
</div>
<div class="Standard">
<img class="embedded" src="dashboard-test.png" alt="figure dashboard-test.png" style="width: 643px; max-width: 804px; height: 571px; max-height: 714px; "/>
<img class="embedded" src="dashboard-test.png" alt="figure dashboard-test.png" style="width: 643px; max-width: 804px; height: 571px; max-height: 714px;"/>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-8">8</a> Generating an OpenDocument Spreadsheet from the Database
<a class="toc" name="toc-Section-9">9</a> Generating an OpenDocument Spreadsheet from the Database
</h1>
<div class="Standard">
And OpenDocument multi-paned spreadsheet can be generated from the megatest.db file by running -extract-ods
</div>
<div class="Standard">
<div class="listing">
<pre class="listing">megatest -extract-ods results.ods :runname % 
</pre>
</div>

</div>
<div class="Standard">
You can optionally specify the keys for your database to limit further the runs to extract into the spreadsheet. The first sheet contains all the run data and subsequent sheets contain data rolled up for the individual tests.
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-9">9</a> Reference
<a class="toc" name="toc-Section-10">10</a> Flows
</h1>
<div class="Standard">
A flow specifies the tests to run, the order and dependencies and is managed by a running megatest process.
</div>
<h1 class="Section">
<a class="toc" name="toc-Section-11">11</a> Flow Specification and Running (Not released yet)
</h1>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-11.1">11.1</a> Write your flow file
</h2>
<div class="Standard">
flows/&lt;flowname&gt;.config
</div>
<div class="Standard">
<div class="listing">
<pre class="listing"># Flow: &lt;flowname&gt;
[flowconfig]
# turn on item level dependencies
itemdeps on

[flowsteps]
# &lt;testname&gt;[,&lt;predecessor&gt;]

# Run the test "copydata"
copydata

# Run the test "setup" after copydata completes with PASS, WARN or WAIVE
setup,copydata

# once the test "setup" completes successfully run sim1, sim2 and sim3
sim1,setup
sim2,setup
sim3,setup
</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-9.1">9.1</a> Configuration file Syntax
<a class="toc" name="toc-Subsection-11.2">11.2</a> Run the flow
</h2>
<div class="Standard">
<div class="listing">
<pre class="listing">megatest -runflow &lt;flowname&gt; :FIELD1 val1 :FIELD2 val2 :runname wk32.4
</pre>
</div>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-12">12</a> Monitor based running
</h1>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-12.1">12.1</a> Monitor logic
</h2>
<div class="Standard">
Note: The monitor is usable but incomplete as of Megatest v1.31. Click on the &ldquo;Monitor&rdquo; button on the dashboard to start the monitor and give it a try.
</div>
<div class="Standard">
<img class="embedded" src="monitor-state-diagram.png" alt="figure monitor-state-diagram.png" style="max-width: 383px; max-height: 335px;"/>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-13">13</a> Reference
</h1>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-13.1">13.1</a> Configuration file Syntax
</h2>
<div class="Standard">
Note: whitespace is preserved including at the end of line. Ensure your entries only have whitespace at the end of line when needed to avoid problems.
</div>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-9.1.1">9.1.1</a> Sections
<a class="toc" name="toc-Subsubsection-13.1.1">13.1.1</a> Sections
</h3>
<div class="Standard">
<div class="listing">
<pre class="listing">[section name]
</pre>
</div>

</div>
<div class="Standard">
This creates a section named “section name”
</div>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-9.1.2">9.1.2</a> Variables
<a class="toc" name="toc-Subsubsection-13.1.2">13.1.2</a> Variables
</h3>
<div class="Standard">
<div class="listing">
<pre class="listing">VARX has this value
</pre>
</div>

</div>
<div class="Standard">
The variable “VARX” will have the value “has this value”
</div>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-9.1.3">9.1.3</a> Includes
<a class="toc" name="toc-Subsubsection-13.1.3">13.1.3</a> Includes
</h3>
<div class="Standard">
<div class="listing">
<pre class="listing">[include filename]
</pre>
</div>

</div>
<div class="Standard">
The file named “filename” will be included as if part of the calling file. NOTE: This means no section can be named “include “ (with the whitespace).
</div>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-9.1.4">9.1.4</a> Setting a variable by running a command
<a class="toc" name="toc-Subsubsection-13.1.4">13.1.4</a> Setting a variable by running a command
</h3>
<div class="Standard">
<div class="listing">
<pre class="listing">VARNAME [system ls /tmp]
</pre>
</div>

</div>
<div class="Standard">
The variable “VARNAME” will get a value created by the Unix command “ls /tmp”. All lines of output from the command will be joined with a space.
</div>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-9.1.5">9.1.5</a> Notes
<a class="toc" name="toc-Subsubsection-13.1.5">13.1.5</a> Notes
</h3>
<ul>
<li>
Some variables are infered as lists. Each token on the line separated by whitespace will be member of the list.
</li>
<li>
Comments (lines starting with #) and blank lines are ignored.
</li>

</ul>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-9.2">9.2</a> Environment variables
<a class="toc" name="toc-Subsection-13.2">13.2</a> Environment variables
</h2>
<div class="Standard">
<table>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
Variable
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Purpose
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
MT_CMDINFO
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Conveys test variables to the megatest test runner.
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
MT_TEST_RUN_DIR
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Directory assigned by megatest for the test to run.
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
MT_TEST_NAME
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Name of the test, corrosponds to the directory name under tests.
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
MT_ITEM_INFO
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Iterated tests will set this to a sequence of key/values ((KEY val) ...) 
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
MT_RUN_AREA_HOME
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Directory where megatest was launched from and where the tests code can be found
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
MT_RUNNAME
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Name of this run as set by the :runname parameter
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
MT_MEGATEST
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
Path/Filename to megatest executable. Found either from called path or but using the “exectuable” keyword in the [setup] section.
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
&lt;field1&gt; ....
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 50%;">
The field values as set on the megatest -runall command line (e.g. :field1 abc)
</td>

</tr>

</table>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-9.3">9.3</a> megatest.config
<a class="toc" name="toc-Subsection-13.3">13.3</a> megatest.config
</h2>
<div class="Standard">
<table>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
section
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
variable
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
value
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
required
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
comment
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
[setup]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
max_concurrent_jobs
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
if variable is not defined no limit on jobs
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">

</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
executable
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
full path to megatest binary
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
Use only if necessary, megatest will extract the location from where it used to launch and add append that to the PATH for test runs.
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
runsdir
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
full path to where the link tree to all runs will be created
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
Because your runs may be spread out over several disk partitions a central link tree is created to make finding all the runs easy.
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
[fields]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
string of letters, numbers and underscore
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
string of letters, numbers and underscore
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
at least one
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">

</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
[jobtools]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
launcher
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
command line used to launch jobs - the job command (megatest -execute) will be appended to this
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">

</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
workhosts
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
list of hostnames to run jobs on NOT SUPPORTED RIGHT NOW
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
n/a
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">

</td>

</tr>
<tr>
<td align="left" valign="top" style="width: 10%;">
[jobgroups]
</td>
<td align="left" valign="top" style="width: 15%;">
string of letters, numbers and underscore
</td>
<td align="left" valign="top" style="width: 20%;">
number
</td>
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top" style="width: 20%;">
Control number of jobs allowed to concurrently run in categories. See [jobgroup] in testconfig
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
[env-override]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
string of letters, numbers and underscore
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
any string
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
These are set on the test launching machine, not the test running machine. Typical usage is to control the host or run queue for launching tests. These values will not be seen by the test when it runs.
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 10%;">
[disks]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 15%;">
string of letters, numbers and underscore
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
a valid path writable by the test launching process and by the test process
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
yes
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
The disk usage balancing algorithm is to choose the disk with the least space for each test run. 
</td>

</tr>

</table>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-9.4">9.4</a> runconfigs.config file
<a class="toc" name="toc-Subsection-13.4">13.4</a> runconfigs.config file
</h2>
<div class="Standard">
<table>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
section
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 12%;">
variable
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 3%;">
value
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 4%;">
required?
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
comment
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
[default]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 12%;">
string of letters, numbers and underscore
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 3%;">
any
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 4%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
variables set in this section will be available for all runs, defining the same variable in another section will override the value from the default section
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 20%;">
[field1value/field2value...]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 12%;">
string of letters, numbers and underscore
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 3%;">
any
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 4%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
the values in this section will be set for any run where field1 is field1value, field2 is field2value and fieldN is fieldNvalue. 
</td>

</tr>

</table>

1111
1112
1113
1114
1115
1116
1117
1118

1119
1120
1121

1122
1123
1124
1125
1126

1127
1128
1129

1130
1131
1132

1133
1134
1135

1136
1137
1138

1139
1140
1141
1142
1143
1144

1145
1146
1147

1148
1149
1150

1151
1152
1153

1154
1155
1156

1157
1158
1159
1160
1161
1162

1163
1164
1165

1166
1167
1168

1169
1170
1171

1172
1173
1174

1175
1176
1177
1178
1179
1180



















1181
1182
1183

1184
1185
1186

1187
1188
1189

1190
1191
1192

1193


















1194
1195
1196
1197
1198
1199
1200
1201
1202

1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213

1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228

1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243

1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258

1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273

1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288

1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303

1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318

1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331

1332
1333

1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348

1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363

1364
1365
1366
1367

1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378

1379
1380
1381
1382

1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393

1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408

1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423

1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438

1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454


1455
1456
1457

1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468

1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483

1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498

1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513

1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529


1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541

1542
1543
1544

1545
1546
1547
1548
1549

1550
1551
1552
1553
1221
1222
1223
1224
1225
1226
1227

1228
1229
1230

1231
1232
1233
1234
1235

1236
1237
1238

1239
1240
1241

1242
1243
1244

1245
1246
1247

1248
1249
1250
1251
1252
1253

1254
1255
1256

1257
1258
1259

1260
1261
1262

1263
1264
1265

1266
1267
1268
1269
1270
1271

1272
1273
1274

1275
1276
1277

1278
1279
1280

1281
1282
1283

1284
1285
1286
1287
1288
1289

1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310

1311
1312
1313

1314
1315
1316

1317
1318
1319

1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347

1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358

1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373

1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388

1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403

1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418

1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433

1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448

1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463

1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476

1477
1478

1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493

1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508

1509
1510
1511
1512

1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523

1524
1525
1526
1527

1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538

1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553

1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568

1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583

1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598


1599
1600
1601
1602

1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613

1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628

1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643

1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658

1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673


1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686

1687
1688
1689

1690
1691
1692
1693
1694

1695
1696
1697
1698
1699







-
+


-
+




-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+


-
+


-
+


-
+


-
+





-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


-
+


-
+


-
+


-
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








-
+










-
+














-
+














-
+














-
+














-
+














-
+














-
+














-
+












-
+

-
+














-
+














-
+



-
+










-
+



-
+










-
+














-
+














-
+














-
+














-
-
+
+


-
+










-
+














-
+














-
+














-
+














-
-
+
+











-
+


-
+




-
+




<div class="Code">
ENCRYPTION true
</div>
<div class="Code">
TESTPATH /nfs/testing/megacorp_runs
</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-9.5">9.5</a> Writing tests
<a class="toc" name="toc-Subsection-13.5">13.5</a> Writing tests
</h2>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-9.5.1">9.5.1</a> testconfig file
<a class="toc" name="toc-Subsubsection-13.5.1">13.5.1</a> testconfig file
</h3>
<div class="Standard">
<table>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 8%;">
section
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
variable
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 12%;">
value
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
required?
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
comments
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 8%;">
[setup]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
runscript
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 12%;">
name of script to execute for this test
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
yes
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
The script must be executable and either provide the full path or put a copy at the top of your test directory
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 8%;">
[requirements]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
waiton
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 12%;">
list of valid test names
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
This test will not run until the named tests are state completed and status PASS
</td>

</tr>
<tr>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 8%;">

</td>
<td align="left" valign="top" style="width: 6%;">
jobgroup
</td>
<td align="left" valign="top" style="width: 12%;">

</td>
<td align="left" valign="top" style="width: 6%;">

</td>
<td align="left" valign="top" style="width: 30%;">

</td>

</tr>
<tr>
<td align="left" valign="top" style="width: 8%;">
[items]
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
any valid
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 12%;">
list of values
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
The test will be repeated once for each item with the variable name set to the value. If there is more than one variable then the test will be run against all unique combinations of the values
</td>

</tr>
<tr>
<td align="left" valign="top" style="width: 8%;">
[eztests]
</td>
<td align="left" valign="top" style="width: 6%;">
any valid
</td>
<td align="left" valign="top" style="width: 12%;">
stepname command
</td>
<td align="left" valign="top" style="width: 6%;">
no
</td>
<td align="left" valign="top" style="width: 30%;">
Use in addition to or instead of runscript for easy implementation of steps. If &lt;stepname&gt;.logpro exists it will be applied to the &lt;stepname&gt;.log and resulting exit code will be used to determine PASS/FAIL/WARN
</td>

</tr>

</table>

</div>
<h3 class="Subsubsection">
<a class="toc" name="toc-Subsubsection-9.5.2">9.5.2</a> Command line
<a class="toc" name="toc-Subsubsection-13.5.2">13.5.2</a> Command line
</h3>
<div class="Standard">
<table>
<tr>
<td align="left" valign="top">
switch or param
</td>
<td align="left" valign="top">
parameter
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
purpose
</td>
<td align="left" valign="top">
comments
</td>

</tr>
<tr>
<td align="left" valign="top">
-h
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
brief help
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-runall
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
run all tests
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-runtests
</td>
<td align="left" valign="top">
test1,test2,...
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
run one or more tests
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-step
</td>
<td align="left" valign="top">
stepname
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
record a step
</td>
<td align="left" valign="top">
requires :state and :status
</td>

</tr>
<tr>
<td align="left" valign="top">
-test-status
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
record the test status
</td>
<td align="left" valign="top">
requires :state and :status
</td>

</tr>
<tr>
<td align="left" valign="top">
-setlog
</td>
<td align="left" valign="top">
logfilename
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
set the logfile name for a test
</td>
<td align="left" valign="top">
path is assumed to be relative to the test run directory
</td>

</tr>
<tr>
<td align="left" valign="top">
-set-toplog
</td>
<td align="left" valign="top">
logfilename
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
set the logfile name for the top test in an iterated test run
</td>
<td align="left" valign="top">
each sub test can have its own logfile set
</td>

</tr>
<tr>
<td align="left" valign="top">
-m
</td>
<td align="left" valign="top">
comment
&ldquo;comment&rdquo;
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
sets a comment for the step, test or run
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
:runname
</td>
<td align="left" valign="top">
[a-zA-Z0-9_-]+
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
directory in which this run will be stored in the test run area 
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
:state
</td>
<td align="left" valign="top">
any value
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
Set the step or test state, this is stored in the state field in the steps or tests table respectively
</td>
<td align="left" valign="top">
For tests Megatest recognises INCOMPLETE, COMPLETE
For tests Megatest recognises &ldquo;INCOMPLETE&rdquo;, &ldquo;COMPLETE&rdquo;
</td>

</tr>
<tr>
<td align="left" valign="top">
:status
</td>
<td align="left" valign="top">
any value
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
Set the step or test status, this is stored in the status field in the steps or tests table respectively
</td>
<td align="left" valign="top">
For tests Megatest recognises PASS, FAIL, and CHECK
For tests Megatest recognises &ldquo;PASS&rdquo;, &ldquo;FAIL&rdquo;, and &ldquo;CHECK&rdquo;
</td>

</tr>
<tr>
<td align="left" valign="top">
-list-runs
</td>
<td align="left" valign="top">
any value, % is wildcard
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
Respects -itempatt and -testpatt for filters
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-testpatt
</td>
<td align="left" valign="top">
any value, % is wildcard
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">

</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-itempatt
</td>
<td align="left" valign="top">
any value, % is wildcard
</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">

</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-showkeys
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
Print the keys being used for this database
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-force
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
Test will not re-run if in the PASS, CHECK or KILLED, using -force will force the run to be launched.
<td align="left" valign="top" style="width: 30%;">
Test will not re-run if in the &ldquo;PASS&rdquo;, &ldquo;CHECK&rdquo; or &ldquo;KILLED&rdquo;, using -force will force the run to be launched.
</td>
<td align="left" valign="top">
WARNING: The -force switch will bypass any waiton dependencies.
WARNING: The -force switch will bypass any &ldquo;waiton&rdquo; dependencies.
</td>

</tr>
<tr>
<td align="left" valign="top">
-xterm
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
Launch an xterm instead of run the test. The xterm will have the environment that the test would see.
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-remove-runs
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
Remove a run, test or subtest from the database and the disk. Cannot be undone. Requires -testpatt, -itempatt, :runname and all keys be specified.
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
<i>Test helpers</i>
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">

</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-runstep
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
<td align="left" valign="top" style="width: 30%;">
Used inside a test to run a step, record the start and end of the step and optionally analyze the output using logpro.
</td>
<td align="left" valign="top">

</td>

</tr>
<tr>
<td align="left" valign="top">
-logpro
</td>
<td align="left" valign="top">

</td>
<td align="left" valign="top">
If using logpro to asses the PASS/FAIL status of the step you specify the logpro file with this parameter.
<td align="left" valign="top" style="width: 30%;">
If using logpro to acess the PASS/FAIL status of the step you specify the logpro file with this parameter.
</td>
<td align="left" valign="top">

</td>

</tr>

</table>

</div>
<h1 class="Section">
<a class="toc" name="toc-Section-A">A</a> Data
<a class="toc" name="toc-Appendix-A">A</a> Data
</h1>
<h1 class="Section">
<a class="toc" name="toc-Section-B">B</a> References
<a class="toc" name="toc-Appendix-B">B</a> References
</h1>

<hr class="footer"/>
<div class="footer" id="generated-by">
Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.0.0 (2010-07-21)</a> on <span class="create-date">2011-09-24T12:41:26.767975</span>
Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.2.2 (2011-06-12)</a> on <span class="create-date">2011-12-15T21:53:21.527506</span>
</div>
</div>
</body>
</html>