Commit Graph

4 Commits

Author SHA1 Message Date
Colin Cross 9c6241f768 Fix tests with cc_binary_host on mac
cc_binary_host on mac uses ctx.Config().HostSystemTool(), which needs
PATH in the test environment.  Copy it from the original environment.

Fixes: 129763458
Test: proto_test.go
Change-Id: I41c1acdceee7c35036148256adafb471871034df
2019-04-22 15:55:56 -07:00
Colin Cross 9a4f3f7ea8 Skip failing test on mac
Tests with cc_binary_host fail on mac, disable for now.

Bug: 129763458
Test: TestProto
Change-Id: Icea24ac6ffba4c5c047296cb3997a5efa95e16ee
2019-04-02 10:02:04 -07:00
Colin Cross fe17f6f0e8 Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.

Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02 16:38:55 +00:00
Colin Cross 19878da6a0 Move proto compilation to RuleBuilder
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.

Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
2019-04-02 16:38:47 +00:00