[gcc r9-9775] libstdc++: Clear up directories created by tests

Jonathan Wakely redi@gcc.gnu.org
Wed Oct 13 19:42:29 GMT 2021


https://gcc.gnu.org/g:e4f3b1e502af237fbdb6ae3ce398fc79e9050d32

commit r9-9775-ge4f3b1e502af237fbdb6ae3ce398fc79e9050d32
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Feb 9 16:53:56 2021 +0000

    libstdc++: Clear up directories created by tests
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/27_io/filesystem/operations/remove_all.cc: Remove
            test directory after making it writable again.
            * testsuite/experimental/filesystem/operations/remove_all.cc:
            Likewise.

Diff:
---
 libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc        | 2 ++
 libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
index b0b176fc656..aef29cc71a0 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
@@ -169,6 +169,8 @@ test04()
   }
 
   fs::permissions(dir, fs::perms::owner_write, fs::perm_options::add);
+  fs::remove_all(dir, ec);
+  f.path.clear();
 #endif
 }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
index 9d51a66c71f..c233b60c550 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
@@ -137,6 +137,8 @@ test04()
   }
 
   fs::permissions(dir, fs::perms::owner_write|fs::perms::add_perms);
+  fs::remove_all(dir, ec);
+  f.path.clear();
 #endif
 }


More information about the Libstdc++-cvs mailing list