Difference between revisions of "Setting up TUnit"
(→Minimum Requirements) |
|||
Line 7: | Line 7: | ||
* [http://ant.apache.org/ Ant] is completely '''optional''', but may be used to generate [http://www.lavalampmotemasters.com/reports/html/index.html nicer looking HTML reports]. | * [http://ant.apache.org/ Ant] is completely '''optional''', but may be used to generate [http://www.lavalampmotemasters.com/reports/html/index.html nicer looking HTML reports]. | ||
− | + | === Simplistic Directory Structure === | |
Your projects and directories may differ. On the [http://www.lavalampmotemasters.com/ automated unit testing] server, the tinyos-2.x and tinyos-2.x-contrib directories are located in a simplistic structure: | Your projects and directories may differ. On the [http://www.lavalampmotemasters.com/ automated unit testing] server, the tinyos-2.x and tinyos-2.x-contrib directories are located in a simplistic structure: | ||
Line 15: | Line 15: | ||
|-- tinyos-2.x-contrib | |-- tinyos-2.x-contrib | ||
+ | === Complex Directory Structure === | ||
In my own private projects, I prefer a more complex structure: | In my own private projects, I prefer a more complex structure: | ||
Line 26: | Line 27: | ||
| | | | ||
|-- tinyos-2.x-contrib | |-- tinyos-2.x-contrib | ||
+ | |||
For the remainder of this setup guide, I will assume your TinyOS is setup in the simplistic structure, with directories located at /opt/tinyos-2.x and /opt/tinyos-2.x-contrib. | For the remainder of this setup guide, I will assume your TinyOS is setup in the simplistic structure, with directories located at /opt/tinyos-2.x and /opt/tinyos-2.x-contrib. |
Revision as of 10:07, 10 January 2008
Contents
Minimum Requirements
The minimum requirements are:
- Install the latest tinyos-2.x, or get it from the repository.
- Check out a copy of the latest tinyos-2.x-contrib repository (instructions here).
- Ant is completely optional, but may be used to generate nicer looking HTML reports.
Simplistic Directory Structure
Your projects and directories may differ. On the automated unit testing server, the tinyos-2.x and tinyos-2.x-contrib directories are located in a simplistic structure:
opt |-- tinyos-2.x |-- tinyos-2.x-contrib
Complex Directory Structure
In my own private projects, I prefer a more complex structure:
opt |-- myProject | |-- tinyos-2.x <-- A snapshot of TinyOS my project is compatible with | |-- tests | | |-- ... bunch of sub-test directories... | |-- tinyos-2.x-myProject <-- Project's files that override the TinyOS baseline | |-- tinyos-2.x-contrib
For the remainder of this setup guide, I will assume your TinyOS is setup in the simplistic structure, with directories located at /opt/tinyos-2.x and /opt/tinyos-2.x-contrib.
Environment Variables
TOSCONTRIB
TUnit needs to know where the tinyos-2.x-contrib is located so it may find the tinyos-2.x-contrib/tunit directory. Because TUnit is driven by a Java application, the TOSCONTRIB path must be absolute so Java can locate the directory.
Linux export TOSCONTRIB=/opt/tinyos-2.x-contrib
Windows/Cygwin export TOSCONTRIB="`cygpath -w /opt/tinyos-2.x-contrib`"
CLASSPATH
Your classpath must be updated to include tunit.jar and all of its dependencies.
Linux export LOG4J=$TOSCONTRIB/tunit/support/sdk/tunit/depends/log4j.jar export TUNIT=$TOSCONTRIB/tunit/support/sdk/tunit/tunit.jar export XERCES=$TOSCONTRIB/tunit/support/sdk/tunit/depends/xerces.jar export JFREECHART=$TOSCONTRIB/tunit/support/sdk/tunit/depends/jfreechart-1.0.5.jar export JCOMMON=$TOSCONTRIB/tunit/support/sdk/tunit/depends/jcommon-1.0.9.jar export CLASSPATH="${CLASSPATH}:${LOG4J}:${TUNIT}:${XERCES}:${JFREECHART}:${JCOMMON}:."
Windows/Cygwin export LOG4J="`cygpath -w $TOSCONTRIB/tunit/support/sdk/tunit/depends/log4j.jar`" export TUNIT="`cygpath -w $TOSCONTRIB/tunit/support/sdk/tunit/tunit.jar`" export XERCES="`cygpath -w $TOSCONTRIB/tunit/support/sdk/tunit/depends/xerces.jar`" export JFREECHART="`cygpath -w $TOSCONTRIB/tunit/support/sdk/tunit/depends/jfreechart-1.0.5.jar`" export JCOMMON="`cygpath -w $TOSCONTRIB/tunit/support/sdk/tunit/depends/jcommon-1.0.9.jar`" export CLASSPATH="${CLASSPATH};${LOG4J};${TUNIT};${XERCES};${JFREECHART};${JCOMMON};."