Skip to content
Snippets Groups Projects
Commit 1081262a authored by janis's avatar janis
Browse files

2004-08-10 Janis Johnson <janis187@us.ibm.com>

	* doc/sourcebuild.texi (compat testing): Document available test
	framework commands.  Use the preferred spelling of DejaGnu.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85768 138bc75d-0d04-0410-961f-82ee72b054a4
parent bfc1f9c1
No related branches found
No related tags found
No related merge requests found
2004-08-10 Janis Johnson <janis187@us.ibm.com>
* doc/sourcebuild.texi (compat testing): Document available test
framework commands. Use the preferred spelling of DejaGnu.
2004-08-10 Daniel Berlin <dberlin@dberlin.org> 2004-08-10 Daniel Berlin <dberlin@dberlin.org>
* lambda.h: Add matrix type, and prototypes for remainder of * lambda.h: Add matrix type, and prototypes for remainder of
......
...@@ -1072,7 +1072,7 @@ Language-independent support for testing @command{gcov}, and for checking ...@@ -1072,7 +1072,7 @@ Language-independent support for testing @command{gcov}, and for checking
that branch profiling produces expected values, is provided by the that branch profiling produces expected values, is provided by the
expect file @file{gcov.exp}. @command{gcov} tests also rely on procedures expect file @file{gcov.exp}. @command{gcov} tests also rely on procedures
in @file{gcc.dg.exp} to compile and run the test program. A typical in @file{gcc.dg.exp} to compile and run the test program. A typical
@command{gcov} test contains the following DejaGNU commands within comments: @command{gcov} test contains the following DejaGnu commands within comments:
@smallexample @smallexample
@{ dg-options "-fprofile-arcs -ftest-coverage" @} @{ dg-options "-fprofile-arcs -ftest-coverage" @}
...@@ -1201,9 +1201,10 @@ Within each test, the main program and one functional piece are ...@@ -1201,9 +1201,10 @@ Within each test, the main program and one functional piece are
compiled by the GCC under test. The other piece can be compiled by compiled by the GCC under test. The other piece can be compiled by
an alternate compiler. If no alternate compiler is specified, an alternate compiler. If no alternate compiler is specified,
then all three source files are all compiled by the GCC under test. then all three source files are all compiled by the GCC under test.
It's also possible to specify a pair of lists of compiler options, You can specify pairs of sets of compiler options. The first element
one list for each compiler, so that each test will be compiled with of such a pair specifies options used with the GCC under test, and the
each pair of options. second element of the pair specifies options used with the alternate
compiler. Each test is compiled with each pair of options.
@file{compat.exp} defines default pairs of compiler options. @file{compat.exp} defines default pairs of compiler options.
These can be overridden by defining the environment variable These can be overridden by defining the environment variable
...@@ -1224,11 +1225,13 @@ built a second time using @code{-fpic} by the compiler under test ...@@ -1224,11 +1225,13 @@ built a second time using @code{-fpic} by the compiler under test
and @code{-fPIC -O2} by the alternate compiler. and @code{-fPIC -O2} by the alternate compiler.
An alternate compiler is specified by defining an environment An alternate compiler is specified by defining an environment
variable; for C++ define @env{ALT_CXX_UNDER_TEST} to be the full variable to be the full pathname of an installed compiler; for C
pathname of an installed compiler. That will be written to the define @env{ALT_CC_UNDER_TEST}, and for C++ define
@file{site.exp} file used by DejaGNU. The default is to build each @env{ALT_CXX_UNDER_TEST}. These will be written to the
@file{site.exp} file used by DejaGnu. The default is to build each
test with the compiler under test using the first of each pair of test with the compiler under test using the first of each pair of
compiler options from @env{COMPAT_OPTIONS}. When compiler options from @env{COMPAT_OPTIONS}. When
@env{ALT_CC_UNDER_TEST} or
@env{ALT_CXX_UNDER_TEST} is @code{same}, each test is built using @env{ALT_CXX_UNDER_TEST} is @code{same}, each test is built using
the compiler under test but with combinations of the options from the compiler under test but with combinations of the options from
@env{COMPAT_OPTIONS}. @env{COMPAT_OPTIONS}.
...@@ -1253,3 +1256,23 @@ runtime support. A test that fails for the alternate compiler but ...@@ -1253,3 +1256,23 @@ runtime support. A test that fails for the alternate compiler but
passes for the compiler under test probably tests for a bug that was passes for the compiler under test probably tests for a bug that was
fixed in the compiler under test but is present in the alternate fixed in the compiler under test but is present in the alternate
compiler. compiler.
The binary compatibility tests support a small number of test framework
commands that appear within comments in a test file.
@table @code
@item dg-require-*
These commands can be used in @file{@var{testname}_main.@var{suffix}}
to skip the test if specific support is not available on the target.
@item dg-options
The specified options are used for compiling this particular source
file, appended to the options from @env{COMPAT_OPTIONS}. When this
command appears in @file{@var{testname}_main.@var{suffix}} the options
are also used to link the test program.
@item dg-xfail-if
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment