This is the mail archive of the gdb-patches@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]

[commit/testsuite] Clean up skip_cell_tests temp files


And a last patch for today; while testing on x86_64-linux I noticed a
growing number of temporary files in my object directory.  This patch
corrects the check that was supposed to clean them up.

Tested on x86_64-linux, checked in.

2009-11-12  Daniel Jacobowitz  <dan@codesourcery.com>

	* lib/cell.exp (skip_cell_tests): Clean up test files before
	returning.

---
 gdb/testsuite/lib/cell.exp |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Index: src/gdb/testsuite/lib/cell.exp
===================================================================
--- src.orig/gdb/testsuite/lib/cell.exp	2009-11-12 12:39:10.000000000 -0500
+++ src/gdb/testsuite/lib/cell.exp	2009-11-12 12:40:40.000000000 -0500
@@ -106,23 +106,28 @@ proc skip_cell_tests {} {
     verbose "$me:  compiling testfile $src" 2
     set compile_flags {debug nowarnings quiet}
 
+    set skip 0
     if { [gdb_compile_cell_spu $src_spu $exe_spu executable $compile_flags] != "" } {
         verbose "$me:  compiling spu binary failed, returning 1" 2
-        return [set skip_cell_tests_saved 1]
+	set skip 1
     }
-    if { [gdb_cell_embedspu $exe_spu $exe_spu-embed.o $compile_flags]  != "" } {
+    if { ! $skip && [gdb_cell_embedspu $exe_spu $exe_spu-embed.o $compile_flags]  != "" } {
         verbose "$me:  embedding spu binary failed, returning 1" 2
-        return [set skip_cell_tests_saved 1]
+	set skip 1
     }
-    if { [gdb_compile_cell_ppu [list $src $exe_spu-embed.o] $exe executable $compile_flags] != "" } {
+    if { ! $skip && [gdb_compile_cell_ppu [list $src $exe_spu-embed.o] $exe executable $compile_flags] != "" } {
         verbose "$me:  compiling ppu binary failed, returning 1" 2
-        return [set skip_cell_tests_saved 1]
+	set skip 1
     }
     file delete $src
     file delete $src_spu
     file delete $exe_spu
     file delete $exe_spu-embed.o
 
+    if { $skip } {
+        return [set skip_cell_tests_saved 1]
+    }
+
     # Compilation succeeded so now run it via gdb.
 
     gdb_exit

-- 
Daniel Jacobowitz
CodeSourcery


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