This page describes how to run all the Level3 scriptlets. You might want to do this to discover any differences in test results between two builds of the RI. Several ANT and shell scripts will run all Level3 scriptlets and e-mail the results. Here are instructions on how to set everything up and a description of how it works.

All files are in

OCAPRI/trunk/ri/hnTestScripts

How to Run All Tests

Run the ANT script named "buildRx.xml".
It assumes:
1. The RI is built and RI environment variables are set.
2. Every scriptlet in Level3 is expected to run except for scripts which are listed in exclude_list.txt.  This list contains the rx scripts which have known issues.  

There is also a file called exclude_hn_wo_dvr_list.txt.  If testing an hn without dvr build, this file can be renamed to exclude_list.txt and only the rx scripts without dvr dependencies will be run.

Note that several parameters can be set for timeouts, whether or not to commit the results to SVN, and to e-mail results. See the code for details.

When to test? crontab

A chron job starts the tests.   It's responsibilities are to set the parameters for committing results and e-mailing the results. In the HN lab, another job periodically rebuilds the RI and runs CTP tests. When finished with the CTP tests, a file is touched as a signal for the scriptlets to begin. Below are the cron jobs.

# The normal run of the CTP tests on the trunk
30 17 * * * (. $HOME/.bashrc; rm \-rf $HOME/hnTestScripts;
svn export [https://community.cablelabs.com/svn/OCAPRI/trunk/ri/hnTestScripts] $HOME/hnTestScripts ;cd $HOME/hnTestScripts;
ant \-DcommitResult=true \-DOCAPRI_root=trunk \-DsimulatorMachine=192.168.56.101 \-DhnInterface=eth1
\-DexcludeUnreliable=false ) > $HOME/nightly_run.log 2>&1
\#
# The normal run of the Rx scriptlets on the trunk
45 23 * * * (. $HOME/.bashrc; cd $HOME/hnTestScripts;
ant \-f buildRx.xml \-DcommitResult=set   \-DemailResult=set \-DEmailRecipient=opencable-ri-hn@cablelabs.com)
> $HOME/Rx_nightly_run.log 2>&1
\#

How it works

Starting point:  ANT and buildRx.xml

Helper scripts: runRx.sh, commitRx.sh and emailRx.sh

The ANT script "buildRx.xml"

1. Waits until a file exists.  This is a signal that the RI Build is completed and CTP testing has finished.

2. Executes runRx.sh,  It creates a list of all level3 scriptlets.  Each scriptlet is executed.

3. When the last scriptlet is finished, and if an ANT property is set, the results file is commited to svn (see commitRx.sh).  To compare results between runs, or to find an old result, use the svn tools.

4. If an ANT property is set the results file is sent as the body of an email to an e-mail address (see emailRx.sh).  This address is also set by an ANT property.

  • No labels