* 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 cb9baa1..a123561 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 b9dfb38..f77218f 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