Debian Codegraph @

gcc/testsuite/sarif-replay.dg/dg.exp

raw
1 # Copyright (C) 2023-2025 Free Software Foundation, Inc.
2
3 # This file is part of GCC.
4 #
5 # GCC is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU General Public License as published by the Free
7 # Software Foundation; either version 3, or (at your option) any later
8 # version.
9 #
10 # GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with GCC; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
18
19 # GCC testsuite that uses the `dg.exp' driver.
20
21 # Load support procs.
22 load_lib sarif-replay-dg.exp
23
24 global DEFAULT_SARIF_REPLAY_FLAGS
25 if [info exists DEFAULT_SARIF_REPLAY_FLAGS] then {
26 set save_default_sarif_replay_flags $DEFAULT_SARIF_REPLAY_FLAGS
27 }
28
29 # If a testcase doesn't have special options, use these.
30 set DEFAULT_SARIF_REPLAY_FLAGS "-fjson-comments -fdiagnostics-color=never"
31
32 # Initialize `dg'.
33 dg-init
34
35 # Main loop.
36 sarif-replay-dg-runtest [lsort \
37 [glob -nocomplain $srcdir/$subdir/*/*.sarif ] ] "" $DEFAULT_SARIF_REPLAY_FLAGS
38
39 # All done.
40 dg-finish
41
42 if [info exists save_default_sarif_replay_flags] {
43 set DEFAULT_SARIF_REPLAY_FLAGS $save_default_sarif_replay_flags
44 } else {
45 unset DEFAULT_SARIF_REPLAY_FLAGS
46 }