How can you run the testsuite on selected tests?#
In order to run sets of tests selectively, there are targets
make check-gcc
and language specific make check-c
,
make check-c++
, make check-d
make check-fortran
,
make check-ada
, make check-objc
, make check-obj-c++
,
make check-lto
in the gcc
subdirectory of the object directory. You can also
just run make check
in a subdirectory of the object directory.
A more selective way to just run all gcc execute tests in the testsuite is to use
make check-gcc RUNTESTFLAGS="execute.exp other-options"
Likewise, in order to run only the g++ ‘old-deja’ tests in
the testsuite with filenames matching 9805*
, you would use
make check-g++ RUNTESTFLAGS="old-deja.exp=9805* other-options"
The file-matching expression following filename.exp=
is treated
as a series of whitespace-delimited glob expressions so that multiple patterns
may be passed, although any whitespace must either be escaped or surrounded by
single quotes if multiple expressions are desired. For example,
make check-g++ RUNTESTFLAGS="old-deja.exp=9805*\ virtual2.c other-options"
make check-g++ RUNTESTFLAGS="'old-deja.exp=9805* virtual2.c' other-options"
The *.exp
files are located in the testsuite directories of the GCC
source, the most important ones being compile.exp
,
execute.exp
, dg.exp
and old-deja.exp
.
To get a list of the possible *.exp
files, pipe the
output of make check
into a file and look at the
Running ... .exp
lines.