This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] testsuite: Fix some tests that write outside of the standard output directory


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aa4803559b046ab4691965f8a4ceed1037b37629

commit aa4803559b046ab4691965f8a4ceed1037b37629
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Mon Feb 15 11:46:10 2016 -0500

    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.

Diff:
---
 gdb/testsuite/ChangeLog                        | 9 +++++++++
 gdb/testsuite/gdb.base/wrong_frame_bt_full.exp | 5 +++--
 gdb/testsuite/gdb.btrace/gcore.exp             | 3 ++-
 gdb/testsuite/lib/opencl.exp                   | 2 +-
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a44cba2..d945411 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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.
diff --git a/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp b/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
index a763470..cc4d879 100644
--- a/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
+++ b/gdb/testsuite/gdb.base/wrong_frame_bt_full.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.btrace/gcore.exp b/gdb/testsuite/gdb.btrace/gcore.exp
index dead9c9..3eef2a1 100644
--- a/gdb/testsuite/gdb.btrace/gcore.exp
+++ b/gdb/testsuite/gdb.btrace/gcore.exp
@@ -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"
diff --git a/gdb/testsuite/lib/opencl.exp b/gdb/testsuite/lib/opencl.exp
index 11f3194..2feed8b 100644
--- a/gdb/testsuite/lib/opencl.exp
+++ b/gdb/testsuite/lib/opencl.exp
@@ -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}]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]