Skip to content

Commit f3cca29

Browse files
author
Jesus Checa Hidalgo
committed
libclang_cpp: Make the test more robust.
Piping ldd's output into grep can fail randomly, likely due to buffering issues, and causing false positives. Redirect the output to a file instead to force flushing, and grep from the file.
1 parent 4659a72 commit f3cca29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/libclang_cpp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//
33
// REQUIRES: clang, llvm-config
44
// RUN: %clangxx -lclang-cpp -v %s -o %t `%llvm-config --cxxflags --ldflags --libs`
5-
// RUN: ldd %t 2>&1|grep -q libclang-cpp
5+
// RUN: ldd %t 2>&1 > %t.lddoutput
6+
// RUN: grep -q libclang-cpp %t.lddoutput
67

78
#include "clang/Tooling/CommonOptionsParser.h"
89
#include "llvm/Support/CommandLine.h"

0 commit comments

Comments
 (0)