Index: docs/megatest.html ================================================================== --- docs/megatest.html +++ docs/megatest.html @@ -100,11 +100,11 @@
Section 3.2: Simple Test with Multiple Steps
-Section 3.3: Simple Test, Multiple Steps, Some in Parallel +Section 3.3: Simple Test with Multiple Steps, Some in Parallel
Subsection 3.3.1: The Makefile
@@ -218,11 +218,14 @@

2.2.1 Create megatest.config

-Create the file megatest.config using the megatest.config template from the tests directory. At a minimum you need the following:
+Create the file megatest.config using the megatest.config template from the tests directory. At a minimum you need the following: +
+
+
# Fields are the keys under which your test runs are organized
 [fields]
 field1 TEXT
 field2 TEXT
 ​
@@ -237,11 +240,11 @@
 # run out of space in a partition you can add additional disks
 # entries.
 # Format is:
 # name /path/to/area 
 [disks]
-1 /tmp 
+disk1 /tmp 
 

@@ -259,12 +262,12 @@ 2.2.3 Create the tests directory and your first test

The structure should look like this:
-
-
+
+
../tests
   ├── megatest.config
   ├── runconfigs.config
   └── tests
      └── mytest
@@ -275,23 +278,23 @@
 
 

2.2.4 Create the testconfig file for your test

-
-
+
+
[setup]
 runscript main.sh
 

2.2.5 Create your test running script, main.sh

-
-
+
+
#!/bin/bash
 ​
 megatest -runstep mystep1 "sleep 20;echo Done" -m "mystep1 is done"
 ​
 megatest -test-status :state COMPLETED :status PASS -m "This is a comment"
@@ -300,12 +303,12 @@
 
 

2.2.6 Run megatest and watch your run progress

-
-
+
+
megatest :field1 abc :field2 def :runname 2011week08.4a -runall
 ​
 watch megatest -list-runs %
 ​
 # OR use the dashboard
@@ -325,23 +328,23 @@
 3.1 A Simple Test with one Step
 
 

3.1.1 Create your test directory. The directory name will be the name of the test

-
-
+
+
mkdir simpletest
 cd simpletest
 

3.1.2 Create your testconfig file. This file contains various specifications for your test. For our example the test author has chosen to write the test using csh scripting.

-
-
+
+
# testconfig
 ​
 [setup]
 runscript main.csh
 
@@ -350,11 +353,14 @@

3.1.3 Create your main.csh script

-
+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 some industries. +
+
+
#!/bin/tcsh -x
 ​
 # run the cpu1 simulation.
 #   The step name is "run_simulation"
 #   The commandline being run for this step is "runsim cpu1"
@@ -363,11 +369,11 @@
 $MEGATEST -runstep run_simulation -logpro runsim.logpro "runsim cpu1"
 
-
+
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.

3.2 Simple Test with Multiple Steps

@@ -388,11 +394,11 @@

-3.3 Simple Test, Multiple Steps, Some in Parallel +3.3 Simple Test with Multiple Steps, Some in Parallel

3.3.1 The Makefile

@@ -420,26 +426,25 @@ ​ # run the cpu1 and cpu2 simulations in parallel. # The -j parameter tells make how many jobs it may run in parallel ​ make -j 2 -​

3.4 Simple Test with Iteration

-Since no jobs run after the cpu1 and cpu2 simulations inside the test there it is possible to run this test in iterated mode. +Since no jobs run after the cpu1 and cpu2 simulations in this test it is possible to use iterated mode.

3.4.1 Update you testconfig file for iteration

-
-
+
+
[setup]
 runscript main.csh
 ​
 [items]
 CPU cpu1 cpu2
@@ -448,12 +453,12 @@
 
 

3.4.2 Rewrite your main.csh for iteration

-
-
+
+
#!/bin/tcsh -x
 ​
 # run the cpu simulation but now use the environment variable $CPU
 # to select what cpu to run the simulation against
 ​
@@ -506,13 +511,13 @@
 4.1.3 Includes
 
 
[include filename]
-
+
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). -
+

4.1.4 Setting a variable by running a command

VARNAME [system ls /tmp] @@ -1376,10 +1381,10 @@
Index: docs/megatest.lyx ================================================================== --- docs/megatest.lyx +++ docs/megatest.lyx @@ -175,10 +175,13 @@ \begin_layout Standard Create the file megatest.config using the megatest.config template from the tests directory. At a minimum you need the following: +\end_layout + +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -272,11 +275,11 @@ [disks] \end_layout \begin_layout Plain Layout -1 /tmp +disk1 /tmp \end_layout \end_inset @@ -313,11 +316,11 @@ \begin_layout Standard The structure should look like this: \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -362,11 +365,11 @@ \begin_layout Subsection Create the testconfig file for your test \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -386,11 +389,11 @@ \begin_layout Subsection Create your test running script, main.sh \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -423,11 +426,11 @@ \begin_layout Subsection Run megatest and watch your run progress \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -482,11 +485,11 @@ \begin_layout Subsection Create your test directory. The directory name will be the name of the test \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -509,11 +512,11 @@ This file contains various specifications for your test. For our example the test author has chosen to write the test using csh scripting. \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -543,10 +546,17 @@ \begin_layout Subsection Create your main.csh script \end_layout \begin_layout 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 some industries. + +\end_layout + +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -702,11 +712,11 @@ \end_layout \begin_layout Section -Simple Test, Multiple Steps, Some in Parallel +Simple Test with Multiple Steps, Some in Parallel \end_layout \begin_layout Subsection The Makefile \end_layout @@ -823,14 +833,10 @@ \begin_layout Plain Layout make -j 2 \end_layout -\begin_layout Plain Layout - -\end_layout - \end_inset \end_layout @@ -837,19 +843,19 @@ \begin_layout Section Simple Test with Iteration \end_layout \begin_layout Standard -Since no jobs run after the cpu1 and cpu2 simulations inside the test there - it is possible to run this test in iterated mode. +Since no jobs run after the cpu1 and cpu2 simulations in this test it is + possible to use iterated mode. \end_layout \begin_layout Subsection Update you testconfig file for iteration \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -883,11 +889,11 @@ \begin_layout Subsection Rewrite your main.csh for iteration \end_layout -\begin_layout Standard +\begin_layout Paragraph \begin_inset listings inline false status open \begin_layout Plain Layout @@ -1076,11 +1082,11 @@ \begin_layout Standard [include filename] \end_layout -\begin_layout Standard +\begin_layout Quotation The file named \begin_inset Quotes eld \end_inset filename