From d4c953f1a987ecde294a586c5c09955d87473100 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Wed, 11 Nov 2015 17:24:14 +0000 Subject: C++ libraries in remote repos don't need to set include paths Fixes #445, based on https://github.com/bazelbuild/bazel/compare/master...ulfjack:cpp-include-path. RELNOTES: C++ libraries no longer need includes = ["."] (or similar copts) to include paths relative to a remote repository's root. -- MOS_MIGRATED_REVID=107593486 --- src/test/shell/bazel/local_repository_test.sh | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'src/test/shell') diff --git a/src/test/shell/bazel/local_repository_test.sh b/src/test/shell/bazel/local_repository_test.sh index c0c8cb5de0..8506569d34 100755 --- a/src/test/shell/bazel/local_repository_test.sh +++ b/src/test/shell/bazel/local_repository_test.sh @@ -924,4 +924,51 @@ EOF expect_log "workspace names may contain only A-Z, a-z, 0-9, '-', '_' and '.'" } +function test_remote_includes() { + local remote=$TEST_TMPDIR/r + rm -fr $remote + mkdir -p $remote/inc + + touch $remote/WORKSPACE + cat > $remote/BUILD < $remote/bar.cc < $remote/inc/bar.h < WORKSPACE < BUILD < foo.cc < +#include "inc/bar.h" +int main() { printf("%d\n", getNum()); return 0; }; +EOF + + bazel run :foo &> $TEST_log || fail "build failed" + expect_log "42" +} + run_suite "local repository tests" -- cgit v1.2.3