Replaces the rust specific rustTestCtx mechanism with the general test
fixtures mechanism as converting it to use preparers was not possible.
Also, removes usages of the buildDir variable and removes it as it is
no longer needed.
Bug: 181070625
Test: m nothing
Change-Id: I0176a7b6fb2d390ae23693f1e198da5124b4be63
To allow grpc protobufs to include non-grpc protos in a singular
library, we need to allow them to be defined as part of the same module.
This CL merges the two previously distinct module types into
rust_protobuf, and adds a new property for declaring which protos
contain grpc definitions.
Bug: 172952239
Test: rust_grpcio modules converted to rust_protobuf modules and build.
Test: Example rust_protobuf module with both proto types builds.
Change-Id: I0e627fd97bc6f74de89d309e3344694a1e76586d
This further emulates the rust-protobuf gen_mod_rs flag by providing
support for generating a single module containing multiple protobuf
definitions.
Bug: 171361369
Test: New Soong tests.
Test: Example module containing multiple protos works.
Change-Id: I815f9628a8289ae512758073dac49bc4535abf01
The usage of the well known type Empty requires a hack in the module
above the grpc implementation, this is now the generated stem_mod.rs
This also adds additional implicit dependencies that are required by
the grpc protobuf generated code. This includes the addition of a
'header_libs' property for library dependencies which export include
paths required by protos.
We also now include both the protos and the grpcio in the library
variant via the mod_stem.rs.
Bug: 172592789
Bug: 171504899
Test: m nothing
Test: Example rust_grpcio module build command includes dependencies,
include paths.
Change-Id: I187a13cd5cdea991828a1020314de16727e4f74e
Adds a new SourceProvider type to generate grpcio code from protos.
Since it's so similar to protobuf, it's basically just a different type
of rust_protobuf.
Bug: 171504899
Test: Example module compiles.
Change-Id: I9882f3ac4d4aeaae0191f2b557e9612b5c7a9ac9
This reverts commit 323dc60712.
Reason for revert: Possible cause of test instability
Bug: 170513220
Test: soong tests
Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
Putting t.Parallel() in each test makes them run in parallel.
Additional t.Parallel() could be added to each subtest, although
that requires making a local copy of the loop variable for
table driven tests.
Test: m checkbuild
Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
Until now, source provider modules duplicated the rule to generate the
source for each variant. Add a inter-variant dependency between the
source and the other variants (e.g. rlib, dylib) to avoid this
duplication. Add documentation on this behaviour.
Bug: 162588681
Test: m
Change-Id: I41c9e2220f8875245415e17374852e540dfd47ec
This adds a new SourceProvider module type to handle protobuf code
generation. See the new test for an example of how to call this.
Bug: 143953733
Test: New soong tests pass.
Test: Replacing genrules in crosvm with rust_protobuf modules.
Change-Id: Ie3117129cde37b8736bc18ee09bf5cde27c01c34