Next: , Previous: , Up: Unit testing   [Contents][Index]

6.3 DejaGnu unit test protocol

DejaGnu spawns a unit test program and reads that program’s output. Arguments for the unit test program can be specified in the testsuite.

Unit test programs may produce any output for the benefit of a developer running them directly or reading the DejaGnu log, but output matching the Tcl regexp {\n\t[][[:upper:]]*:} (a tab character at the beginning of a line, followed by any sequence of uppercase letters and square brackets, followed by a colon) should be considered reserved for future extension. Future versions of DejaGnu will interpret more lines matching this pattern as additional unit test information.

-|        NOTE: text

This will cause text to be printed at verbose levels 2 and higher.

-|        PASSED: name

-|        FAILED: name

-|        XPASSED: name

-|        XFAILED: name

-|        UNTESTED: name

-|        UNRESOLVED: name

These indicate simple test results.

Note that all output from a unit test program, including the lines recognized and interpreted by DejaGnu, appears in the log.