As part of the development process, CableLabs has set up a "Continuous Integration Build and Test" environment using Cruise Control (http://cruisecontrol.sourceforge.net/) - a free, open source software continuous integration tool and framework.

To setup your own Cruise Control instance:

  • Download and install Cruise Control (from http://cruisecontrol.sourceforge.net/download.html).
  • Set the cygwin environment variables:
    TGSHELL_HOME=C:/csweeney/TGShell
    ECLIPSE_HOME=C:/eclipse-3.7
    ANT_HOME=C:/apache-ant-1.8.1
    CC_HOME=C:/cruisecontrol-bin-2.8.4
    JAVA_HOME=C:/Java/jdk1.6.0_22
    HOME=/cygdrive/c/csweeney
    HOMEDRIVE=C:
    MVN_HOME=C:\apache-maven-2.2.1
    FINDBUGS_HOME=C:/findbugs-2.0.1-rc2
    TDK_HOME=C:\Documents and Settings\csweeney\.cats\tdk
     
  • In an appropriate subdirectory, checkout the configuration files:
svn co https://community.cablelabs.com/svn/OCAPRI/trunk/cruise_control_support ./ 
  • checkout the trunk:
svn co -N https://community.cablelabs.com/svn/OCAPRI
cd OCAPRI
./checkout_dev_env.sh trunk
cd ../
  • Startup Cruise Control (currently in C:\csweeney\svn\cruise_control_support, though the exact path should not matter). From a cygwin shell:
cd /cygdrive/c/csweeney/svn/cruise_control_support
./start_cc.sh

Leave the shell window open.  (To stop the application, run ./stop_cc.sh from another cygwin shell window)

Overview of How Cruise Control is Configured

There are currently eight "projects" configured:

  • OCAPRI-trunk (build on every, or nearly every, commit)
  • SDK  (only done on SDK changes. So, not since 2010).
  • nightly.build.1.smoketest
  • nightly.build.2.lint   (I disabled this owing to constant build failure and false positives)
  • nightly.build.3.findbugs
  • nightly.build.4.ifsim
  • nightly.build.5.verifyStubs
  • lint-forceOnly  (not run, ordinarily)

Top level configuration is contained in the config.xml file (Cruise Control's default configuration file).
The trunk build is configured to perform a build/smoketest sequence to insure that recent svn commits have not "broken the build".
The nightly build performs more testing and analysis (which takes longer).
The lint-forceOnly runs lint and publishes the results - this allows developers to run PC-Lint (we have a license) and view the results.   

Nightly Build
The nightly build is configured to run every night starting at 8:00 PM.
The build is run by ant, and controlled by the configuration file nightly-build.xml.
The build/test steps are:

  • update (from svn)
  • clean
  • purge
  • build
  • construct the installer package
  • checksum the installer package
  • run findBugs
  • run smoketest
  • run junit tests
  • run the ifsSim tests
  • run verifyStubs
  • stage result files for publication
  • run lint (disabled)
  • cleanup

Individual builds can be disabled by commenting out the build targets in config.xml.
Results are published to both the local cruise control instance and the CableLabs download server: http://ri.opencable.com/ri/builds/nightly/ (in a subdirectory corresponding to the svn revision/id).

Trunk Build
The trunk build is configured to run "nearly every svn commit".
Multiple commits may be included due to the amount of time it takes to build and test the RI.
The build is run by ant, and controlled by the configuration file cc-build.xml.
The build/test steps are:

  • update (from svn)
  • clean
  • purge
  • build
  • construct the installer package
  • checksum the installer package
  • run smoketest
  • cleanup

Results are published to both the local cruise control instance and the CableLabs download server: http://ri.opencable.com/ri/builds/head/.

SDK Build
The SDK build is configured to run only when the SDK is updated. Which is to say, never anymore.
The build is run by ant, and controlled by the configuration file sdk-build.xml.
The build updates the CableLabs SDK update site: http://ri.opencable.com/sdk/updates/eclipse.3.4.2/head/


findbugs Details

Results can be viewed in a browser at C:\csweeney\sandbox\OCAPRI\trunk\ri\RI_Stack\ocap-bugs.html or perhaps in http://ri.opencable.com/ri/builds/nightly/svn.{build_id}/ocap-bugs.html
Click the gray bars to drill down:
 

Add findbugs excludes (errors to be ignored) ~csweeney/sandbox/OCAPRI/trunk/ri/RI_Stack/findbugs_excludes.xml (Consult engineer and findbugs docs to know whether an error is "real" or not).
Cross reference error with findbugs codes, http://findbugs.sourceforge.net/bugDescriptions.html. In this case the code is "REC".  Add to findbugs.excludes.xml:

     <Match>
        <!-- Examined code, findbugs report is incorrect -->
        <Class name="org.cablelabs.impl.ocap.hn.upnp.srs.RecordingContentItemLocal" />
        <Method name="updateRecordingRequestMetadataValues" />
        <Bug code="REC" />
    </Match>

Findbugs can also be run manually: java -jar $FINDBUGS_HOME/lib/findbugs.jar  


verifyStubs Details
This build mostly attempts to verify the javadoc in the stubs with the actual source files.
There are a few discrepancies, kept in the known_diffs directory.
Files are located at ~csweeney/sandbox/OCAPRI/trunk/common/tools/stublet
The included diff files are referenced in rip_api.xml. Obsolete ones can be commented out or removed.
Source files can be altered to match the stub, if the difference is just with javadoc. Other changes would need to be engineered.
 


  • No labels