diff options
| author | 2020-05-19 17:13:09 -0700 | |
|---|---|---|
| committer | 2020-05-21 13:40:36 -0700 | |
| commit | 253d4f3fe7414bdd030d57a1a0407b14d2f6d63d (patch) | |
| tree | e3282b45d9e23f74545c8b475a18cc8e9e5f1045 | |
| parent | c43997ba156baab6f7d107a3feca72557f80a353 (diff) | |
Add test config to statsd_test and apply mainline module
test controller to it so that the tests will only be run
when statsd apex is found on device.
Bug: 154845935
Test: m mts && mts-tradefed run mts-statsd
Change-Id: Ieaa8049cb66b7e75daba4f22477e850367821b64
| -rw-r--r-- | cmds/statsd/Android.bp | 6 | ||||
| -rw-r--r-- | cmds/statsd/statsd_test.xml | 37 |
2 files changed, 42 insertions, 1 deletions
diff --git a/cmds/statsd/Android.bp b/cmds/statsd/Android.bp index f30ed17c392f..3dbe41395024 100644 --- a/cmds/statsd/Android.bp +++ b/cmds/statsd/Android.bp @@ -292,6 +292,7 @@ cc_test { name: "statsd_test", defaults: ["statsd_defaults"], test_suites: ["device-tests", "mts"], + test_config: "statsd_test.xml", //TODO(b/153588990): Remove when the build system properly separates //32bit and 64bit architectures. @@ -299,7 +300,10 @@ cc_test { multilib: { lib64: { suffix: "64", - } + }, + lib32: { + suffix: "32", + }, }, cflags: [ diff --git a/cmds/statsd/statsd_test.xml b/cmds/statsd/statsd_test.xml new file mode 100644 index 000000000000..8f9bb1cb6b2a --- /dev/null +++ b/cmds/statsd/statsd_test.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<configuration description="Runs statsd_test."> + <option name="test-suite-tag" value="apct" /> + <option name="test-suite-tag" value="apct-native" /> + <option name="test-suite-tag" value="mts" /> + + <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> + + <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> + <option name="cleanup" value="true" /> + <option name="push" value="statsd_test->/data/local/tmp/statsd_test" /> + <option name="append-bitness" value="true" /> + </target_preparer> + + <test class="com.android.tradefed.testtype.GTest" > + <option name="native-test-device-path" value="/data/local/tmp" /> + <option name="module-name" value="statsd_test" /> + </test> + + <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController"> + <option name="mainline-module-package-name" value="com.google.android.os.statsd" /> + </object> +</configuration> |