Debian Codegraph @

gcc/testsuite/gcc.src/maintainers.exp

raw
1 # Copyright (C) 2018-2025 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with GCC; see the file COPYING3. If not see
15 # <http://www.gnu.org/licenses/>.
16
17 load_lib "target-supports.exp"
18
19 proc gcc_src_run_maintainers_verify_sh {} {
20 set script check-MAINTAINERS.py
21
22 global srcdir
23 set rootdir $srcdir/../..
24 set contrib $rootdir/contrib
25 set maintainers $rootdir/MAINTAINERS
26
27 if { ![check_effective_target_recent_python3] } {
28 unsupported "$script recent python3 is missing"
29 return
30 }
31
32 if { ![check_effective_target_python3_module "unidecode"] } {
33 unsupported "$script 'unidecode' python3 module is missing"
34 return
35 }
36
37
38 set result [remote_exec host $contrib/$script $maintainers]
39 set status [lindex $result 0]
40 if { $status == 0 } then {
41 pass "$script"
42 } else {
43 send_log "$result\n"
44 fail "$script"
45 }
46 }
47
48 if ![gcc_parallel_test_run_p maintainers] {
49 return
50 }
51 gcc_parallel_test_enable 0
52 gcc_src_run_maintainers_verify_sh
53 gcc_parallel_test_enable 1