Hello!

Attached patch removes *.gdb temporary files from testsuite directory.

2011-10-09  Uros Bizjak  <ubiz...@gmail.com>

        * lib/gcc-gdb-test.exp (gdb-test): Delete $cmd_file before return.

Tested on x86_64-pc-linux-gnu {,-m32}. OK for mainline and branches?

Uros.
Index: gcc-gdb-test.exp
===================================================================
--- gcc-gdb-test.exp    (revision 179718)
+++ gcc-gdb-test.exp    (working copy)
@@ -56,6 +56,7 @@
     set res [remote_spawn target "$gdb_name -nx -nw -quiet -x $cmd_file 
./$output_file"]
     if { $res < 0 || $res == "" } {
        unsupported "$testname"
+       file delete $cmd_file
        return
     }
 
@@ -64,6 +65,7 @@
        -re "Unhandled dwarf expression|Error in sourced command file" {
            unsupported "$testname"
            remote_close target
+           file delete $cmd_file
            return
        }
        -re {[\n\r]\$1 = ([^\n\r]*)[\n\r]+\$2 = ([^\n\r]*)[\n\r]} {
@@ -76,16 +78,19 @@
                fail "$testname"
            }
            remote_close target
+           file delete $cmd_file
            return
        }
        timeout {
            unsupported "$testname"
            remote_close target
+           file delete $cmd_file
            return
        }
     }
 
+    unsupported "$testname"
     remote_close target
-    unsupported "$testname"
+    file delete $cmd_file
     return
 }

Reply via email to