︙ | | |
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
-
+
-
+
|
<h3 class="Subsection">
<a class="toc" name="toc-Subsection-2.2.5">2.2.5</a> Create your test running script, main.sh
</h3>
<div class="Paragraph">
<a class="toc" name="toc-Paragraph-4"></a><div class="listing">
<pre class="listing">#!/bin/bash
megatest -runstep mystep1 "sleep 20;echo Done" -m "mystep1 is done"
$MT_MEGATEST -runstep mystep1 "sleep 20;echo Done" -m "mystep1 is done"
megatest -test-status :state COMPLETED :status PASS -m "This is a comment"
$MT_MEGATEST -test-status :state COMPLETED :status PASS -m "This is a comment"
</pre>
</div>
</div>
<h3 class="Subsection">
<a class="toc" name="toc-Subsection-2.2.6">2.2.6</a> Run megatest and watch your run progress
</h3>
|
︙ | | |
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
|
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
|
-
+
-
+
|
<pre class="listing">#!/bin/tcsh -x
# run the cpu1 simulation.
# The step name is "run_simulation"
# The commandline being run for this step is "runsim cpu1"
# The logpro file to validate the output from the run is "runsim.logpro"
$MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim cpu1"
$MT_MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim cpu1"
if ($? == 0)
set status = PASS
else
set status = FAIL
end
$MEGATEST -test-status :state COMPLETED :status $status
$MT_MEGATEST -test-status :state COMPLETED :status $status
</pre>
</div>
</div>
<div class="Unindented">
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>
|
︙ | | |
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
-
-
+
+
-
+
|
<pre class="listing">#!/bin/tcsh -x
# run the cpu1 simulation.
# The step name is "run_simulation"
# The commandline being run for this step is "runsim cpu1"
# The logpro file to validate the output from the run is "runsim.logpro"
$MEGATEST -runstep run_simulation_cpu1 -logpro runsim.logpro "runsim cpu1" && \
$MEGATEST -runstep run_simulation_cpu2 -logpro runsim.logpro "runsim cpu2"
$MT_MEGATEST -runstep run_simulation_cpu1 -logpro runsim.logpro "runsim cpu1" && \
$MT_MEGATEST -runstep run_simulation_cpu2 -logpro runsim.logpro "runsim cpu2"
if ($? == 0)
set status = PASS
else
set status = FAIL
end
$MEGATEST -test-status :state COMPLETED :status $status
$MT_MEGATEST -test-status :state COMPLETED :status $status
</pre>
</div>
</div>
<h2 class="Section">
<a class="toc" name="toc-Section-3.3">3.3</a> Simple Test with Multiple Steps, Some in Parallel
</h2>
|
︙ | | |
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
448
449
450
451
452
453
454
455
|
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
448
449
450
451
452
453
454
455
|
-
+
-
+
|
<a class="toc" name="toc-Paragraph-10"></a><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)
$(MEGATEST) -runstep run_simulation_$(CPUS) -logpro runsim.logpro "runsim $(CPUS)
$(MT_MEGATEST) -runstep run_simulation_$(CPUS) -logpro runsim.logpro "runsim $(CPUS)
</pre>
</div>
</div>
<h3 class="Subsection">
<a class="toc" name="toc-Subsection-3.3.2">3.3.2</a> The main.csh file
</h3>
<div class="Unindented">
<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
make -j 2
if ($? == 0)
set status = PASS
else
set status = FAIL
end
$MEGATEST -test-status :state COMPLETED :status $status
$MT_MEGATEST -test-status :state COMPLETED :status $status
</pre>
</div>
</div>
<h2 class="Section">
<a class="toc" name="toc-Section-3.4">3.4</a> Simple Test with Iteration
</h2>
|
︙ | | |
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
|
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
|
-
+
-
+
|
<div class="Paragraph">
<a class="toc" name="toc-Paragraph-12"></a><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
$MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim $CPU"
$MT_MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim $CPU"
if ($? == 0)
set status = PASS
else
set status = FAIL
end
$MEGATEST -test-status :state COMPLETED :status $status
$MT_MEGATEST -test-status :state COMPLETED :status $status
</pre>
</div>
</div>
<h2 class="Section">
<a class="toc" name="toc-Section-3.5">3.5</a> Tests with Inter-test dependencies
</h2>
|
︙ | | |
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
|
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
|
-
+
|
</table>
</div>
<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-05-17T07:31:47.151243</span>
Document generated by <a href="http://elyxer.nongnu.org/">eLyXer 1.0.0 (2010-07-21)</a> on <span class="create-date">2011-05-17T17:16:38.918258</span>
</div>
</div>
</body>
</html>
|