Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

5.3.1.  Example: Short test names.

DejaGnu will log the name of each file of expect code found in the test directory. However by default it will use the full file name, which can make for hard to read listings.

This can be adjusted by redefining RUNTESTDEFAULTFLAGS in configure.ac.

# The following line will ensure that short names are used for test names.
RUNTESTDEFAULTFLAGS="--tool \$\$tool"
AC_SUBST(RUNTESTDEFAULTFLAGS)
	  

By not defining --srcdir on the command line, runtest will look instead in the local configuration file, automatically generated by automake and autoconf, which includes a definition of the global variable srcdir.

This is useful, because in the local configuration file, the srcdir is specified with its relative name (for example ../../testsuite). This is shorter than the value of $srcdir that would be used as the command line value. The result is that the name of the tests run will be shorter, making for clearer output. Instead of:

                === or1ksim tests ===

Schedule of variations:
    unix

Running target unix
Using ../../testsuite/config/unix.exp as board description file for target.
Running /home/jeremy/svntrunk/Projects/or1ksim/testsuite/or1ksim.tests/basic
.exp ...
Running /home/jeremy/svntrunk/Projects/or1ksim/testsuite/or1ksim.tests/cache
.exp ...

...

Running /home/jeremy/svntrunk/Projects/or1ksim/testsuite/or1ksim.tests/mycom
press.exp ...
Running /home/jeremy/svntrunk/Projects/or1ksim/testsuite/or1ksim.tests/tick.
exp ...

                === or1ksim Summary ===

# of expected passes            21
	  

We get the more concise:

                === or1ksim tests ===

Schedule of variations:
    unix

Running target unix
Using ../../testsuite/config/unix.exp as board description file for target.
Running ../../testsuite/or1ksim.tests/basic.exp ...
Running ../../testsuite/or1ksim.tests/cache.exp ...

...

Running ../../testsuite/or1ksim.tests/mycompress.exp ...
Running ../../testsuite/or1ksim.tests/tick.exp ...

                === or1ksim Summary ===

# of expected passes            21
	  
Embecosm divider strip