summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2017-03-08 08:36:21 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2017-03-08 08:36:21 +0000
commit31f450353208e4d108fff264a2eba433758a0709 (patch)
tree3544df864136b00df15063d2d9cd16556250daeb /unittests
parent8cd8473e96d324fc548ec17a32b0f934981f08d0 (diff)
[Support] Remove unit test for fs::is_local
rL295768 introduced this test that fails if LLVM is built and tested on an NFS share. Delete the test as discussed on the corresponing commit thread. The only feasible solution would have been to introduce environment variables and to en/disable the test conditionally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297260 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/Path.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/unittests/Support/Path.cpp b/unittests/Support/Path.cpp
index a93f929af78..362e302e9ce 100644
--- a/unittests/Support/Path.cpp
+++ b/unittests/Support/Path.cpp
@@ -444,31 +444,6 @@ protected:
}
void TearDown() override { ASSERT_NO_ERROR(fs::remove(TestDirectory.str())); }
-
- SmallVector<Triple::ArchType, 4> UnsupportedArchs;
- SmallVector<Triple::OSType, 4> UnsupportedOSs;
- SmallVector<Triple::EnvironmentType, 1> UnsupportedEnvironments;
-
- bool isUnsupportedOSOrEnvironment() {
- Triple Host(Triple::normalize(sys::getProcessTriple()));
-
- if (find(UnsupportedEnvironments, Host.getEnvironment()) !=
- UnsupportedEnvironments.end())
- return true;
-
- if (is_contained(UnsupportedOSs, Host.getOS()))
- return true;
-
- if (is_contained(UnsupportedArchs, Host.getArch()))
- return true;
-
- return false;
- }
-
- FileSystemTest() {
- UnsupportedArchs.push_back(Triple::mips);
- UnsupportedArchs.push_back(Triple::mipsel);
- }
};
TEST_F(FileSystemTest, Unique) {
@@ -1191,36 +1166,6 @@ TEST_F(FileSystemTest, OpenFileForRead) {
::close(FileDescriptor);
}
-#define CHECK_UNSUPPORTED() \
- do { \
- if (isUnsupportedOSOrEnvironment()) \
- return; \
- } while (0); \
-
-TEST_F(FileSystemTest, is_local) {
- CHECK_UNSUPPORTED();
-
- SmallString<128> CurrentPath;
- ASSERT_NO_ERROR(fs::current_path(CurrentPath));
-
- bool Result;
- ASSERT_NO_ERROR(fs::is_local(CurrentPath, Result));
- EXPECT_TRUE(Result);
- EXPECT_TRUE(fs::is_local(CurrentPath));
-
- int FD;
- SmallString<64> TempPath;
- ASSERT_NO_ERROR(fs::createTemporaryFile("prefix", "temp", FD, TempPath));
- FileRemover Cleanup(TempPath);
-
- // Make sure it exists.
- ASSERT_TRUE(sys::fs::exists(Twine(TempPath)));
-
- ASSERT_NO_ERROR(fs::is_local(FD, Result));
- EXPECT_TRUE(Result);
- EXPECT_TRUE(fs::is_local(FD));
-}
-
TEST_F(FileSystemTest, set_current_path) {
SmallString<128> path;