xref: /netbsd-src/external/gpl3/gdb/dist/libctf/testsuite/libctf-regression/regression.exp (revision c9055873d0546e63388f027d3d7f85381cde0545)
1*c9055873Schristos# Copyright (C) 2021-2024 Free Software Foundation, Inc.
24b169a6bSchristos#
34b169a6bSchristos# This file is part of the GNU Binutils.
44b169a6bSchristos#
54b169a6bSchristos# This program is free software; you can redistribute it and/or modify
64b169a6bSchristos# it under the terms of the GNU General Public License as published by
74b169a6bSchristos# the Free Software Foundation; either version 3 of the License, or
84b169a6bSchristos# (at your option) any later version.
94b169a6bSchristos#
104b169a6bSchristos# This program is distributed in the hope that it will be useful,
114b169a6bSchristos# but WITHOUT ANY WARRANTY; without even the implied warranty of
124b169a6bSchristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
134b169a6bSchristos# GNU General Public License for more details.
144b169a6bSchristos#
154b169a6bSchristos# You should have received a copy of the GNU General Public License
164b169a6bSchristos# along with this program; if not, write to the Free Software
174b169a6bSchristos# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
184b169a6bSchristos# MA 02110-1301, USA.
194b169a6bSchristos#
204b169a6bSchristos
214b169a6bSchristosif {![check_ctf_available]} {
224b169a6bSchristos    unsupported "no CTF format support in the compiler"
234b169a6bSchristos    return 0
244b169a6bSchristos}
254b169a6bSchristos
264b169a6bSchristosif ![is_elf_format] {
274b169a6bSchristos    unsupported "CTF needs bfd changes to be emitted on non-ELF"
284b169a6bSchristos    return 0
294b169a6bSchristos}
304b169a6bSchristos
314b169a6bSchristosif {[info exists env(LC_ALL)]} {
324b169a6bSchristos    set old_lc_all $env(LC_ALL)
334b169a6bSchristos}
344b169a6bSchristosset env(LC_ALL) "C"
354b169a6bSchristos
364b169a6bSchristosset ctf_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.lk]]
374b169a6bSchristos
384b169a6bSchristosforeach ctf_test $ctf_test_list {
394b169a6bSchristos    verbose [file rootname $ctf_test]
404b169a6bSchristos    verbose running lookup test on $ctf_test
414b169a6bSchristos    run_lookup_test [file rootname $ctf_test]
424b169a6bSchristos}
434b169a6bSchristos
444b169a6bSchristosif {[info exists old_lc_all]} {
454b169a6bSchristos    set env(LC_ALL) $old_lc_all
464b169a6bSchristos} else {
474b169a6bSchristos    unset env(LC_ALL)
484b169a6bSchristos}
49