Difference between revisions of "Suite.properties"
(New page: The suite.properties file optionally exists in any directory. As TUnit traverses through sub-directories, it parses each suite.properties file it finds, creating rules to filter out Test ...) |
|||
Line 19: | Line 19: | ||
* '''<code>@mintargets <# of minimum targets for heterogeneous network testing></code>''': The minimum number of targets required for this test to run. For example, this could be used to ensure your test runs on a MicaZ and TelosB, testing the compatibility between the two. | * '''<code>@mintargets <# of minimum targets for heterogeneous network testing></code>''': The minimum number of targets required for this test to run. For example, this could be used to ensure your test runs on a MicaZ and TelosB, testing the compatibility between the two. | ||
− | * '''<code>@timeout <minutes></code>''': Default is 1 minute. | + | * '''<code>@timeout <minutes></code>''': Default is 1 minute. If your test is expected to run for more than 1 minute, increase the timeout time. Be sure you call .done() in your embedded test so TUnit knows when your test is done executing! |
* '''<code>@skip</code>''': Skip this test and any tests in sub-directories. | * '''<code>@skip</code>''': Skip this test and any tests in sub-directories. | ||
Line 34: | Line 34: | ||
== Examples == | == Examples == | ||
+ | |||
+ | I want to run this test on a single platform, I don't care what type it is. | ||
+ | |||
+ | @exactnodes 1 | ||
+ | |||
+ | |||
+ | This test should run on exactly 1 telosb platform. | ||
+ | |||
+ | @exactnodes 1 | ||
+ | @only telosb | ||
+ | |||
+ | |||
+ | This test should run on any platform but a mica2dot. | ||
+ | |||
+ | @ignore mica2dot | ||
+ | |||
+ | |||
+ | This test should run on at least 2 platforms, but make sure they're either a micaz or a telosb (or both). | ||
+ | |||
+ | @exactnodes 2 | ||
+ | @only telosb | ||
+ | @only micaz | ||
+ | |||
+ | |||
+ | This test should run on at least 2 platforms, and they have to be different from each other. Make sure they're a micaz and a telosb to test the CC2420 radio communications. | ||
+ | |||
+ | @exactnodes 2 | ||
+ | @mintargets 2 | ||
+ | @only micaz | ||
+ | @only telosb | ||
+ | |||
+ | |||
+ | This test and any tests below this directory should be skipped completely. | ||
+ | |||
+ | @skip | ||
+ | |||
+ | |||
+ | This test must run on a minimum of 3 nodes, but is flexible enough to grow up to a maximum of 10 nodes. The test is considered broken if it runs longer than 3 minutes. | ||
+ | |||
+ | @minnodes 3 | ||
+ | @maxnodes 10 | ||
+ | @timeout 3 | ||
+ | |||
+ | |||
+ | Some TestCase's in this Test Suite make a bunch of assertions all at once. We also want to include a directory from somewhere else, only use custom tmote1100 platforms, and enable SPI0 DMA on that MSP430 microcontroller. I don't care how many nodes run in this test, as long as there are at least 2. | ||
+ | |||
+ | @extra CFLAGS+=-DENABLE_SPI0_DMA | ||
+ | @extra CFLAGS+=-I../../blaze/tos/platforms/tmote1100 | ||
+ | @only tmote1100 | ||
+ | @minnodes 2 | ||
+ | @assertions 20 |
Revision as of 16:11, 21 December 2007
The suite.properties file optionally exists in any directory. As TUnit traverses through sub-directories, it parses each suite.properties file it finds, creating rules to filter out Test Suites if they don't apply to the current combination of hardware being tested.
Keywords
@assertions
: The number of assertions to queue up on the embedded side. As assertions are made, they cannot be spilled out over the serial port as fast as they are generated. The TUnit embedded library queues up assertions and multi-packet fail messages and sends them when it can. The default number of assertions is 5. If you bump this up, be aware that your RAM consumption will increase on your node.
@extra <any build/install extras>
: (@extras also works) Add in any command line arguments for compiling. You can use this, for example, to pull in .extra files from support/make, or define compile flags with no spaces such asCFLAGS+=-DLOW_POWER_LISTENING
orCFLAGS+=-I../library/to/include
. @extra options get aggregated together as TUnit traverses into sub-directories.
@ignore <single target>
: Ignore one or multiple platform targets that should never run this test.
@only <single target>
: Specify one or multiple platform targets that apply to this test, and don't allow any others.
@minnodes <# nodes>
: The minimum number of nodes this test will allow.
@maxnodes <# nodes>
: The maximum number of nodes this test will allow.
@exactnodes <# of exact nodes>
: The exact nodes required for this test to run.
@mintargets <# of minimum targets for heterogeneous network testing>
: The minimum number of targets required for this test to run. For example, this could be used to ensure your test runs on a MicaZ and TelosB, testing the compatibility between the two.
@timeout <minutes>
: Default is 1 minute. If your test is expected to run for more than 1 minute, increase the timeout time. Be sure you call .done() in your embedded test so TUnit knows when your test is done executing!
@skip
: Skip this test and any tests in sub-directories.
Available, but not put to use:
@author <author(s)>
: Not used by TUnit in any meaningful way right now, this was intended to allow TUnit to create formal documentation on all the tests it has available.
@testname <optional testname>
: Not used by TUnit in any meaningful way right now, this was intended to allow TUnit to create formal documentation on all the tests it has available.
@description <optional, multiline description>
: Not used by TUnit in any meaningful way right now, this was intended to allow TUnit to create formal documentation on all the tests it has available.
Examples
I want to run this test on a single platform, I don't care what type it is.
@exactnodes 1
This test should run on exactly 1 telosb platform.
@exactnodes 1 @only telosb
This test should run on any platform but a mica2dot.
@ignore mica2dot
This test should run on at least 2 platforms, but make sure they're either a micaz or a telosb (or both).
@exactnodes 2 @only telosb @only micaz
This test should run on at least 2 platforms, and they have to be different from each other. Make sure they're a micaz and a telosb to test the CC2420 radio communications.
@exactnodes 2 @mintargets 2 @only micaz @only telosb
This test and any tests below this directory should be skipped completely.
@skip
This test must run on a minimum of 3 nodes, but is flexible enough to grow up to a maximum of 10 nodes. The test is considered broken if it runs longer than 3 minutes.
@minnodes 3 @maxnodes 10 @timeout 3
Some TestCase's in this Test Suite make a bunch of assertions all at once. We also want to include a directory from somewhere else, only use custom tmote1100 platforms, and enable SPI0 DMA on that MSP430 microcontroller. I don't care how many nodes run in this test, as long as there are at least 2.
@extra CFLAGS+=-DENABLE_SPI0_DMA @extra CFLAGS+=-I../../blaze/tos/platforms/tmote1100 @only tmote1100 @minnodes 2 @assertions 20