Test Run

From TinyOS Wiki
Jump to: navigation, search

A Test Run is a combination of nodes to test in TUnit. In the following tunit.xml example, there are two Test Runs defined.

 <tunit>
   <testrun name="1_tmote">
     <mote target="tmote" motecom="serial@COM6:tmote" installextras="bsl,5" />
   </testrun>
   
   <testrun name="tmote_and_micaz">
     <mote target="tmote" motecom="serial@COM6:tmote" installextras="bsl,5"/>
     <mote target="micaz" motecom="serial@COM11:micaz" installextras="mib510,/dev/ttyS9"/>
   </testrun>
 </tunit>


When TUnit executes the first Test Run, "1_tmote", it will only compile and run tests that apply to a single TMote hardware. TUnit will run all tests that apply to the first Test Run before moving onto the second Test Run.

The second Test Run, "tmote_and_micaz", tells TUnit about a second node that's connected to the computer. TUnit will compile and install the test onto the TMote Driving Node, and then recompile and install the test for the MicaZ Supporting Node. The second compilation is necessary because the TMote and MicaZ hardware is different, and TUnit knows it. Otherwise, if the hardware were identical, TUnit would have simply compiled once and "reinstalled" the image on both hardware platforms.