Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ff7d2a0 authored by Luke Huang's avatar Luke Huang
Browse files

Fix resolv_gold_test failure problem in MTS.

MTS can not handle the test with testdata correctly.
This is a workaround to push the required testdata manually by proper
test_config.

Bug: 151392634
Bug: 151122313
Test: mts-tradefed run mts-dnsresolver
Test: atest resolv_gold_test

Change-Id: I0b148535d4e0aa7b272bf2af64fdb4f27f4f7e83
parent f6d037e2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,10 @@ cc_test {
    name: "resolv_gold_test",
    test_suites: ["device-tests", "mts"],
    require_root: true,
    // b/151392634, this is a workaround because MTS
    // can not handle the test with testdata correctly.
    // TODO: Remove the xml after MTS fixing the problem.
    test_config: "resolv_gold_test_config.xml",
    defaults: ["netd_defaults"],
    data: ["testdata/pb/*.pb"],
    srcs: [
+31 −0
Original line number Diff line number Diff line
<?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="Configuration for resolv gold tests">
   <option name="test-suite-tag" value="mts" />
   <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
       <option name="cleanup" value="true" />
       <option name="push" value="resolv_gold_test->/data/local/tmp/resolv_gold_test" />
       <option name="push" value="testdata->/data/local/tmp/testdata/" />
   </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_gold_test" />
       <option name="runtime-hint" value="10m" />
       <!-- test-timeout unit is ms, value = 10 min -->
       <option name="native-test-timeout" value="600000" />
   </test>
</configuration>