Merge "Add traffic_controller, networkstats, netd_updatable tests to MTS."

This commit is contained in:
Ken Chen 2022-05-27 17:46:54 +00:00 • committed by Gerrit Code Review
commit 93ea4c3f5c
5 changed files with 63 additions and 3 deletions

View file

@ -55,7 +55,8 @@ cc_library {
cc_test {
name: "netd_updatable_unit_test",
defaults: ["netd_defaults"],
test_suites: ["general-tests"],
test_suites: ["general-tests", "mts-tethering"],
test_config_template: ":net_native_test_config_template",
require_root: true, // required by setrlimitForTest()
header_libs: [
"bpf_connectivity_headers",
@ -72,6 +73,7 @@ cc_test {
"liblog",
"libnetdutils",
],
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",

View file

@ -48,7 +48,8 @@ cc_library {
cc_test {
name: "libnetworkstats_test",
test_suites: ["general-tests"],
test_suites: ["general-tests", "mts-tethering"],
test_config_template: ":net_native_test_config_template",
require_root: true, // required by setrlimitForTest()
header_libs: ["bpf_connectivity_headers"],
srcs: [
@ -68,4 +69,13 @@ cc_test {
"libbase",
"liblog",
],
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
}

View file

@ -52,7 +52,8 @@ cc_library {
cc_test {
name: "traffic_controller_unit_test",
test_suites: ["general-tests"],
test_suites: ["general-tests", "mts-tethering"],
test_config_template: ":net_native_test_config_template",
require_root: true,
local_include_dirs: ["include"],
header_libs: [
@ -71,4 +72,13 @@ cc_test {
"libnetd_updatable",
"netd_aidl_interface-lateststable-ndk",
],
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
}

View file

@ -31,3 +31,10 @@ cc_test {
],
compile_multilib: "first",
}
filegroup {
name: "net_native_test_config_template",
srcs: [
"NetNativeTestConfigTemplate.xml",
],
}

View file

@ -0,0 +1,31 @@
<!-- Copyright (C) 2022 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="Configuration for {MODULE} tests">
<option name="test-suite-tag" value="mts" />
<option name="config-descriptor:metadata" key="mainline-param" value="CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex" />
<!-- Only run tests if the device under test is SDK version 33 (Android 13) or above. -->
<object type="module_controller" class="com.android.tradefed.testtype.suite.module.Sdk33ModuleController" />
<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="{MODULE}->/data/local/tmp/{MODULE}" />
<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="{MODULE}" />
</test>
</configuration>