diff options
author | 2016-12-03 01:08:58 +0000 | |
---|---|---|
committer | 2016-12-05 10:20:59 +0000 | |
commit | 67edce77dbd54d6748d4d09da5bf27a6019d3b5e (patch) | |
tree | 255f91592e5758e79b37101f42bd84c29aef3a0c /src/test | |
parent | 16d8fec128bee46dafe8bba0a45e6d7709dec792 (diff) |
When a strict proto dep violation occurs, tell the user what they should fix.
--
PiperOrigin-RevId: 140912072
MOS_MIGRATED_REVID=140912072
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilderTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilderTest.java b/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilderTest.java index d9f7a13bad..8d05ad5dec 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilderTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilderTest.java @@ -85,6 +85,7 @@ public class ProtoCompileActionBuilderTest { supportData.getDirectProtoSources(), supportData.getTransitiveImports(), supportData.getProtosInDirectDeps(), + "//foo:bar", true /* allowServices */, ImmutableList.<String>of() /* protocOpts */); @@ -123,6 +124,7 @@ public class ProtoCompileActionBuilderTest { supportData.getDirectProtoSources(), supportData.getTransitiveImports(), supportData.getProtosInDirectDeps(), + "//foo:bar", true /* allowServices */, ImmutableList.<String>of() /* protocOpts */); @@ -132,6 +134,8 @@ public class ProtoCompileActionBuilderTest { "-Iimport1.proto=import1.proto", "-Iimport2.proto=import2.proto", "--direct_dependencies=import1.proto", + "--direct_dependencies_violation_msg=%s is imported, " + + "but //foo:bar doesn't directly depend on a proto_library that 'srcs' it.", "source_file.proto") .inOrder(); } @@ -152,6 +156,7 @@ public class ProtoCompileActionBuilderTest { supportData.getDirectProtoSources(), supportData.getTransitiveImports(), supportData.getProtosInDirectDeps(), + "//foo:bar", false /* allowServices */, ImmutableList.of("--foo", "--bar") /* protocOpts */); @@ -193,6 +198,7 @@ public class ProtoCompileActionBuilderTest { supportData.getDirectProtoSources(), supportData.getTransitiveImports(), supportData.getProtosInDirectDeps(), + "//foo:bar", true /* allowServices */, ImmutableList.<String>of() /* protocOpts */); @@ -237,6 +243,7 @@ public class ProtoCompileActionBuilderTest { supportData.getDirectProtoSources(), supportData.getTransitiveImports(), supportData.getProtosInDirectDeps(), + "//foo:bar", true /* allowServices */, ImmutableList.<String>of() /* protocOpts */); fail("Expected an exception"); |