Fixed windows bots that were failing because of PATH_MAX
authorRaphael Isemann <teemperor@gmail.com>
Fri, 24 Aug 2018 20:55:23 +0000 (20:55 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Fri, 24 Aug 2018 20:55:23 +0000 (20:55 +0000)
As we only use PATH_MAX for an assert in a unit test that is supposed
to catch the random failures on the Swift CI bots, we might as well
just ifdef this assert out on Windows.

llvm-svn: 340652

lldb/unittests/Interpreter/TestCompletion.cpp

index bb3d24d..12c16a9 100644 (file)
@@ -165,7 +165,9 @@ TEST_F(CompletionTest, DirCompletionAbsolute) {
   // for that directory, not items under it.
   // Sanity check that the path we complete on exists and isn't too long.
   ASSERT_TRUE(llvm::sys::fs::exists(BaseDir));
+#ifdef PATH_MAX
   ASSERT_LE(BaseDir.size(), static_cast<size_t>(PATH_MAX));
+#endif
   size_t Count =
       CommandCompletions::DiskDirectories(BaseDir, Results, Resolver);
   ASSERT_EQ(1u, Count);