diff options
author | Jakub Kotur <qtr@google.com> | 2021-01-06 12:40:43 +0100 |
---|---|---|
committer | Jakub Kotur <qtr@google.com> | 2021-04-06 12:40:32 +0200 |
commit | 1d640d0521c7b266bb4b44726305ba2b9971f01d (patch) | |
tree | 940c8823c1fc93f4e2186824cb5e32934e9e95c8 /rust/testing.go | |
parent | 8f8029a92b35166e745789b114051d04e68e2ce6 (diff) |
Add rust_benchmark module to soong.
This commit adds rust_benchmark and rust_benchmark_host commands to
soong. Respectively running rust benchmarks on device and host. Currently
only criterion based benchmarks are supported and criterion library is
automatically linked.
Test: atest <module with rust_benchmark defined>
Bug: 155309706
Change-Id: I6edfc2b4bf30b1163fe59b8c2ecdcd4e7125e7b9
Diffstat (limited to 'rust/testing.go')
-rw-r--r-- | rust/testing.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/testing.go b/rust/testing.go index 75adcfce9..1e01cc0c5 100644 --- a/rust/testing.go +++ b/rust/testing.go @@ -192,11 +192,19 @@ func GatherRequiredDepsForTest() string { srcs:["foo.rs"], host_supported: true, } + rust_library { + name: "libcriterion", + crate_name: "criterion", + srcs:["foo.rs"], + host_supported: true, + } ` return bp } func registerRequiredBuildComponentsForTest(ctx android.RegistrationContext) { + ctx.RegisterModuleType("rust_benchmark", RustBenchmarkFactory) + ctx.RegisterModuleType("rust_benchmark_host", RustBenchmarkHostFactory) ctx.RegisterModuleType("rust_binary", RustBinaryFactory) ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory) ctx.RegisterModuleType("rust_bindgen", RustBindgenFactory) |