summaryrefslogtreecommitdiff
path: root/rust/androidmk.go
diff options
context:
space:
mode:
author Jeffrey Vander Stoep <jeffv@google.com> 2021-04-14 08:02:46 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-04-14 08:02:46 +0000
commitd587ec225a53d91975c9a82845c0d3ca2e94f6f2 (patch)
tree6cbf3fa79784d2e78740eb8d4bd193c8b068acab /rust/androidmk.go
parentc11f2699330667cfb8a4f182c7f42560d2ccb46a (diff)
parent546ccd5614553b35730c3b7b1778e337b0ba24ce (diff)
Merge changes from topic "rust_benchmark"
* changes: Attach rust_benchmark to atest and tradefed. Add rust_benchmark module to soong.
Diffstat (limited to 'rust/androidmk.go')
-rw-r--r--rust/androidmk.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/rust/androidmk.go b/rust/androidmk.go
index dea32a34d..940710e63 100644
--- a/rust/androidmk.go
+++ b/rust/androidmk.go
@@ -107,6 +107,20 @@ func (test *testDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidM
cc.AndroidMkWriteTestData(test.data, ret)
}
+func (benchmark *benchmarkDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkEntries) {
+ benchmark.binaryDecorator.AndroidMk(ctx, ret)
+ ret.Class = "NATIVE_TESTS"
+ ret.ExtraEntries = append(ret.ExtraEntries,
+ func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
+ entries.AddCompatibilityTestSuites(benchmark.Properties.Test_suites...)
+ if benchmark.testConfig != nil {
+ entries.SetString("LOCAL_FULL_TEST_CONFIG", benchmark.testConfig.String())
+ }
+ entries.SetBool("LOCAL_NATIVE_BENCHMARK", true)
+ entries.SetBoolIfTrue("LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG", !BoolDefault(benchmark.Properties.Auto_gen_config, true))
+ })
+}
+
func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkEntries) {
ctx.SubAndroidMk(ret, library.baseCompiler)