Loading Android.bp +9 −0 Original line number Diff line number Diff line Loading @@ -188,11 +188,20 @@ cc_library_static { ], } filegroup { name: "resolv_test_config_template", srcs: [ "resolv_test_config_template.xml", ], } // TODO: Move this test to tests/ cc_test { name: "resolv_unit_test", test_suites: ["device-tests", "mts"], require_root: true, // TODO: Remove after b/152303924 fixing test_config_template: ":resolv_test_config_template", //TODO: drop root privileges and make it be an real unit test. defaults: ["netd_defaults", "resolv_test_defaults"], srcs: [ Loading tests/resolv_stress_test_config.xml→resolv_test_config_template.xml +33 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2019 The Android Open Source Project <!-- 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. Loading @@ -13,26 +13,21 @@ See the License for the specific language governing permissions and limitations under the License. --> <configuration description="Config for resolv_stress_test."> <option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct-native" /> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <!-- Temporary solution for MTS coverage because MTS coverage can only run with FilesPusher. See b/152303924 for details. --> <configuration description="Configuration for {MODULE} tests"> <option name="test-suite-tag" value="mts" /> <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> <option name="cleanup" value="true" /> <option name="push" value="resolv_stress_test->/data/local/tmp/resolv_stress_test" /> <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> <test class="com.android.tradefed.testtype.GTest" > <option name="native-test-device-path" value="/data/local/tmp" /> <option name="module-name" value="resolv_stress_test" /> <!-- On 2018-12-12, GetAddrInfoStressTest_Binder_100 suddenly jumped from ~1xs to ~70s runtime in APCT continuous integration, causing resolv_integration_test to flake with the default 60s timeout. We're not sure what caused the regression, but it's not due to a change in the Android image and unlikely to affect users. Just bump the timeout to 120s for now. --> <option name="native-test-timeout" value="120000" /> <option name="module-name" value="{MODULE}" /> <option name="runtime-hint" value="10m" /> <!-- test-timeout unit is ms, value = 10 min --> <option name="native-test-timeout" value="600000" /> </test> </configuration> tests/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ cc_test { test_suites: ["device-tests", "mts"], // This won't work with test_config // require_root: true, test_config: "resolv_stress_test_config.xml", // TODO: Remove after b/152303924 fixing test_config_template: ":resolv_test_config_template", defaults: ["netd_defaults", "resolv_test_defaults"], srcs: [ "resolv_stress_test.cpp", Loading tests/resolv_gold_test_config.xml +2 −1 Original line number Diff line number Diff line Loading @@ -15,9 +15,10 @@ --> <configuration description="Configuration for resolv gold tests"> <option name="test-suite-tag" value="mts" /> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> <option name="cleanup" value="true" /> <option name="push" value="resolv_gold_test->/data/local/tmp/resolv_gold_test" /> <!-- Temporary solotuon for b/151392634 --> <option name="push" value="testdata->/data/local/tmp/testdata/" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> Loading Loading
Android.bp +9 −0 Original line number Diff line number Diff line Loading @@ -188,11 +188,20 @@ cc_library_static { ], } filegroup { name: "resolv_test_config_template", srcs: [ "resolv_test_config_template.xml", ], } // TODO: Move this test to tests/ cc_test { name: "resolv_unit_test", test_suites: ["device-tests", "mts"], require_root: true, // TODO: Remove after b/152303924 fixing test_config_template: ":resolv_test_config_template", //TODO: drop root privileges and make it be an real unit test. defaults: ["netd_defaults", "resolv_test_defaults"], srcs: [ Loading
tests/resolv_stress_test_config.xml→resolv_test_config_template.xml +33 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2019 The Android Open Source Project <!-- 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. Loading @@ -13,26 +13,21 @@ See the License for the specific language governing permissions and limitations under the License. --> <configuration description="Config for resolv_stress_test."> <option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct-native" /> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <!-- Temporary solution for MTS coverage because MTS coverage can only run with FilesPusher. See b/152303924 for details. --> <configuration description="Configuration for {MODULE} tests"> <option name="test-suite-tag" value="mts" /> <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> <option name="cleanup" value="true" /> <option name="push" value="resolv_stress_test->/data/local/tmp/resolv_stress_test" /> <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> <test class="com.android.tradefed.testtype.GTest" > <option name="native-test-device-path" value="/data/local/tmp" /> <option name="module-name" value="resolv_stress_test" /> <!-- On 2018-12-12, GetAddrInfoStressTest_Binder_100 suddenly jumped from ~1xs to ~70s runtime in APCT continuous integration, causing resolv_integration_test to flake with the default 60s timeout. We're not sure what caused the regression, but it's not due to a change in the Android image and unlikely to affect users. Just bump the timeout to 120s for now. --> <option name="native-test-timeout" value="120000" /> <option name="module-name" value="{MODULE}" /> <option name="runtime-hint" value="10m" /> <!-- test-timeout unit is ms, value = 10 min --> <option name="native-test-timeout" value="600000" /> </test> </configuration>
tests/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ cc_test { test_suites: ["device-tests", "mts"], // This won't work with test_config // require_root: true, test_config: "resolv_stress_test_config.xml", // TODO: Remove after b/152303924 fixing test_config_template: ":resolv_test_config_template", defaults: ["netd_defaults", "resolv_test_defaults"], srcs: [ "resolv_stress_test.cpp", Loading
tests/resolv_gold_test_config.xml +2 −1 Original line number Diff line number Diff line Loading @@ -15,9 +15,10 @@ --> <configuration description="Configuration for resolv gold tests"> <option name="test-suite-tag" value="mts" /> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> <option name="cleanup" value="true" /> <option name="push" value="resolv_gold_test->/data/local/tmp/resolv_gold_test" /> <!-- Temporary solotuon for b/151392634 --> <option name="push" value="testdata->/data/local/tmp/testdata/" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> Loading