gccint: Torture Tests
1
1 7.9 Support for torture testing using multiple options
1 ======================================================
1
1 Throughout the compiler testsuite there are several directories whose
1 tests are run multiple times, each with a different set of options.
1 These are known as torture tests. 'lib/torture-options.exp' defines
1 procedures to set up these lists:
1
1 'torture-init'
1 Initialize use of torture lists.
1 'set-torture-options'
1 Set lists of torture options to use for tests with and without
1 loops. Optionally combine a set of torture options with a set of
1 other options, as is done with Objective-C runtime options.
1 'torture-finish'
1 Finalize use of torture lists.
1
1 The '.exp' file for a set of tests that use torture options must
1 include calls to these three procedures if:
1
1 * It calls 'gcc-dg-runtest' and overrides DG_TORTURE_OPTIONS.
1
1 * It calls ${TOOL}'-torture' or ${TOOL}'-torture-execute', where TOOL
1 is 'c', 'fortran', or 'objc'.
1
1 * It calls 'dg-pch'.
1
1 It is not necessary for a '.exp' file that calls 'gcc-dg-runtest' to
1 call the torture procedures if the tests should use the list in
1 DG_TORTURE_OPTIONS defined in 'gcc-dg.exp'.
1
1 Most uses of torture options can override the default lists by defining
1 TORTURE_OPTIONS or add to the default list by defining
1 ADDITIONAL_TORTURE_OPTIONS. Define these in a '.dejagnurc' file or add
1 them to the 'site.exp' file; for example
1
1 set ADDITIONAL_TORTURE_OPTIONS [list \
1 { -O2 -ftree-loop-linear } \
1 { -O2 -fpeel-loops } ]
1