Next: , Previous: , Up: Extending DejaGnu  

4.8 Adding a test case to a testsuite

There are two slightly different ways to add a test case. One is to add the test case to an existing directory. The other is to create a new directory to hold your test. The existing test directories represent several styles of testing, all of which are slightly different. Examine the testsuite subdirectories for the tool of interest to see which approach is most suitable.

Adding a GCC test may be very simple: just add the source file to any test directory beginning with gcc. and it will be tested on the next test run.

Adding a test by creating a new directory involves:

  1. Create the new directory. All subdirectory names begin with the name of the tool to test; e.g. G++ tests might be in a directory called g++.other. There can be multiple testsuite subdirectories with the same tool name prefix.
  2. Add the new test case to the directory, as above.