DejaGnu

The GNU Testing Framework

Rob Savoye

Free Software Foundation

Table of Contents
Abstract
1. Overview
1.1. What is DejaGnu ?
1.2. What's New In This Release
1.2.1. NT Support
1.3. Design Goals
1.4. A POSIX conforming test framework
2. Running Tests
2.1. Make check
2.2. Runtest
2.2.1. Output States
2.2.2. Invoking Runtest
2.2.3. Common Options
2.3. The files DejaGnu produces.
2.3.1. Summary File
2.3.2. Log File
2.3.3. Debug Log File
3. Customizing DejaGnu
3.1. Local Config File
3.2. Global Config File
3.3. Board Config File
3.4. Remote Host Testing
3.5. Config File Values
3.5.1. Command Line Option Variables
3.5.2. Personal Config File
4. Extending DejaGnu
4.1. Adding A New Test Suite
4.2. Adding A New Tool
4.3. Adding A New Target
4.4. Adding A New Board
4.5. Board Config File Values
4.6. Writing A Test Case
4.7. Debugging A Test Case
4.8. Adding A Test Case To A Test Suite.
4.9. Hints On Writing A Test Case
4.10. Special variables used by test cases.
5. Unit Testing
5.1. What Is Unit Testing ?
5.2. The dejagnu.h Header File
6. Reference
6.1. Obtaining DejaGnu
6.2. Installation
6.2.1. Configuring DejaGnu
6.2.2. Installing DejaGnu
6.3. Builtin Procedures
6.3.1. Core Internal Procedures
6.3.2. Procedures For Remote Communication
6.3.3. Procedures For Using Utilities to Connect
6.3.4. Procedures For Target Boards
6.3.5. Target Database Procedures
6.3.6. Platform Dependant Procedures
6.3.7. Utility Procedures
6.3.8. Libgloss, A Free BSP
6.3.9. Procedures for debugging your Tcl code.
6.4. File Map
7. Unit Testing API
7.1. C Unit Testing API
7.1.1. Pass Function
7.1.2. Fail Function
7.1.3. Untested Function
7.1.4. Unresolved Function
7.1.5. Totals Function
7.2. C++ Unit Testing API
7.2.1. Pass Method
7.2.2. Fail Method
7.2.3. Untested Method
7.2.4. Unresolved Method
7.2.5. Totals Method
List of Tables
3-1. Tcl Variables For Command Line Options
4-1. Common Board Info Fields
4-2. Board Info Fields For GCC & GDB
List of Examples
2-1. Here is a short sample summary log
2-2. Here is a brief example showing a detailed log for G++ tests
2-3. The log messages begin with a message of the form
2-4. Here is an excerpt from the debugging log for a GDB test:
3-1. The first section starts with
3-2. The first section ends with this line
3-3. Local Config File
3-4. Global Config file
3-5. Board Config File
3-6. Remote host setup
3-7. Add The Board Directory
3-8. Setup Cross Remote Testing
3-9. Setup Native Remote Testing
3-10. Run Test Remotely
3-11. Run a Test Remotely
3-12. Personal Config File
4-1. Sample Makefile.in Fragment
4-2. Simple Batch Program Tool Init File
4-3. Simple Interactive Program Tool Init File
4-4. Testing A New Tool Config
4-5. Example Test Case Run
4-6. Testing a New Board Config File
4-7. Example Board Config File
6-1. Specifying the conditional xfail data