]> git.ipfire.org Git - thirdparty/gcc.git/blob - 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
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
6 How can you run the testsuite on selected tests?
7 ************************************************
8
9 In 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`
14 in the :samp:`gcc` subdirectory of the object directory. You can also
15 just run :samp:`make check` in a subdirectory of the object directory.
16
17 A more selective way to just run all :command:`gcc` execute tests in the
18 testsuite is to use
19
20 .. code-block:: bash
21
22 make check-gcc RUNTESTFLAGS="execute.exp other-options"
23
24 Likewise, in order to run only the :command:`g++` 'old-deja' tests in
25 the 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
31 The file-matching expression following :samp:`{filename}.exp=` is treated
32 as a series of whitespace-delimited glob expressions so that multiple patterns
33 may be passed, although any whitespace must either be escaped or surrounded by
34 single 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
41 The :samp:`*.exp` files are located in the testsuite directories of the GCC
42 source, the most important ones being :samp:`compile.exp`,
43 :samp:`execute.exp`, :samp:`dg.exp` and :samp:`old-deja.exp`.
44 To get a list of the possible :samp:`*.exp` files, pipe the
45 output of :samp:`make check` into a file and look at the
46 :samp:`Running ... .exp` lines.