Skip to content

Commit

Permalink
[test] Pass -ccc-install-dir in mac compilation db test
Browse files Browse the repository at this point in the history
Pass -ccc-install-dir explicitly as the compilation database code does
not pass argv[0] to getMainExecutable(), while some systems require it
to return the correct path.  Since the relevant code is apparently only
applicable to Darwin, just pass correct -ccc-install-dir to make
the tests pass on *BSD systems.

Differential Revision: https://reviews.llvm.org/D56976

llvm-svn: 351752
  • Loading branch information
mgorny committed Jan 21, 2019
1 parent efde822 commit 4d54038
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -10,6 +10,11 @@
//
// RUN: cp clang-check %t/mock-libcxx/bin/
// RUN: cp %s %t/test.cpp
// RUN: "%t/mock-libcxx/bin/clang-check" -p %t %t/test.cpp -- -stdlib=libc++ -target x86_64-apple-darwin
// RUN: "%t/mock-libcxx/bin/clang-check" -p %t %t/test.cpp -- \
// RUN: -stdlib=libc++ -target x86_64-apple-darwin \
// RUN: -ccc-install-dir %t/mock-libcxx/bin
//
// ^ -ccc-install-dir passed to unbreak tests on *BSD where
// getMainExecutable() relies on real argv[0] being passed
#include <mock_vector>
vector v;

0 comments on commit 4d54038

Please sign in to comment.