]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite: Cleanup some temp dirs with gdb-index files
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 14 May 2021 12:53:19 +0000 (14:53 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 14 May 2021 15:49:25 +0000 (17:49 +0200)
After the gdb test-suite runs there are some files
left in /tmp/tmp*/*.gdb-index, remove those files
and the directory at the end of the test case.

gdb/testsuite:
2021-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

* gdb.base/index-cache.exp: Cleanup $cache_dir/*.gdb-index and
remove the directory.
* gdb.dwarf2/per-bfd-sharing.exp: Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/index-cache.exp
gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp

index fbe2d216066a691b5d5d0af61d90e84bed1c8ef9..c723a9a0a8e41ec46257f1428a4c9b225efd1b6b 100644 (file)
@@ -1,3 +1,9 @@
+2021-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       * gdb.base/index-cache.exp: Cleanup $cache_dir/*.gdb-index and
+       remove the directory.
+       * gdb.dwarf2/per-bfd-sharing.exp: Likewise.
+
 2021-05-14  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
 
        * gdb.python/py-inferior.exp: Add test cases for 'connection_num'.
index 13d5532ad331b170ec15e5432f32573666670fc5..0daf7bbb0866b037647b36e0ff2d36cc9dfe9791 100644 (file)
@@ -226,3 +226,14 @@ test_cache_enabled_hit $cache_dir
 # Test again with the cache disabled, now that it is populated.
 test_cache_disabled $cache_dir "after populate"
 
+lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret
+if { $ret != 0 } {
+    fail "couldn't remove files in temporary cache dir"
+    return
+}
+
+lassign [remote_exec host rmdir "$cache_dir"] ret
+if { $ret != 0 } {
+    fail "couldn't remove temporary cache dir"
+    return
+}
index 22ab91f8f65e784234aac25fa269b9f50fdd2007..081088a983997ce7a2909c43cf0645ddae61a593 100644 (file)
@@ -91,3 +91,15 @@ foreach_with_prefix first $methods {
        }
     }
 }
+
+lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret
+if { $ret != 0 } {
+    fail "couldn't remove files in temporary cache dir"
+    return
+}
+
+lassign [remote_exec host rmdir "$cache_dir"] ret
+if { $ret != 0 } {
+    fail "couldn't remove temporary cache dir"
+    return
+}