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] - Rev 710

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

# This harness is for tests that should be run at all optimisation levels.

load_lib g++-dg.exp
load_lib gcc-gdb-test.exp

# Disable on darwin until radr://7264615 is resolved.
# Disable on Tru64 UNIX (PR testsuite/48251).
if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } {
  return
}

proc check_guality {args} {
    set result [eval check_compile guality_check executable $args "-g -O0"]
    set lines [lindex $result 0]
    set output [lindex $result 1]
    set ret 0
    if {[string match "" $lines]} {
      set execout [g++_load "./$output"]
      set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
    }
    remote_file build delete $output
    return $ret
}

dg-init

global GDB
if ![info exists ::env(GUALITY_GDB_NAME)] {
    if [info exists GDB] {
        set guality_gdb_name "$GDB"
    } else {
        set guality_gdb_name "[transform gdb]"
    }
    setenv GUALITY_GDB_NAME "$guality_gdb_name"
}

if {[check_guality "
  #include \"$srcdir/$subdir/guality.h\"
  volatile long int varl = 6;
  int main (int argc, char *argv\[\])
  {
    GUALCHKVAL (varl);
    return 0;
  }
"]} {
  gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] ""
  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] ""
}

if [info exists guality_gdb_name] {
    unsetenv GUALITY_GDB_NAME
}

dg-finish

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

powered by: WebSVN 2.1.0

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