]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/doc/install/how-can-you-run-the-testsuite-on-selected-tests.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / install / how-can-you-run-the-testsuite-on-selected-tests.rst
CommitLineData
c63539ff
ML
1..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6How can you run the testsuite on selected tests?
7************************************************
8
9In order to run sets of tests selectively, there are targets
10:samp:`make check-gcc` and language specific :samp:`make check-c`,
11:samp:`make check-c++`, :samp:`make check-d` :samp:`make check-fortran`,
12:samp:`make check-ada`, :samp:`make check-objc`, :samp:`make check-obj-c++`,
13:samp:`make check-lto`
14in the :samp:`gcc` subdirectory of the object directory. You can also
15just run :samp:`make check` in a subdirectory of the object directory.
16
17A more selective way to just run all :command:`gcc` execute tests in the
18testsuite is to use
19
20.. code-block:: bash
21
22 make check-gcc RUNTESTFLAGS="execute.exp other-options"
23
24Likewise, in order to run only the :command:`g++` 'old-deja' tests in
25the testsuite with filenames matching :samp:`9805*`, you would use
26
27.. code-block:: bash
28
29 make check-g++ RUNTESTFLAGS="old-deja.exp=9805* other-options"
30
31The file-matching expression following :samp:`{filename}.exp=` is treated
32as a series of whitespace-delimited glob expressions so that multiple patterns
33may be passed, although any whitespace must either be escaped or surrounded by
34single quotes if multiple expressions are desired. For example,
35
36.. code-block:: bash
37
38 make check-g++ RUNTESTFLAGS="old-deja.exp=9805*\ virtual2.c other-options"
39 make check-g++ RUNTESTFLAGS="'old-deja.exp=9805* virtual2.c' other-options"
40
41The :samp:`*.exp` files are located in the testsuite directories of the GCC
42source, the most important ones being :samp:`compile.exp`,
43:samp:`execute.exp`, :samp:`dg.exp` and :samp:`old-deja.exp`.
44To get a list of the possible :samp:`*.exp` files, pipe the
45output of :samp:`make check` into a file and look at the
3ed1b4ce 46:samp:`Running ... .exp` lines.