Difference between revisions of "Tunit.xml"

From TinyOS Wiki
Jump to: navigation, search
(See Also)
 
(6 intermediate revisions by the same user not shown)
Line 23: Line 23:
 
   <mote target="telosb" motecom="serial@COM6:tmote" installextras="bsl,5" buildextras="lpl" />
 
   <mote target="telosb" motecom="serial@COM6:tmote" installextras="bsl,5" buildextras="lpl" />
 
    
 
    
   '''target''' is the name of the platform used at compile time, like ''tmote'' or ''iris''
+
   '''target''' is the name of the platform used at compile time, like ''telosb'' or ''iris'' or ''micaz''
   '''motecom''' describes how to connect using serial forwarder
+
   '''motecom''' describes how to connect and talk to the mote using serial forwarder
 
   '''installextras''' are optionally anything else to include in the make command for installing the program to the node
 
   '''installextras''' are optionally anything else to include in the make command for installing the program to the node
 
   '''buildextras''' are optionally anything else to always include in the make command for compiling the program
 
   '''buildextras''' are optionally anything else to always include in the make command for compiling the program
Line 34: Line 34:
 
   [serial forwarder] -comm serial@COM6:tmote -port 9000
 
   [serial forwarder] -comm serial@COM6:tmote -port 9000
  
 +
== Examples ==
  
== Examples ==
+
=== Single Nodes ===
  
 
Setup a test run for a telosb or tmote platform currently connected to your computer:
 
Setup a test run for a telosb or tmote platform currently connected to your computer:
Line 50: Line 51:
 
   </testrun>
 
   </testrun>
  
 +
 +
=== Multiple Nodes ===
  
 
Run tests that apply to two telosb's. The application will compile a single time since the two platforms and compile time options do not differ.
 
Run tests that apply to two telosb's. The application will compile a single time since the two platforms and compile time options do not differ.
Line 59: Line 62:
 
    
 
    
 
   Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
 
   Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
     make telosb
+
     $ make telosb
     make telosb reinstall.0 bsl,5
+
     $ make telosb reinstall.0 bsl,5
     make telosb reinstall.1 bsl,6
+
     $ make telosb reinstall.1 bsl,6
     [serial forwarder] -comm serial@COM6:tmote -port 9000
+
     $ [serial forwarder] -comm serial@COM6:tmote -port 9000
     [serial forwarder] -comm serial@COM7:tmote -port 9001
+
     $ [serial forwarder] -comm serial@COM7:tmote -port 9001
  
  
Line 74: Line 77:
 
    
 
    
 
   Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
 
   Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
     make telosb
+
     $ make telosb
     make telosb reinstall.0 bsl,5
+
     $ make telosb reinstall.0 bsl,5
     make micaz
+
     $ make micaz
     make micaz reinstall.1 mib510,/dev/ttyS9
+
     $ make micaz reinstall.1 mib510,/dev/ttyS9
     [serial forwarder] -comm serial@COM6:tmote -port 9000
+
     $ [serial forwarder] -comm serial@COM6:tmote -port 9000
     [serial forwarder] -comm serial@COM11:micaz -port 9001
+
     $ [serial forwarder] -comm serial@COM11:micaz -port 9001
  
 +
 +
=== Differing Compile Time Options ===
  
 
Run a test with two telosb's, but include an extra compile flag for one of the platforms.  Because the compile-time options differ, the application will be compiled once for each platform:
 
Run a test with two telosb's, but include an extra compile flag for one of the platforms.  Because the compile-time options differ, the application will be compiled once for each platform:
 
  
 
   <testrun name="single_micaz">
 
   <testrun name="single_micaz">
Line 91: Line 95:
 
    
 
    
 
   Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
 
   Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
     make telosb
+
     $ make telosb
     make telosb reinstall.0 bsl,5
+
     $ make telosb reinstall.0 bsl,5
     make telosb lpl
+
     $ make telosb lpl
     make telosb reinstall.1 bsl,6
+
     $ make telosb reinstall.1 bsl,6
     [serial forwarder] -comm serial@COM6:tmote -port 9000
+
     $ [serial forwarder] -comm serial@COM6:tmote -port 9000
     [serial forwarder] -comm serial@COM7:tmote -port 9001
+
     $ [serial forwarder] -comm serial@COM7:tmote -port 9001
 +
 
 +
= See Also =
 +
 
 +
* [[TUnit]]
 +
* [[Setting up TUnit]]
 +
* [[TUnit Test Flow]]
 +
* [[Flow of TUnit Java Execution]]

Latest revision as of 09:03, 15 January 2008

The tunit.xml file is the file responsible for telling TUnit which physical hardware platforms are attached to the computer. This includes information about which combinations of hardware to test, how to program them, how to talk to them, and any special compile flags necessary for that particular platform or test run.

TUnit comes with an example tunit.xml file with the name tunit_example.xml. Developers must create their own tunit.xml file to describe their hardware connected to the computer.

Each time the hardware connected to the computer is changed, the tunit.xml file must be updated to reflect the latest hardware.

Structure

Test Runs

The tunit.xml file is divided up into several Test Runs containing one or more mote hardware platforms to test. Each Test Run is given a name which is used to identify tests that failed.

 <tunit>
   <testrun name="tmote">
     ...
   </testrun>
 </tunit>

Motes

Inside of each Test Run, individual hardware is identified within the mote tags. The mote tag may take several arguments, some of which are optional:

 <mote target="telosb" motecom="serial@COM6:tmote" installextras="bsl,5" buildextras="lpl" />
 
 target is the name of the platform used at compile time, like telosb or iris or micaz
 motecom describes how to connect and talk to the mote using serial forwarder
 installextras are optionally anything else to include in the make command for installing the program to the node
 buildextras are optionally anything else to always include in the make command for compiling the program

The above <mote ... /> line would translate into the equivalent command-line commands:

 make telosb lpl
 make telosb reinstall.0 bsl,5
 [serial forwarder] -comm serial@COM6:tmote -port 9000

Examples

Single Nodes

Setup a test run for a telosb or tmote platform currently connected to your computer:

 <testrun name="single_telosb">
   <mote target="telosb" motecom="serial@COM6:tmote" installextras="bsl,5" />
 </testrun>


Setup a test run for a micaz platform:

 <testrun name="single_micaz">
   <mote target="micaz" motecom="serial@COM11:micaz" installextras="mib510,/dev/ttyS9" />
 </testrun>


Multiple Nodes

Run tests that apply to two telosb's. The application will compile a single time since the two platforms and compile time options do not differ.

 <testrun name="single_micaz">
   <mote target="telosb" motecom="serial@COM6:tmote" installextras="bsl,5" />
   <mote target="telosb" motecom="serial@COM7:tmote" installextras="bsl,6" />
 </testrun>
 
 Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
   $ make telosb
   $ make telosb reinstall.0 bsl,5
   $ make telosb reinstall.1 bsl,6
   $ [serial forwarder] -comm serial@COM6:tmote -port 9000
   $ [serial forwarder] -comm serial@COM7:tmote -port 9001


Run tests that apply to both a telosb and a micaz. The application will be compiled once for each different platform, for a total of 2 compilations. The telosb, being the first mote entry of the test run, is the Driving Node of the test:

 <testrun name="single_micaz">
   <mote target="telosb" motecom="serial@COM6:tmote" installextras="bsl,5" />
   <mote target="micaz" motecom="serial@COM11:micaz" installextras="mib510,/dev/ttyS9" />
 </testrun>
 
 Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
   $ make telosb
   $ make telosb reinstall.0 bsl,5
   $ make micaz
   $ make micaz reinstall.1 mib510,/dev/ttyS9
   $ [serial forwarder] -comm serial@COM6:tmote -port 9000
   $ [serial forwarder] -comm serial@COM11:micaz -port 9001


Differing Compile Time Options

Run a test with two telosb's, but include an extra compile flag for one of the platforms. Because the compile-time options differ, the application will be compiled once for each platform:

 <testrun name="single_micaz">
   <mote target="telosb" motecom="serial@COM6:tmote" installextras="bsl,5" />
   <mote target="telosb" motecom="serial@COM7:tmote" installextras="bsl,6" buildextras="lpl" />
 </testrun>
 
 Equivalent command-line commands TUnit uses for compiling and installing test applications for this test run:
   $ make telosb
   $ make telosb reinstall.0 bsl,5
   $ make telosb lpl
   $ make telosb reinstall.1 bsl,6
   $ [serial forwarder] -comm serial@COM6:tmote -port 9000
   $ [serial forwarder] -comm serial@COM7:tmote -port 9001

See Also