]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gprofng/testsuite/gprofng.display/display.exp
gprofng: a new GNU profiler
[thirdparty/binutils-gdb.git] / gprofng / testsuite / gprofng.display / display.exp
1 # Copyright (C) 2021 Free Software Foundation, Inc.
2 #
3 # This file is part of the GNU Binutils.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
18 # MA 02110-1301, USA.
19 #
20
21 if {[info exists env(LC_ALL)]} {
22 set old_lc_all $env(LC_ALL)
23 }
24 set env(LC_ALL) "C"
25
26 set pltf [exec uname -i]
27 switch $pltf {
28 x86_64 {
29 # Columns in the table represent:
30 # dir cflags gprofflags Others
31 set table {
32 {"jsynprog" "-g -Wall" "-p on -j on"}
33 {"mttest" "" ""}
34 {"mttest" "-g -Wall" "-p on"}
35 {"mttest" "-g -O0" "-p on"}
36 {"mttest" "-g -O" "-p on"}
37 {"mttest" "-g -O" "-h on"}
38 {"mttest" "-g -O" "-h on"}
39 {"mttest" "-g -O" "-p on -h on"}
40 {"synprog" "" ""}
41 {"synprog" "-g" "-p on"}
42 {"synprog" "-g -O0" "-p on"}
43 {"synprog" "-g -O" "-p on"}
44 {"synprog" "-g" "-p on -h on"}
45 {"synprog" "-g -O0" "-p on -h on"}
46 {"synprog" "-g -O" "-p on -h on"}
47 }
48 }
49 aarch64 {
50 set table {
51 {"jsynprog" "-g -Wall" "-p on -j on"}
52 {"mttest" "" ""}
53 {"mttest" "-g -Wall" "-p on"}
54 {"mttest" "-g -O0" "-p on"}
55 {"mttest" "-g -O" "-p on"}
56 {"synprog" "" ""}
57 {"synprog" "-g" "-p on"}
58 {"synprog" "-g -O" "-p on"}
59 }
60 }
61 default {
62 # Columns in the table represent:
63 # dir cflags gprofflags Others
64 set table {
65 {"mttest" "" ""}
66 {"synprog" "" ""}
67 }
68 }
69 }
70
71 foreach line $table {
72 set dir [lindex $line 0]
73 set cflags [lindex $line 1]
74 set gprofflags [lindex $line 2]
75
76 verbose [file rootname $line]
77 verbose running display test $line
78 run_display_test $dir $cflags $gprofflags
79 }
80
81
82 if {[info exists old_lc_all]} {
83 set env(LC_ALL) $old_lc_all
84 } else {
85 unset env(LC_ALL)
86 }