diff mbox

[testsuite] : Remove *.gdb files from testsuite dir

Message ID CAFULd4ZmohDxm5D16sDD71+RH5hLcCPh8spvEBvCuPFQ0w0hWQ@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Oct. 9, 2011, 7:38 p.m. UTC
Hello!

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

2011-10-09  Uros Bizjak  <ubizjak@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.

Comments

Uros Bizjak Oct. 10, 2011, 6:24 p.m. UTC | #1
On Sun, Oct 9, 2011 at 9:38 PM, Uros Bizjak <ubizjak@gmail.com> wrote:

> Attached patch removes *.gdb temporary files from testsuite directory.
>
> 2011-10-09  Uros Bizjak  <ubizjak@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?

I went ahead and install this patch to mainline SVN. It looks kind of
obvious, though.

Uros.
diff mbox

Patch

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
 }