testsuite: Fix some tests that write outside of the standard output directory

gdb/testsuite/ChangeLog:

	* gdb.base/wrong_frame_bt_full.exp: Use standard_output_file to
	define object file path.
	* gdb.btrace/gcore.exp: Use standard_output_file to define core
	file path.
	* lib/opencl.exp (gdb_compile_opencl_hostapp): Use
	standard_output_file to define binfile.
This commit is contained in:
Simon Marchi 2016-02-15 11:46:10 -05:00
parent 6439ea1a88
commit aa4803559b
4 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2016-02-15 Simon Marchi <simon.marchi@ericsson.com>
* gdb.base/wrong_frame_bt_full.exp: Use standard_output_file to
define object file path.
* gdb.btrace/gcore.exp: Use standard_output_file to define core
file path.
* lib/opencl.exp (gdb_compile_opencl_hostapp): Use
standard_output_file to define binfile.
2016-02-14 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compatibility with recent gfortran-5.3.1.

View File

@ -23,16 +23,17 @@
set main_testfile wrong_frame_bt_full-main
set opaque_testfile wrong_frame_bt_full-opaque
set opaque_objfile [standard_output_file "$opaque_testfile.o"]
if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \
$opaque_testfile.o \
$opaque_objfile \
object {}] != ""} {
untested "failed to compile $opaque_testfile.c"
return -1
}
if {[gdb_compile \
[list ${srcdir}/${subdir}/$main_testfile.c $opaque_testfile.o] \
[list ${srcdir}/${subdir}/$main_testfile.c $opaque_objfile] \
[standard_output_file ${main_testfile}] \
executable {debug}] != ""} {
untested "failed to build $main_testfile"

View File

@ -38,4 +38,5 @@ gdb_test "next" ".*main\.3.*"
gdb_test "record goto begin" ".*main\.2.*"
# generate a core file - this used to assert
gdb_test "generate-core-file core" "Saved corefile core"
set corefile [standard_output_file core]
gdb_test "generate-core-file $corefile" "Saved corefile $corefile"

View File

@ -21,7 +21,7 @@
proc gdb_compile_opencl_hostapp {clsource executable options} {
global srcdir objdir subdir
set src "${srcdir}/lib/cl_util.c ${srcdir}/lib/opencl_hostapp.c"
set binfile ${objdir}/${subdir}/${executable}
set binfile [standard_output_file ${executable}]
set compile_flags [concat additional_flags=-I${srcdir}/lib/ additional_flags=-DCL_SOURCE=$clsource]
set options_opencl [concat {debug} $compile_flags $options [list libs=-lOpenCL]]
return [gdb_compile ${src} ${binfile} "executable" ${options_opencl}]