New procedures for setting up lab, installing software, and executing test cases

Labs: A, B 


Document created April xx, 20xx
Updated June xx, 20xx


This document describes how to set up labs A or B, download and install the software that is to be tested, and ship and execute test cases. The bulk of the smaller steps are automatically performed by the new set of automation tools, all of which are located in /home/tools/new/ on the TST machine in each lab.

Sequence of steps: (Note: You must complete each step in this sequence before continuing to the next step.)
1. Set up lab
        1a. Set up TST
        1b. Set up DL
2. Boot the lab
        2a. Automated boot (lab A only)
        2b. Manual boot (labs A and B)
3. Download software to Box
4. Install software/Execute tests
 

1. Set up lab

Note: You must perform both steps 1a and 1b.

1a. Set up TST

> login $LABID
> cd /home/tools/new
This is the directory in which you will perform the remainder of the steps in this document, unless specified.
> load [-a]

If reloading Config3, use "-a" option. (Config2 is default.)
This performs the following:
i. loadtool1
ii. loadtool2
iii. loadtool3 (lab A only)
iv. watch.log (lab A only) (This will save the log for this lab session into /tmp/log$SOFTWARE. Note that this log file will disappear when the lab is next reloaded.)
Wait for "completed" message.
1b. Set up DL
> setupdl
A list of questions will appear. You must answer each one.
"Enter version:"
Sample answer: 3.10
"Enter version to install:"
Sample answer: 3.12
"Enter pathname of logdetail:"
Sample answer: /lab/johndoe/log1
> set2
Wait for DL to come up.
After DL comes up, set up files in /app/vers3.4 if you have come up on version 3.40 or after.

2. Boot the lab

Note: For lab A, you must perform both steps 2a and 2b.

2a. Automated boot (lab A only)

> boot_a
This performs the following:
i. boottool1
ii. boottool2
iii. Sets environment variables.
Wait for "completed" message.
2b. Manual boot (labs A and B)
These are additional steps not covered by boot_a.

I. Start generator:

> startgen
Enter the following in sequence:
s (setrate) This allows you to change testcase rates.
h (half) Set to half load first.
Wait 30 seconds.
f (full) Set to full load.
q to exit.
II. Bring up links:
Login to MACH as user:
    > rlogin mach1 -l user
Go to /home/user/link:
    > cd `logdir user`/link
    > bringup labid=$LABID where $LABID is the lab name
The next command can be entered before the previous has finished, but only after the "dl comp" message appears in the output.
    > init 
Wait for "completed" message.
Return to previous directory:
    > cd /home/tools/new

3. Download software to Box.
Option 1: Directly to Box:

> copy $SOFTWARE [e-mail]

This performs the following:
i. Copies file to /tmp (file must have at least 644 permissions)
ii. Downloads $SOFTWARE to Box
iii. Entering an e-mail address as the 2nd argument will cause the tool to send you e-mail when download is finished
Wait for "completed" message.

Option 2: Download to Box via DL machine (dlmach):

Note: Because the software file is compressed before downloading, this procedure will be faster than direct downloading for larger file sizes.

> rlogin dlmach -l root
> ~team/tools/dl $SOFTWARE
This performs the following:
i. Copies ~testdir/$SOFTWARE to /download on dlmach (file must have at least 644 permissions)
ii. Compresses software file
iii. Downloads $SOFTWARE to Box
iv. Uncompresses software file on Box
Wait for "completed" message.
> exit


At the end of step 3, the software file should be completely downloaded to Box. It is now ready to be installed and tested.

4. Install software/Execute tests
> testscript [options]
This performs the following:
i. Allows you to generate a script (testscript.$LABID) specifying which testing steps you want done, in any order, any number of times. $LABID is the lab name.
ii. Sets generated script to executable.
iii. Automatically executes script, if desired ("-e" option)
iv. Automatically runs checks after Stage A.
v. If errors are generated, automatically looks for error type.
vi. Automatically executes error recovery appropriate to error type.
vii. Automatically re-starts script after error recovery.

Note: To kill a running script, type "kill testscript.$LABID" in the TST machine window.

Usage:
testscript [-x] [-w SUname] [-l] [-a SUname] [-b] [-r] [-s savename] [-e]

                Give these options in the order you want them executed. Some examples.

Option Function Required Argument
-x Wait for DL completion of software file download. Only use if you are downloading one software file at a time; if there are multiple "completed expansion" messages, the tool will not know which package you are looking for.  
-a
Starts install Stage A
Software filename
-b
Starts install Stage B

-w Waits for in-progress Stage A to finish Software filename
-l Waits for in-progress Stage B to finish  
-r Starts re-do of Stage A; will automatically use previous software filename given for -a option. If you are doing a second install with a new file, use -a instead.  
-s Saves installed software using savetool. (We are currently experiencing savetool problems with all version 3.x installations (file sizes often too large for automatic saves). Until this is fixed, save installed software manually.) Name to save as
-e Executes the created script automatically. If you don't want auto-execution, you must execute testscript.$LABID manually after running testscript.  
-h Help