return [gdb_compile ${src} ${binfile} "executable" ${options_opencl}]
}
-# Run a test on the target to check if it supports OpenCL. Return 0 if so, 1 if
+# Run a test on the target to check if it supports OpenCL. Return 1 if so, 0 if
# it does not.
-gdb_caching_proc skip_opencl_tests {
+gdb_caching_proc allow_opencl_tests {
global srcdir objdir subdir gdb_prompt
global inferior_exited_re
- set me "skip_opencl_tests"
+ set me "allow_opencl_tests"
# Set up, compile, and execute an OpenCL program. Include the current
# process ID in the file name of the executable to prevent conflicts with
if { [gdb_compile_opencl_hostapp "${clprogram}" "${executable}" "${compile_flags}" ] != "" } {
remote_file target delete ${clprogram}
- verbose "$me: compiling OpenCL binary failed, returning 1" 2
- return 1
+ verbose "$me: compiling OpenCL binary failed, returning 0" 2
+ return 0
}
# Compilation succeeded so now run it via gdb.
gdb_expect 30 {
-re ".*$inferior_exited_re normally.*${gdb_prompt} $" {
verbose -log "\n$me: OpenCL support detected"
- set result 0
+ set result 1
}
-re ".*$inferior_exited_re with code.*${gdb_prompt} $" {
verbose -log "\n$me: OpenCL support not detected"
- set result 1
+ set result 0
}
default {
verbose -log "\n$me OpenCL support not detected (default case)"
- set result 1
+ set result 0
}
}
gdb_exit