TUnit Recent Updates

From TinyOS Wiki
Revision as of 11:17, 18 January 2008 by Dmoss (talk | contribs) (1/16/2008 : testrunner.extra)
Jump to: navigation, search

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.