Difference between revisions of "TUnit Recent Updates"

From TinyOS Wiki
Jump to: navigation, search
Line 1: Line 1:
 +
== 1/10/2008 : Removed testrunner.extra ==
 +
 +
Due to an incompatibility issue Miklos brought up, we added tunit.extra to the tinyos-2.x/support/make directory which now has the line:
 +
 +
  CFLAGS += $(TUNITCFLAGS)
 +
 +
CFLAGS are now brought in through this TUNITCFLAGS variable, while still allowing .extra files to compile in with the rest of the system.  You can now compile most TUnit applications standalone by typing:
 +
 +
  $ make telosb tunit
 +
 +
The TUnit Java application will populate the TUNITCFLAGS variable through the suite.properties @cflags and @extra definitions. The resulting Make command line looks something like:
 +
 +
  '''suite.properties'''
 +
    @cflags -DLOW_POWER_LISTENING
 +
    @cflag CFLAGS+=-I../../
 +
 +
  $ make telosb tunit TUNITCFLAGS="-DLOW_POWER_LISTENING -I../../"
 +
 +
 
== 1/29/2008 : Failed logging output ==
 
== 1/29/2008 : Failed logging output ==
  

Revision as of 15:11, 10 March 2008

1/10/2008 : Removed testrunner.extra

Due to an incompatibility issue Miklos brought up, we added tunit.extra to the tinyos-2.x/support/make directory which now has the line:

 CFLAGS += $(TUNITCFLAGS)

CFLAGS are now brought in through this TUNITCFLAGS variable, while still allowing .extra files to compile in with the rest of the system. You can now compile most TUnit applications standalone by typing:

 $ make telosb tunit

The TUnit Java application will populate the TUNITCFLAGS variable through the suite.properties @cflags and @extra definitions. The resulting Make command line looks something like:

 suite.properties
   @cflags -DLOW_POWER_LISTENING
   @cflag CFLAGS+=-I../../
 $ make telosb tunit TUNITCFLAGS="-DLOW_POWER_LISTENING -I../../"


1/29/2008 : Failed logging output

Modified the way failure text is printed to the screen while executing TUnit to make it easier to read.

1/23/2008 : tunit.extra

Modified the tunit.extra file to reference directories from $(TOSCONTRIB)/tunit instead of $(TUNIT_BASE).

1/18/2008 : @extra / @cflags

Added a @cflags option to the suite.properties. The @extra option will now look for CFLAGS+=..., and if it finds it, will add it to the list of CFLAGS. All @cflags will be written to the testrunner.extra file, while the @extra options get written to the command line. Ideally, you should only reference .extra files with the @extra option. You can also make a local whatever.extra file and reference it from @extra whatever in suite.properties.

 The following all mean the same thing:
 
   @extra lpl
   @extras lpl
   @extra CFLAGS+=-DLOW_POWER_LISTENING
   @extras CFLAGS+=-DLOW_POWER_LISTENING
   @cflags -DLOW_POWER_LISTENING
   @cflag -DLOW_POWER_LISTENING
   @cflag CFLAGS+=-DLOW_POWER_LISTENING
   @cflags CFLAGS+=-DLOW_POWER_LISTENING

1/16/2008 : testrunner.extra

TUnit was having problems with @extra CFLAGS+=-I... being written to the make command line, while pulling in .extra files elsewhere. The .extra files wouldn't get accessed.

To solve this, TUnit now prevents CFLAGS+=-I... being written to the make command line. Instead, it writes a temporary file in your local directory called "testrunner.extra" which is deleted after the compile is complete.

To allow nesC to pull in this .extra file from your local application directory, you MUST have your TOSMAKE_PATH environment variable include ./ like this:

 export TOSMAKE_PATH="./"

Without doing this, TUnit will not be able to compile in the CFLAGS definitions from the locally created testrunner.extra file, and the compiler will complain about not being able to find TUnit library files like TestCaseC and TestCase.h.

1/16/2008 : PostEditHtml

  • The PostEditHtml Java application in tunit.jar (com.rincon.tunitposthtml.PostEditHtml) now provides the same command line arguments as TUnit itself, allowing you to select a report directory to post-edit.
  • The TOSCONTRIB environment variable is now looked for before the TUNIT_BASE environment variable, since TOSCONTRIB is default.
  • Added in initial 2 second delays during sf.connect() cycles to try to reduce the ping/pong dropped issues.

1/15/2008 : Line Numbers

TUnit now reports the filename and line number each assertion originated from. These line numbers are displayed for both successes and failures in the HTML reports and during execution.

TUnit also displays a list of failures at the end of execution that now include line numbers.