-# Copyright 2010, 2011 Free Software Foundation, Inc.
+# Copyright 2010-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it does not.
proc skip_opencl_tests {} {
global skip_opencl_tests_saved srcdir objdir subdir gdb_prompt
+ global inferior_exited_re
# Use the cached value, if it exists. Cache value per "board" to handle
# runs with multiple options (e.g. unix/{-m32,-64}) correctly.
verbose "$me: compiling OpenCL test app" 2
set compile_flags {debug nowarnings quiet}
- if { [gdb_compile_opencl_hostapp "${clprogram}" "${executable}" "" ] != "" } {
+ if { [gdb_compile_opencl_hostapp "${clprogram}" "${executable}" "${compile_flags}" ] != "" } {
verbose "$me: compiling OpenCL binary failed, returning 1" 2
return [set skip_opencl_tests_saved($board) 1]
}
clean_restart "$executable"
gdb_run_cmd
gdb_expect 30 {
- -re ".*Program exited normally.*${gdb_prompt} $" {
+ -re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
verbose -log "\n$me: OpenCL support detected"
set skip_opencl_tests_saved($board) 0
}
- -re ".*Program exited with code.*${gdb_prompt} $" {
+ -re ".*$inferior_exited_re code.*${gdb_prompt} $" {
verbose -log "\n$me: OpenCL support not detected"
set skip_opencl_tests_saved($board) 1
}