* gdb.base/fileio.exp: Make $dir2 writable after the test is done
authorDoug Evans <dje@google.com>
Tue, 12 Nov 2013 22:27:04 +0000 (14:27 -0800)
committerDoug Evans <dje@google.com>
Tue, 12 Nov 2013 22:27:04 +0000 (14:27 -0800)
so that "rm -rf $builddir" Just Works.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/fileio.exp

index cb9baa15ae88c2926bad9c17f4bc1743cba90d42..a123561d7ba6d411bcbbcb99f111eb4b8241a62b 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2013-11-12  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.ada/mi_exc_info: New testcase.
index b9dfb38a2124d55b4f9f439ee855fcc1b05886e4..f77218fe77ba9927da26680945c6988c5459f03f 100644 (file)
@@ -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