Megatest

Diff
Login

Differences From Artifact [7446eb5ad2]:

To Artifact [6792205dc7]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?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"/>
<title>Converted document</title>
</head>
<body>
<div id="globalWrapper">
<div class="Standard">

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

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

</div>
<h1 class="title">

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








|













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?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"/>
<title>Megatest User Manual</title>
</head>
<body>
<div id="globalWrapper">
<div class="Standard">

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

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

</div>
<h1 class="title">
Megatest User Manual
</h1>
<h2 class="author">
Matthew Welland
</h2>
<h2 class="Date">
Sept. 20, 
</h2>
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
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-4.3">4.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="listing">
<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"
​
$MT_MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim cpu1"
$MT_MEGATEST -test-status :state COMPLETED :status $?
</pre>


</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">







>











>
>







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
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-4.3">4.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">
<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"
​
$MT_MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim cpu1"
$MT_MEGATEST -test-status :state COMPLETED :status $?
</pre>
</div>

</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">
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
623
624
625
626
627
628

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

<div class="left">

</div>

<div class="left">
# run the cpu simulation but now use the environment variable $CPU
</div>

<div class="left">
# to select what cpu to run the simulation against
</div>

<div class="left">

</div>

<div class="left">
$MT_MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim $CPU"
</div>

<div class="left">
# As of version 1.07 Megatest automatically converts a status of "0"
</div>

<div class="left">
# to "PASS", any other number to "FAIL" and directly uses the value of
</div>

<div class="left">
# a string passed in.
</div>

<div class="left">
$MT_MEGATEST -test-status :state COMPLETED :status $?
</div>

</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.3">6.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"><div class="left">
# testconfig for the "system" test
</div>

<div class="left">
[setup]
</div>

<div class="left">
runscript main.csh
</div>

<div class="left">
waiton cpu mem
</div>

</pre>
</div>

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.4">6.4</a> Rolling up Miscellaneous Data
</h2>







|
<
<

<
<
<
<
<

<
<
<

<

<
<
<
<
<

<
<
<

<
<
<

<
<
<

<
<
<

<
<












<
|
<
<
<

<
<
<

<
<
<

<
<







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

</div>
<h2 class="Subsection">
<a class="toc" name="toc-Subsection-6.2">6.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
</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
</h2>
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
</h1>
<h1 class="Section">
<a class="toc" name="toc-Section-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:19:13.733684</span>
</div>
</div>
</body>
</html>







|




1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
</h1>
<h1 class="Section">
<a class="toc" name="toc-Section-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>
</div>
</div>
</body>
</html>