]>
Commit | Line | Data |
---|---|---|
8b26599c JJ |
1 | # This harness is for tests that should be run at all optimisation levels. |
2 | ||
3 | load_lib g++-dg.exp | |
4 | load_lib gcc-gdb-test.exp | |
5 | ||
6 | # Disable on darwin until radr://7264615 is resolved. | |
5c30094f | 7 | if { [istarget *-*-darwin*] } { |
8b26599c JJ |
8 | return |
9 | } | |
10 | ||
86ce925b DE |
11 | if { [istarget "powerpc-ibm-aix*"] } { |
12 | set torture_execute_xfail "powerpc-ibm-aix*" | |
13 | return | |
14 | } | |
15 | ||
8b26599c JJ |
16 | proc check_guality {args} { |
17 | set result [eval check_compile guality_check executable $args "-g -O0"] | |
18 | set lines [lindex $result 0] | |
19 | set output [lindex $result 1] | |
20 | set ret 0 | |
21 | if {[string match "" $lines]} { | |
22 | set execout [g++_load "./$output"] | |
23 | set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout] | |
24 | } | |
25 | remote_file build delete $output | |
26 | return $ret | |
27 | } | |
28 | ||
29 | dg-init | |
30 | ||
31 | global GDB | |
32 | if ![info exists ::env(GUALITY_GDB_NAME)] { | |
33 | if [info exists GDB] { | |
34 | set guality_gdb_name "$GDB" | |
35 | } else { | |
36 | set guality_gdb_name "[transform gdb]" | |
37 | } | |
38 | setenv GUALITY_GDB_NAME "$guality_gdb_name" | |
39 | } | |
40 | ||
41 | if {[check_guality " | |
42 | #include \"$srcdir/$subdir/guality.h\" | |
43 | volatile long int varl = 6; | |
44 | int main (int argc, char *argv\[\]) | |
45 | { | |
46 | GUALCHKVAL (varl); | |
47 | return 0; | |
48 | } | |
49 | "]} { | |
a03bd005 TS |
50 | gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] "" "" |
51 | gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] "" "" | |
8b26599c JJ |
52 | } |
53 | ||
54 | if [info exists guality_gdb_name] { | |
55 | unsetenv GUALITY_GDB_NAME | |
56 | } | |
57 | ||
58 | dg-finish |