[llvm] 2939605 - Revert "[YAMLVFSWriter][Test][NFC] Add couple tests"

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 16:08:20 PDT 2020


Author: Nico Weber
Date: 2020-05-07T19:07:08-04:00
New Revision: 29396059a4d07869e9d4b8b0f86152b81df08a77

URL: https://github.com/llvm/llvm-project/commit/29396059a4d07869e9d4b8b0f86152b81df08a77
DIFF: https://github.com/llvm/llvm-project/commit/29396059a4d07869e9d4b8b0f86152b81df08a77.diff

LOG: Revert "[YAMLVFSWriter][Test][NFC] Add couple tests"

This reverts commit 7143d7925490e9123b1c93305700221584ba10c6.
Breaks check-llvm on Windows, see e.g.
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/15919/steps/stage%201%20check/logs/stdio

Added: 
    

Modified: 
    llvm/unittests/Support/VirtualFileSystemTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/VirtualFileSystemTest.cpp b/llvm/unittests/Support/VirtualFileSystemTest.cpp
index 83fc263bd94f..8c08cb159304 100644
--- a/llvm/unittests/Support/VirtualFileSystemTest.cpp
+++ b/llvm/unittests/Support/VirtualFileSystemTest.cpp
@@ -2274,54 +2274,3 @@ TEST_F(VFSFromYAMLTest, YAMLVFSWriterTestHandleDirs) {
   EXPECT_FALSE(FS->exists(_b.Path + "/b"));
   EXPECT_FALSE(FS->exists(_c.Path + "/c"));
 }
-
-TEST_F(VFSFromYAMLTest, YAMLVFSWriterTestNestedDirs) {
-  ScopedDir TestDirectory("virtual-file-system-test", /*Unique*/ true);
-  ScopedDir a(TestDirectory + "/a");
-  ScopedDir _a_aa(TestDirectory + "/a/aa");
-  ScopedDir b(TestDirectory + "/b");
-  ScopedDir _b_bb(TestDirectory + "/b/bb");
-  ScopedDir c(TestDirectory + "/c");
-  ScopedDir _c_cc(TestDirectory + "/c/cc");
-
-  vfs::YAMLVFSWriter VFSWriter;
-  VFSWriter.addDirectoryMapping(a.Path, "//root/a");
-  VFSWriter.addDirectoryMapping(_a_aa.Path, "//root/a/aa");
-  VFSWriter.addDirectoryMapping(b.Path, "//root/b");
-  VFSWriter.addDirectoryMapping(_b_bb.Path, "//root/b/bb");
-  VFSWriter.addDirectoryMapping(c.Path, "//root/c");
-  VFSWriter.addDirectoryMapping(_c_cc.Path, "//root/c/cc");
-
-  std::string Buffer;
-  raw_string_ostream OS(Buffer);
-  VFSWriter.write(OS);
-  OS.flush();
-
-  IntrusiveRefCntPtr<ErrorDummyFileSystem> Lower(new ErrorDummyFileSystem());
-  Lower->addDirectory("//root/a");
-  Lower->addDirectory("//root/a/aa");
-  Lower->addDirectory("//root/b");
-  Lower->addDirectory("//root/b/bb");
-  Lower->addDirectory("//root/c");
-  Lower->addDirectory("//root/c/cc");
-
-  IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLRawString(Buffer, Lower);
-  ASSERT_TRUE(FS.get() != nullptr);
-
-  EXPECT_TRUE(FS->exists(a.Path));
-  EXPECT_TRUE(FS->exists(_a_aa.Path));
-  EXPECT_TRUE(FS->exists(b.Path));
-  EXPECT_TRUE(FS->exists(_b_bb.Path));
-  EXPECT_TRUE(FS->exists(c.Path));
-  EXPECT_TRUE(FS->exists(_c_cc.Path));
-}
-
-TEST(YAMLVFSWriterTest, HandleRootAsVPath) {
-  llvm::vfs::YAMLVFSWriter W;
-  W.addDirectoryMapping("/", "/tmp");
-  W.addDirectoryMapping("/foo", "/tmp/bar");
-  std::string Dump;
-  llvm::raw_string_ostream ToBeIgnored(Dump);
-
-  EXPECT_NO_FATAL_FAILURE(W.write(ToBeIgnored));
-}


        


More information about the llvm-commits mailing list