It is assumed that you have already logged in as acisdude and established the ACIS load review operational environment with a setloads command. Extend the environment with
% setloadsYou'll find yourself on the directory
% source lr_test_source
% cd $REGRESS
/pool14/duderg/regress
.
To run a single regression case casename, you'll issue the commands:
% gmake chkoutAt the sftp prompt, get the correct backstop file copied into the test load review directory:
(... a step to set up links to script(s) under test...)
%gmake links
% gmake CASE=casename casename
sftp> ^ZThe casename target will run a gmake diff step. That in turn will display either a ***PASSED*** or a ***FAILED*** on the log file $REGRESS/
% gmake CASE=casename backstop
% fg sftp> exit
<casename>_regr.log
.
We will discuss four scenarios, all of which look roughly like the one above:
We'll go over the steps in some detail for the first scenario, noting only differences for the other three. If changes involve new scripts, or changes to script names, refer to the "SPECIAL CASE" within the lr trio discussion.
% gmake chkoutThis checks out all the files needed for the regression tests into pool14. This is a volatile disk area, so they won't necessarily still be there the next time you go to run a regression. You can view them all at $REGRESS/../src/regress.
For each script that you want to test, set up a soft link in reg_script to the new code. For example, if you had made changes just to acis-backstop.pl and saa_checker.pl, you'd do
% pushd /data/acis/acisdude/reg_script
% ln -s /data/acis/LoadReviews/acis-backstop-V12.20.pl acis-backstop.pl
% ln -s /data/acis/LoadReviews/saa_checker-V45.5.pl saa_checker.pl
% popd (back to $REGRESS)
SPECIAL CASE IF YOU HAVE INTRODUCED A NEW SCRIPT, or changed the name of an old one: You will have to update the regression Makefile so that it will create the appropriate softlinks in the following "make links" step. See "Regression Makefile updates" near the tail end of this document.
%gmake linksFor scripts you haven't specified, this target will set soft links to the production versions. For lr, it will replace either your link to the code under test, or its own link to the production version, with a copy of lr in which the hard-coded pathnames to the production script area are swapped for pathnames to reg_script. It will do something similar for acis-backstop.pl, creating a copy just like the one you wanted to run, except that it will now look at a historically correct version of the .tln file to get its information about the parameter blocks called by the SI modes.
% gmake lr
This will run lr three times, once for each of our historical cases.
Each of these lr's will conduct its business on the directory
/data/acis/LoadReviews/yyyy/RG_mmmddyy/oflsL
, where the letter
L is taken from the last character of the casename, and the mmmddyy
from its first 7 characters.
As each case runs, lr will ask you for your username and password to lucky. Fill these in as you ordinarily would. Rather than a "get" command to sftp, though, you'll follow the instructions which will appear on your screen a little bit above the SFTP to lucky prompt.
sftp> ^ZWhen lr completes each case, the Makefile target will execute
% gmake CASE=casename backstop
% fg
[two carriage returns, to get the sftp prompt back]
sftp> exit
ALTERNATE STEP 4: Quick lr.
You can bypass most of the typing involved in this scenario by typing
% gmake lrqThis will start a python program which will take control of the lr script's stdin and stdout, and do almost all of your keyboard inputs for you. You will be asked once for your username on lucky. All the cases will then run automatically, except that once for each case you will be asked to input your password on lucky.
CAUTION: You will have a limited time to enter your password, after which sftp will time out, and you'll have to start everything over. A few seconds before the password is requested, three ASCII bell characters will be issued to the terminal. If your terminal can't sound a beep, you'll have to watch the screen carefully for prompts.
The gmake diff step will display either a ***PASSED*** or a
***FAILED*** on the log file
$REGRESS/<casename>_regr.log
.
on your screen. There will be one of these for each of the three
historical cases. If any of the comparisons have failed, examine the
file
$REGRESS/<casename>_regr.log
. It will
contain the full output of all the diffs performed for that case,
concatenated together, the expected lines denoted by a "<" and the
actual output denoted by ">".
This is the scenario that you will run after installing previously tested new code in production. Its sole function is to guarantee that something hasn't been badly busted, so it's content with running a single load. Because proper linkages out of lr are one of its central concerns, it does run lr, even if supposedly only backstop has changed.
It's also truly simple. Since there is no separate test version of any script to point to, there's no links setup.
% cd $REGRESS
% gmake sanity
If the only change is to acis-backstop.pl, the regression task is a lot simpler than it is for lr.
% setloads
% source ~/lr_test_source
% cd $REGRESS
% gmake realcleanThis will clean up any leftovers, and re-check everything out of CVS, and set up initial links to executables. A shortcut with the same effect is:
% gmake chkout
% gmake start
% pushd /data/acis/acisdude/reg_script
% rm acis-backstop.pl
% ln -s /when/pigsfly/acis-backstop.pl acis-backstop.pl
% popd % gmake links
% gmake backstops
regr.log
. If every pair of lines includes
a ***PASS***, the run was a success. If any includes a ***FAIL***,
look at
<casename>alldiffs
, which concatenates the results
of diffs on all the compared files. (See the discussion at
the end of
the lr trio text for a recommended shortcut.)
This gmake target will avoid lr, and run just the backstop script on the three historical cases. None of that pesky sftp'ing and gmake backstopping when you don't really need it. Then it will run the error coverage cases: aug0210x and aug0210y.
This runs five replan scenarios, and it's very similar to the lr trio (1.1). However, you have to provide a little more input at each step.
As each case begins, you'll see not only a "gmake CASE=" line, but
two other pieces of information:
How to respond to Y/N queries (with a 1 or a 2 in each case)
The start time for the load
Note the query responses.
You will enter the "gmake CASE=" line, as for the lr trio. Before you
type "quit" to the sftp prompt, cut the text for the start time. Then
type "quit", as for the lr trio.
a series of Y/N questions will appear. Answer with 1 or 2 as you were instructed. When queried for the start time, paste your saved text.
The remainder of this scenario will run in just the same way as the lr trio did.
Run this scenario when there's been a change to LRHS.
% cd $REGRESSThis will clean out any old regression test files, and check the latest ones out from CVS.
% gmake start
% pushd /data/acis/acisdude/reg_script % ln -s /somewhere/LRHS_Test.py LRHS % popd % gmake links
% gmake hands
_regr.log
. If every pair of lines includes
a ***PASS***, the run was a success. If any includes a ***FAIL***,
look at
<casename>alldiffs
, which concatenates the results
of diffs on all the compared files, in this scenario just
ACIS-LoadReview_HandS.txt. (See the discussion at
the end of
the lr trio text for a recommended shortcut.)
Various "gmake clean" targets clear out the $REGRESS directory, and
copy back in a fresh copy of the Makefile from
/data/acis/LoadReviews/script/lr_regress_Makefile
If you need to alter the Makefile temporarily, save a copy of the
current lr_regress_Makefile, place your desired version on
LoadReviews/script, run your tests, and put the original back in place.
% cvs commit lr_regress_MakefileIn particular, if you've added or changed the name of an executable, add or modify the corresponding softlink line under the target "links":
-@cd $(RSCRIP); ln -s $(SCRIP)/<scriptname> /<scriptname>The code just cited assumes the new script, or a link to it, is in place on LoadReviews/script. If it resides elsewhere, insert that path in the place of $(SCRIP).
At this juncture, the regression examines outputs only for lr, acis-backstop and H&S, and only for non-interrupt cases.
The Makefile generates numerous (ignored) error messages. Be brave and ignore them. It also generates a lot of chatter about what it's doing. Feedback on what parts of this chatter to suppress is welcome.