OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [guality/] [guality.exp] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
# 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.
7
# Disable on Tru64 UNIX (PR testsuite/48251).
8
if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } {
9
  return
10
}
11
 
12
proc check_guality {args} {
13
    set result [eval check_compile guality_check executable $args "-g -O0"]
14
    set lines [lindex $result 0]
15
    set output [lindex $result 1]
16
    set ret 0
17
    if {[string match "" $lines]} {
18
      set execout [g++_load "./$output"]
19
      set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
20
    }
21
    remote_file build delete $output
22
    return $ret
23
}
24
 
25
dg-init
26
 
27
global GDB
28
if ![info exists ::env(GUALITY_GDB_NAME)] {
29
    if [info exists GDB] {
30
        set guality_gdb_name "$GDB"
31
    } else {
32
        set guality_gdb_name "[transform gdb]"
33
    }
34
    setenv GUALITY_GDB_NAME "$guality_gdb_name"
35
}
36
 
37
if {[check_guality "
38
  #include \"$srcdir/$subdir/guality.h\"
39
  volatile long int varl = 6;
40
  int main (int argc, char *argv\[\])
41
  {
42
    GUALCHKVAL (varl);
43
    return 0;
44
  }
45
"]} {
46
  gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] ""
47
  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] ""
48
}
49
 
50
if [info exists guality_gdb_name] {
51
    unsetenv GUALITY_GDB_NAME
52
}
53
 
54
dg-finish

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.