diff options
author | 2017-02-17 06:49:40 +0000 | |
---|---|---|
committer | 2017-02-17 14:55:06 +0000 | |
commit | 0fd73d6e3602003ae0e7e9ce6a25b27d73e30076 (patch) | |
tree | 0547ba510e475322ee512255a8d471ca5ad07fd0 /src/test/java/com/google/devtools/build/lib/rules/cpp/proto | |
parent | 8153cb80f4a4424640e694cb6ed4792dcc193171 (diff) |
--proto_compiler points at @com_google_protobuf//:protoc
This allows proto_library to be used out of the box by adding a repository entry that points to the protobuf distro in one's WORKSPACE file.
--
PiperOrigin-RevId: 147808147
MOS_MIGRATED_REVID=147808147
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/cpp/proto')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoLibraryTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoLibraryTest.java index 5951987a1d..6f5ee31a88 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoLibraryTest.java @@ -34,10 +34,10 @@ import org.junit.runners.JUnit4; public class CcProtoLibraryTest extends BuildViewTestCase { @Before public void setUp() throws Exception { - scratch.file("third_party/protobuf/BUILD", "licenses(['notice'])", "exports_files(['protoc'])"); scratch.file( "protobuf/BUILD", "package(default_visibility=['//visibility:public'])", + "exports_files(['protoc'])", "proto_lang_toolchain(", " name = 'cc_toolchain',", " command_line = '--cpp_out=$(OUT)',", @@ -48,6 +48,7 @@ public class CcProtoLibraryTest extends BuildViewTestCase { new String(FileSystemUtils.readContentAsLatin1(rootDirectory.getRelative("WORKSPACE"))); mockToolsConfig.overwrite( "WORKSPACE", + "local_repository(name = 'com_google_protobuf', path = 'protobuf/')", "local_repository(name = 'com_google_protobuf_cc', path = 'protobuf/')", existingWorkspace); invalidatePackages(); // A dash of magic to re-evaluate the WORKSPACE file. |