diff options
author | 2017-02-15 14:39:57 +0000 | |
---|---|---|
committer | 2017-02-15 14:49:55 +0000 | |
commit | ce74be1e9e25929cc4d4e891f37ba29b9a74ed8c (patch) | |
tree | 47838fe14d6489f87df4cc6c7cd9ad4b5a1ab3ef /src/test/cpp | |
parent | 4f94bc35eebad35a5fca8ab1b0516b799f779b41 (diff) |
Bazel client, Windows, tests: remove cleanup code
The TearDown method clears up after tests, so
manual cleanup is unnecessary.
See https://github.com/bazelbuild/bazel/issues/2107
--
Change-Id: Idf5d2b2bf012774171f1868d1341a7952015c35f
Reviewed-on: https://cr.bazel.build/8894
PiperOrigin-RevId: 147591032
MOS_MIGRATED_REVID=147591032
Diffstat (limited to 'src/test/cpp')
-rw-r--r-- | src/test/cpp/util/file_windows_test.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/test/cpp/util/file_windows_test.cc b/src/test/cpp/util/file_windows_test.cc index ec4e0f5b53..da84efe437 100644 --- a/src/test/cpp/util/file_windows_test.cc +++ b/src/test/cpp/util/file_windows_test.cc @@ -244,7 +244,6 @@ TEST_F(FileWindowsTest, TestAsShortWindowsPath) { ASSERT_TRUE(AsShortWindowsPath(dirname, &actual)); ASSERT_EQ(short_tmpdir + "\\longpa~1", actual); - ASSERT_EQ(0, rmdir(dirname.c_str())); } TEST_F(FileWindowsTest, TestMsysRootRetrieval) { @@ -333,13 +332,6 @@ TEST_F(FileWindowsTest, TestPathExistsWindows) { fake_msys_root + "/i.dont.exist\" >NUL 2>NUL"); ASSERT_FALSE(PathExists(JoinPath(fake_msys_root, "i.dont.exist"))); ASSERT_FALSE(PathExists(JoinPath(tmpdir, "junc2"))); - - // Clean up. - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "junc1").c_str())); - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "junc2").c_str())); - ASSERT_EQ(0, rmdir(fake_msys_root.c_str())); - ASSERT_FALSE(PathExists(JoinPath(tmpdir, "junc1"))); - ASSERT_FALSE(PathExists(JoinPath(tmpdir, "junc2"))); } TEST_F(FileWindowsTest, TestIsDirectory) { @@ -376,8 +368,6 @@ TEST_F(FileWindowsTest, TestIsDirectory) { ASSERT_EQ(0, rmdir(dir1.c_str())); ASSERT_FALSE(IsDirectory(dir1)); ASSERT_FALSE(IsDirectory(junc1)); - - ASSERT_EQ(0, rmdir(junc1.c_str())); } TEST_F(FileWindowsTest, TestUnlinkPath) { @@ -409,8 +399,6 @@ TEST_F(FileWindowsTest, TestUnlinkPath) { ASSERT_TRUE(UnlinkPath(JoinPath(junc1, "foo.txt"))); // Files can be unlinked. ASSERT_TRUE(UnlinkPath(junc1)); - // Clean up the now empty directory. - ASSERT_EQ(0, rmdir(dir1.c_str())); } TEST_F(FileWindowsTest, TestMakeDirectories) { @@ -435,15 +423,6 @@ TEST_F(FileWindowsTest, TestMakeDirectories) { ASSERT_TRUE(MakeDirectories(tmpdir, 0777)); ASSERT_TRUE(MakeDirectories(JoinPath(tmpdir, "dir1/dir2/dir3"), 0777)); ASSERT_TRUE(MakeDirectories(string("\\\\?\\") + tmpdir + "/dir4/dir5", 0777)); - - // Clean up. - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "fake_msys/foo").c_str())); - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "fake_msys").c_str())); - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "dir1/dir2/dir3").c_str())); - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "dir1/dir2").c_str())); - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "dir1").c_str())); - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "dir4/dir5").c_str())); - ASSERT_EQ(0, rmdir(JoinPath(tmpdir, "dir4").c_str())); } TEST_F(FileWindowsTest, CanAccess) { @@ -490,10 +469,6 @@ TEST_F(FileWindowsTest, CanAccess) { ASSERT_TRUE(CanReadFile(file2)); ASSERT_TRUE(CanExecuteFile(file2)); ASSERT_FALSE(CanAccessDirectory(file2)); - - ASSERT_EQ(0, unlink(file2.c_str())); - ASSERT_EQ(0, rmdir(junc.c_str())); - ASSERT_EQ(0, rmdir(dir.c_str())); } } // namespace blaze_util |