Skip to content

Commit f0512ec

Browse files
committed
[debug] Skip Resource Dir test if no Clang binary
1 parent cc86b50 commit f0512ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

interpreter/CppInterOp/unittests/CppInterOp/InterpreterTest.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,14 @@ TEST(InterpreterTest, DISABLED_DetectResourceDir) {
135135
EXPECT_STRNE(Cpp::DetectResourceDir().c_str(), Cpp::GetResourceDir());
136136
llvm::SmallString<256> Clang(LLVM_BINARY_DIR);
137137
llvm::sys::path::append(Clang, "bin", "clang");
138+
139+
if(!llvm::sys::fs::exists(llvm::Twine(Clang.str().str()))) {
140+
GTEST_SKIP() << "Test not run (Clang binary does not exist)";
141+
}
142+
138143
std::string DetectedPath = Cpp::DetectResourceDir(Clang.str().str().c_str());
139144
EXPECT_STREQ(DetectedPath.c_str(), Cpp::GetResourceDir());
140145
}
141-
142146
TEST(InterpreterTest, DetectSystemCompilerIncludePaths) {
143147
#ifdef _WIN32
144148
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";

0 commit comments

Comments
 (0)