[Casa-framework] test programs

Wim.Brouw at csiro.au Wim.Brouw at csiro.au
Thu Dec 7 09:59:09 EST 2006


Documents like that exist.

E.g. the aips++ Programming Manual (by BEG!! & WY!!) has a one page
explanation of test programs and how to run them. It has a lot of simple
information.(available through the 'old' doc pages -- I think the ALMA
programming manual is not that much different..)

See also notes 167 and 196 on some background.

The QAG page have some simple background (some links stopped working on
e.g. hader templates).

Have another look around -- there is more simple information. Why ask
somebody to package it again in another format?

I agree that Systrem Manual is not a simple novel -- but if you see
somebody mention 'assay' why not look in comntents of the SM and find:

" assay invokes an AIPS++ test program or glish script. If the program
name has the suffix .g then it is a test glish script which is executed
using the glish command. Otherwise it is a normal test program. 
If the test program or glish script has an associated .exec file then
assay invokes it using the exec command. Otherwise if it has an
associated .run file then assay invokes it by simply starting it in
another process. 
If there is a corresponding .out file, assay compares the output of the
program or script with that. 

In comparing the output assay ignores text demarked by two lines
starting with >> and <<. This may be useful as in the following example,
where the test program prints a quantity such as the execution time
which is not expected to be reproducible. 


   The answer to the question of life the universe and everything is: 42
   >>>
   Execution time: 5.4 aeons
   <<<

If there is a .in file associated with the test program then assay
redirects stdin from it. 
If there are .in_* files then assay takes care they exist (temporarily)
in the working directory, so the test program can find them there. 

At the end assay takes care that all temporary files and directories are
deleted. When the test program or script creates a temporary file or
directory then it should be called name_tmp* where name is the name of
the test program or glish script (e.g. tTable_tmp1.data). 

It is permissible for a .exec to invoke assay (presumably with arguments
for the test executable) - the potential infinite recursion is trapped. 
Note that a .run has the advantage that one can massage the output
before assay gets it. "

Which even I can understand.

Wim






------------------------------------------------------------------
Contact details: www.astro.rug.nl/~brouw/wbrouw.html
------------------------------------------------------------------

 

> -----Original Message-----
> From: casa-framework-bounces at donar.cv.nrao.edu 
> [mailto:casa-framework-bounces at donar.cv.nrao.edu] On Behalf 
> Of jaeger at cpsc.ucalgary.ca
> Sent: 06 December 2006 18:11
> To: David King
> Cc: casa-framework at nrao.edu
> Subject: Re: [Casa-framework] test programs
> 
> I too would find it useful!
> 
> Shannon
> 
> > Ger.VanDiepen at csiro.au wrote:
> >> A test program is more than a .cc file.
> >> Do people now the AIPS++ test environment? I.e. do they know about 
> >> assay,
> >  > .run, .in, and .out files?
> >
> > I for one could use a short summary of all this; even by 
> email would 
> > be fine, if someone can find the time.  There is too much 
> material in 
> > the programmer and sys manuals, with uncertainty as to what 
> is still 
> > current; a quick-guide, possibly referring to sections 
> there would be 
> > helpful.  Also, given the number of people who have joined 
> the project 
> > in recent years, and recent system changes, others might find that 
> > helpful as well.
> >
> > dk
> > _______________________________________________
> > Casa-framework mailing list
> > Casa-framework at donar.cv.nrao.edu
> > http://listmgr.cv.nrao.edu/mailman/listinfo/casa-framework
> >
> 
> 
> _______________________________________________
> Casa-framework mailing list
> Casa-framework at donar.cv.nrao.edu
> http://listmgr.cv.nrao.edu/mailman/listinfo/casa-framework
> 



More information about the Casa-framework mailing list