[PATCH] D51561: [CMake] Add support for unittests that have input files

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 16:02:15 PDT 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Thanks, I do think this will be simpler in the long run. :)



================
Comment at: llvm/lib/Testing/Support/SupportHelpers.cpp:29
+  llvm::sys::path::append(Result, "Inputs");
+  llvm::sys::path::native(Result);
+  return std::move(Result);
----------------
Can you do something like `EXPECT_TRUE(llvm::sys::path::is_directory(Result)) << "unit test inputs directory does not exist";` so that tests die earlier in more obvious ways when they call this and the directory is missing?


https://reviews.llvm.org/D51561





More information about the llvm-commits mailing list