aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2008-05-15 16:59:21 +0000
committerJanis Johnson <janis@gcc.gnu.org>2008-05-15 16:59:21 +0000
commit91a5b3943e8999959d65206ae75ae63d488ffa43 (patch)
tree2ffbd01efc340633337eba4c40af7b02847eb65f /gcc/doc
parent3044d369519284bc36ef3f1e15335e34f28c0860 (diff)
downloadgcc-91a5b3943e8999959d65206ae75ae63d488ffa43.zip
gcc-91a5b3943e8999959d65206ae75ae63d488ffa43.tar.gz
gcc-91a5b3943e8999959d65206ae75ae63d488ffa43.tar.bz2
libgomp.exp: Load torture-options.exp from gcc lib.
libgomp: * testsuite/lib/libgomp.exp: Load torture-options.exp from gcc lib. gcc/doc: * doc/sourcebuild.texi: Document support for torture tests. gcc/testsuite: * lib/torture-options.exp: New support for torture options. * lib/gfortran-dg.exp (gfortran-dg-runtest): Use new torture procs. * lib/c-torture.exp: Define C_TORTURE_OPTIONS instead of TORTURE_OPTIONS; don't define torture_with_loops and torture_without_loops. * lib/gcc-dg.exp: Define DG_TORTURE_OPTIONS instead of TORTURE_OPTIONS; don't define torture_with_loops and torture_without_loops. (gcc-dg-runtest): Use new torture procs if no torture options defined. * lib/fortran-torture.exp: Define FORTRAN_TORTURE_OPTIONS instead of TORTURE_OPTIONS. (fortran-torture-execute): Use torture_with_loops instead of TORTURE_OPTIONS. (fortran-torture): Ditto. * lib/objc-torture.exp: Define OBJC_TORTURE_OPTIONS instead of TORTURE_OPTIONS; don't define torture_with_loops and torture_without_loops. * gcc.c-torture/execute/execute.exp: Use new torture procs. * gcc.c-torture/execute/builtins/builtins.exp: Ditto. * gcc.c-torture/execute/ieee/ieee.exp: Ditto. * gcc.c-torture/unsorted/unsorted.exp: Ditto. * gfortran.fortran-torture/execute/execute.exp: Ditto. * gfortran.fortran-torture/compile/compile.exp: Ditto. * gcc.target/x86_64/abi/abi-x86_64.exp: Ditto. * gcc.target/i386/math-torture/math-torture.exp: Define MATH_TORTURE_OPTIONS, use new torture procs. * gcc.dg/pch/pch.exp: Use new torture procs. * gcc.dg/format/format.exp: Ditto. * gcc.misc-tests/i386-prefetch.exp: Ditto. * gcc.misc-tests/dectest.exp: Ditto. * objc.dg/pch/pch.exp: Ditto. * objc/execute/execute.exp: Ditto. * objc/execute/exceptions/exceptions.exp: Ditto. * objc/compile/compile.exp: Ditto. From-SVN: r135381
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/sourcebuild.texi41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 896190c..6c551aa 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -822,6 +822,7 @@ here; FIXME: document the others.
* gcov Testing:: Support for testing gcov.
* profopt Testing:: Support for testing profile-directed optimizations.
* compat Testing:: Support for testing binary compatibility.
+* Torture Tests:: Support for torture testing using multiple options.
@end menu
@node Test Idioms
@@ -1531,3 +1532,43 @@ This command can be used in a secondary source file to specify that
compilation is expected to fail for particular options on particular
targets.
@end table
+
+@node Torture Tests
+@subsection Support for torture testing using multiple options
+
+Throughout the compiler testsuite there are several directories whose
+tests are run multiple times, each with a different set of options.
+These are known as torture tests.
+@file{gcc/testsuite/lib/torture-options.exp} defines procedures to
+set up these lists:
+
+@table @code
+@item torture-init
+Initialize use of torture lists.
+@item set-torture-options
+Set lists of torture options to use for tests with and without loops.
+Optionally combine a set of torture options with a set of other
+options, as is done with Objective-C runtime options.
+@item torture-finish
+Finalize use of torture lists.
+@end table
+
+The @file{.exp} file for a set of tests that use torture options must
+include calls to these three procecures if:
+
+@itemize bullet
+@item It calls @code{gcc-dg-runtest} and overrides @var{DG_TORTURE_OPTIONS}.
+
+@item It calls @var{$@{tool@}}@code{-torture} or
+@var{$@{tool@}}@code{-torture-execute}, where @var{tool} is @code{c},
+@code{fortran}, or @code{objc}.
+
+@item It calls @code{dg-pch}.
+@end itemize
+
+It is not necessary for a @file{.exp} file that calls @code{gcc-dg-runtest}
+to call the torture procedures if the tests should use the list in
+@var{DG_TORTURE_OPTIONS} defined in @file{gcc-dg.exp}.
+
+Most uses of torture options can override the default lists by defining
+@var{TORTURE_OPTIONS} in a @file{.dejagnurc} file.