aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2015-07-27 08:19:13 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-07-27 08:34:51 +0000
commit44ba758ae03e6d4a43654f988d9536c9eafcac5e (patch)
tree68feca061b3acb436d55ee3f4bbac3b704f829a4 /src/test
parent053570758c3dd642118fcfcaa52198e277215dce (diff)
Make default values of attributes point to the main repository.
Default values of attributes (e.g. "//tools/cpp:malloc" when an attribute declaration says .name("malloc").value("//tools/cpp:malloc")) are now considered as a label inside the main repository and not inside the external repository. This is consistent with how we treat implicit/default attributes and is useful because these are usually tool dependencies. -- MOS_MIGRATED_REVID=99160392
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/local_repository_test.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/shell/bazel/local_repository_test.sh b/src/test/shell/bazel/local_repository_test.sh
index ccba557d60..77a5c41b2f 100755
--- a/src/test/shell/bazel/local_repository_test.sh
+++ b/src/test/shell/bazel/local_repository_test.sh
@@ -572,4 +572,26 @@ EOF
bazel query '//a:foo' || fail "query failed"
}
+function test_cc_binary_in_local_repository() {
+ local r=$TEST_TMPDIR/r
+ rm -fr $r
+ mkdir $r
+ touch $r/WORKSPACE
+ cat > $r/BUILD <<EOF
+cc_binary(
+ name = "bin",
+ srcs = ["bin.cc"],
+)
+EOF
+
+ cat > WORKSPACE <<EOF
+local_repository(
+ name = "r",
+ path = "$r",
+)
+EOF
+
+ bazel build --nobuild @r//:bin || fail "build failed"
+}
+
run_suite "local repository tests"