1 # This harness is
for tests that should be run at all optimisation levels.
4 load_lib gcc
-gdb
-test.exp
6 # Disable
on darwin until radr
://7264615 is resolved.
7 if { [istarget
*-*-darwin
*] } {
11 if { [istarget
"powerpc-ibm-aix*"] } {
12 set torture_execute_xfail
"powerpc-ibm-aix*"
16 proc check_guality
{args} {
17 # Don
't count check_guality as PASS, or FAIL etc., that would make
18 # the total PASS count dependent on how many parallel runtest invocations
19 # ran guality.exp. So save the counts first and restore them afterwards.
21 array set saved_test_counts [array get test_counts]
22 set result [eval check_compile guality_check executable $args "-g -O0"]
23 set lines [lindex $result 0]
24 set output [lindex $result 1]
26 if {[string match "" $lines]} {
27 set execout [gcc_load "./$output"]
28 set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
30 remote_file build delete $output
31 array set test_counts [array get saved_test_counts]
38 if ![info exists ::env(GUALITY_GDB_NAME)] {
39 if [info exists GDB] {
40 set guality_gdb_name "$GDB"
41 } elseif [file exists $rootme/../gdb/gdb] {
42 # If we're doing a combined build
, and gdb is available
, use it.
43 set guality_gdb_name
"$rootme/../gdb/gdb"
45 set guality_gdb_name
"[transform gdb]"
47 setenv GUALITY_GDB_NAME
"$guality_gdb_name"
49 report_gdb
[exec which $
::env
(GUALITY_GDB_NAME
)] [info script
]
52 #
include \"$srcdir
/$subdir
/guality.h
\"
53 volatile long
int varl
= 6;
54 int main
(int argc
, char
*argv\
[\
])
60 gcc
-dg
-runtest
[lsort
[glob $srcdir
/$subdir
/*.c
]] "" ""
61 gcc
-dg
-runtest
[lsort
[glob $srcdir
/c
-c
++-common
/guality
/*.c
]] "" "-Wc++-compat"
64 if [info exists guality_gdb_name
] {
65 unsetenv GUALITY_GDB_NAME