# This harness is for tests that should be run at all optimisation levels.
|
# This harness is for tests that should be run at all optimisation levels.
|
|
|
load_lib gcc-dg.exp
|
load_lib gcc-dg.exp
|
load_lib gcc-gdb-test.exp
|
load_lib gcc-gdb-test.exp
|
|
|
# Disable on darwin until radr://7264615 is resolved.
|
# Disable on darwin until radr://7264615 is resolved.
|
if { [istarget *-*-darwin*] } {
|
if { [istarget *-*-darwin*] } {
|
return
|
return
|
}
|
}
|
|
|
proc check_guality {args} {
|
proc check_guality {args} {
|
set result [eval check_compile guality_check executable $args "-g -O0"]
|
set result [eval check_compile guality_check executable $args "-g -O0"]
|
set lines [lindex $result 0]
|
set lines [lindex $result 0]
|
set output [lindex $result 1]
|
set output [lindex $result 1]
|
set ret 0
|
set ret 0
|
if {[string match "" $lines]} {
|
if {[string match "" $lines]} {
|
set execout [gcc_load "./$output"]
|
set execout [gcc_load "./$output"]
|
set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
|
set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
|
}
|
}
|
remote_file build delete $output
|
remote_file build delete $output
|
return $ret
|
return $ret
|
}
|
}
|
|
|
dg-init
|
dg-init
|
|
|
global GDB
|
global GDB
|
if ![info exists ::env(GUALITY_GDB_NAME)] {
|
if ![info exists ::env(GUALITY_GDB_NAME)] {
|
if [info exists GDB] {
|
if [info exists GDB] {
|
set guality_gdb_name "$GDB"
|
set guality_gdb_name "$GDB"
|
} else {
|
} else {
|
set guality_gdb_name "[transform gdb]"
|
set guality_gdb_name "[transform gdb]"
|
}
|
}
|
setenv GUALITY_GDB_NAME "$guality_gdb_name"
|
setenv GUALITY_GDB_NAME "$guality_gdb_name"
|
}
|
}
|
|
|
if {[check_guality "
|
if {[check_guality "
|
#include \"$srcdir/$subdir/guality.h\"
|
#include \"$srcdir/$subdir/guality.h\"
|
volatile long int varl = 6;
|
volatile long int varl = 6;
|
int main (int argc, char *argv\[\])
|
int main (int argc, char *argv\[\])
|
{
|
{
|
GUALCHKVAL (varl);
|
GUALCHKVAL (varl);
|
return 0;
|
return 0;
|
}
|
}
|
"]} {
|
"]} {
|
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
|
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
|
}
|
}
|
|
|
if [info exists guality_gdb_name] {
|
if [info exists guality_gdb_name] {
|
unsetenv GUALITY_GDB_NAME
|
unsetenv GUALITY_GDB_NAME
|
}
|
}
|
|
|
dg-finish
|
dg-finish
|
|
|