| 1 | 
edhill | 
1.3 | 
% $Header: /u/gcmpack/manual/part3/testing.tex,v 1.2 2004/01/29 18:50:45 edhill Exp $ | 
| 2 | 
edhill | 
1.1 | 
% $Name:  $ | 
| 3 | 
  | 
  | 
 | 
| 4 | 
  | 
  | 
\section{Testing} | 
| 5 | 
  | 
  | 
\label{sect:testing} | 
| 6 | 
  | 
  | 
\label{www:testing} | 
| 7 | 
edhill | 
1.3 | 
\begin{rawhtml} | 
| 8 | 
  | 
  | 
<!-- CMIREDIR:testing: --> | 
| 9 | 
  | 
  | 
\end{rawhtml} | 
| 10 | 
edhill | 
1.1 | 
 | 
| 11 | 
  | 
  | 
A script (\texttt{testreport}) for automated testing is included in | 
| 12 | 
  | 
  | 
the model within the {\em verification} directory.  While intended | 
| 13 | 
edhill | 
1.2 | 
mostly for advanced users, the script can be helpful for beginners. | 
| 14 | 
edhill | 
1.1 | 
 | 
| 15 | 
  | 
  | 
\subsection{Using \texttt{testreport}} | 
| 16 | 
  | 
  | 
 | 
| 17 | 
edhill | 
1.2 | 
On many systems, the program can be run with the command: | 
| 18 | 
edhill | 
1.1 | 
\begin{verbatim} | 
| 19 | 
  | 
  | 
% cd verification | 
| 20 | 
  | 
  | 
% ./testreport -ieee | 
| 21 | 
  | 
  | 
\end{verbatim} | 
| 22 | 
  | 
  | 
which will do the following: | 
| 23 | 
  | 
  | 
\begin{enumerate} | 
| 24 | 
edhill | 
1.2 | 
\item Locate all ``valid'' test directories.  Here, valid tests are | 
| 25 | 
  | 
  | 
  defined to be those directories within the current directory (which | 
| 26 | 
  | 
  | 
  is generally {\em verification}) that contain a subdirectory and | 
| 27 | 
  | 
  | 
  file with the names {\em results/output.txt}. | 
| 28 | 
  | 
  | 
 | 
| 29 | 
  | 
  | 
\item Then within each valid test: | 
| 30 | 
  | 
  | 
  \begin{enumerate} | 
| 31 | 
  | 
  | 
  \item run \texttt{genmake2} to produce a {\em Makefile} | 
| 32 | 
  | 
  | 
  \item build an executable | 
| 33 | 
  | 
  | 
  \item run the executable | 
| 34 | 
  | 
  | 
  \item compare and the output of the executable with the | 
| 35 | 
  | 
  | 
    contents of certain variables within {\em | 
| 36 | 
  | 
  | 
      TESTNAME/results/output.txt} | 
| 37 | 
  | 
  | 
  \item print and, if requested (with the | 
| 38 | 
  | 
  | 
    \texttt{-addr=EMAIL\_ADDRESS} option), send a MIME-encoded email | 
| 39 | 
  | 
  | 
    with the testing results | 
| 40 | 
  | 
  | 
  \end{enumerate} | 
| 41 | 
  | 
  | 
 | 
| 42 | 
edhill | 
1.1 | 
\end{enumerate} | 
| 43 | 
  | 
  | 
 | 
| 44 | 
edhill | 
1.2 | 
For further details, please see the MITgcm Developers' HOWTO at: | 
| 45 | 
  | 
  | 
\begin{rawhtml} <A href=''http://mitgcm.org/docs.html'' target="idontexist"> \end{rawhtml} | 
| 46 | 
  | 
  | 
\begin{verbatim} | 
| 47 | 
  | 
  | 
http://mitgcm.org/docs.html | 
| 48 | 
  | 
  | 
\end{verbatim} | 
| 49 | 
  | 
  | 
\begin{rawhtml} </A> \end{rawhtml} | 
| 50 | 
edhill | 
1.1 | 
 | 
| 51 | 
  | 
  | 
 | 
| 52 | 
  | 
  | 
\subsection{Automated testing} | 
| 53 | 
edhill | 
1.2 | 
 | 
| 54 | 
  | 
  | 
Automated testing results are produced on a regular basis and they can | 
| 55 | 
  | 
  | 
be viewed at: | 
| 56 | 
  | 
  | 
\begin{rawhtml} <A href=''http://mitgcm.org/testing.html'' target="idontexist"> \end{rawhtml} | 
| 57 | 
  | 
  | 
\begin{verbatim} | 
| 58 | 
  | 
  | 
http://mitgcm.org/testing.html | 
| 59 | 
  | 
  | 
\end{verbatim} | 
| 60 | 
  | 
  | 
\begin{rawhtml} </A> \end{rawhtml} | 
| 61 | 
  | 
  | 
which also includes links to various scripts for batch job submission | 
| 62 | 
  | 
  | 
on a variety of different machines. | 
| 63 | 
edhill | 
1.1 | 
 |