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

Commit 14e4241f authored by Luke Huang's avatar Luke Huang Committed by Automerger Merge Worker
Browse files

Build both 32bit and 64bit binaries for resolv tests am: 0b6c4937 am:...

Build both 32bit and 64bit binaries for resolv tests am: 0b6c4937 am: c7e9d4c7 am: 4f18d802 am: 9b9c71a1

Change-Id: I35e47a25a5de455561187edf5dae95d40439f362
parents 3dbac6b9 9b9c71a1
Loading
Loading
Loading
Loading
+22 −5
Original line number Diff line number Diff line
@@ -52,6 +52,25 @@ cc_defaults {
    ],
}

cc_defaults {
    // This is necessary to have the coverage tests run on cf_x86_phone.
    // Because the test_suite target is 64 bit and the test infra is running the 64 bit test
    // suite on cf_x86_phone (32-bit) for coverage.
    // See b/147785146 for details.
    // TODO: Remove this target after coverage test switched to 64-bit device.
    name: "resolv_test_mts_coverage_defaults",
    test_config_template: ":resolv_test_config_template",
    compile_multilib: "both",
    multilib: {
        lib32: {
            suffix: "32",
        },
        lib64: {
            suffix: "64",
        },
    },
}

cc_library {
    name: "libnetd_resolv",
    version_script: "libnetd_resolv.map.txt",
@@ -205,10 +224,9 @@ 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"],
    // TODO: Drop root privileges and make it be an real unit test.
    // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device.
    defaults: ["netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults"],
    srcs: [
        "resolv_cache_unit_test.cpp",
        "resolv_callback_unit_test.cpp",
@@ -240,5 +258,4 @@ cc_test {
        "server_configurable_flags",
        "stats_proto",
    ],
    compile_multilib: "first",
}
+5 −2
Original line number Diff line number Diff line
@@ -13,14 +13,17 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<!-- Temporary solution for MTS coverage because MTS coverage can only run with FilesPusher.
     See b/152303924 for details.
<!-- Workaround for MTS coverage because test infra is running the 64 bit
     test suite on cf_x86_phone (32-bit). See b/147785146 for details.
     We need to push the correct binary against the architecture of
     test device with "append-bitness" option.
-->
<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="{MODULE}->/data/local/tmp/{MODULE}" />
       <option name="append-bitness" value="true" />
   </target_preparer>
   <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
   <test class="com.android.tradefed.testtype.GTest" >
+9 −6
Original line number Diff line number Diff line
@@ -103,7 +103,9 @@ cc_test {
        "server_configurable_flags",
        "stats_proto",
    ],
    compile_multilib: "first",
    // MTS test binary can't be built under compile_multilib = "both" and having test data.
    // However, MTS coverage requires 32 bit test binary to run.
    compile_multilib: "32",
}

cc_test {
@@ -111,9 +113,8 @@ cc_test {
    test_suites: ["device-tests", "mts"],
    // This won't work with test_config
    // require_root: true,
    // TODO: Remove after b/152303924 fixing
    test_config_template: ":resolv_test_config_template",
    defaults: ["netd_defaults", "resolv_test_defaults"],
    // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device.
    defaults: ["netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults"],
    srcs: [
        "resolv_stress_test.cpp",
    ],
@@ -134,14 +135,13 @@ cc_test {
        "netd_event_listener_interface-ndk_platform",
        "netd_aidl_interface-ndk_platform",
    ],
    compile_multilib: "first",
}

cc_test {
    name: "resolv_integration_test",
    test_suites: ["device-tests", "mts"],
    require_root: true,
    test_config: "resolv_integration_test_config.xml",
    test_config_template: ":resolv_test_config_template",
    defaults: ["netd_defaults", "resolv_test_defaults"],
    tidy: false, // cuts test build time by > 1m30s
    srcs: [
@@ -174,6 +174,9 @@ cc_test {
        "netd_aidl_interface-ndk_platform",
        "netd_event_listener_interface-ndk_platform",
    ],
    // This test talks to the DnsResolver module over a binary protocol on a socket, so keep it as
    // multilib setting is worth because we might be able to get some coverage for the case where
    // 32bit apps talk to 64bit resolvers.
    compile_multilib: "both",
    multilib: {
        lib32: {
+0 −31
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 integration 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_integration_test->/data/local/tmp/resolv_integration_test" />
       <option name="append-bitness" value="true" />
   </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_integration_test" />
       <option name="runtime-hint" value="10m" />
       <!-- test-timeout unit is ms, value = 10 min -->
       <option name="native-test-timeout" value="600000" />
   </test>
</configuration>