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] Make build tree rm -rf'able again


Hi.

It's nice if a build tree is rm -rf'able (without the extra effort of
a chmod -R u+w first).
I've done that since time immemorial so it feels like it
should continue to work.
[Certainly some random hacking could leave the tree in a state
where rm -rf doesn't work, but the default case of configure, build, test
has been rm -rf'able since as long as I can remember.]

Thus I've committed this.

2013-11-12  Doug Evans  <dje@google.com>

	* gdb.base/fileio.exp: Make $dir2 writable after the test is done
	so that "rm -rf $builddir" Just Works.

diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index b9dfb38..f77218f 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -253,5 +253,10 @@ gdb_test continue \
 
 gdb_exit
 
+# Make dir2 writable again so rm -rf of a build tree Just Works.
+if {[file exists $dir2] && ![file writable $dir2]} {
+    system "chmod +w $dir2"
+}
+
 set timeout $oldtimeout
 return 0


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