1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2021 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<configuration description="Config for MTS Libcore OkHttp test cases">
17    <option name="config-descriptor:metadata" key="component" value="libcore" />
18    <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
19    <!-- Test is eligible to run on Android Multiuser users other than SYSTEM.
20         See source.android.com/devices/tech/admin/multi-user#user_types -->
21    <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
22    <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
23    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
24        <!-- This MTS test module requires wifi, ensure wifi is on -->
25        <option name="run-command" value="settings put global wifi_on 1" />
26        <option name="run-command" value="svc wifi enable" />
27        <option name="run-command" value="mkdir -p /data/local/tmp/ctslibcore/java.io.tmpdir" />
28        <option name="run-command" value="mkdir -p /data/local/tmp/ctslibcore/user.home" />
29        <option name="teardown-command" value="rm -rf /data/local/tmp/ctslibcore" />
30    </target_preparer>
31    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
32        <option name="cleanup-apks" value="true" />
33        <!-- this has just the instrumentation which acts as the tests we want to run -->
34        <option name="test-file-name" value="MtsLibcoreOkHttpTestCases.apk" />
35    </target_preparer>
36    <test class="com.android.compatibility.testtype.LibcoreTest" >
37        <option name="package" value="android.libcore.cts.okhttp" />
38        <option name="instrumentation-arg" key="filter"
39                value="com.android.cts.core.runner.ExpectationBasedFilter" />
40        <option name="core-expectation" value="/knownfailures.txt" />
41        <option name="runtime-hint" value="15m"/>
42        <!-- 20x default timeout of 600sec -->
43        <option name="shell-timeout" value="12000000"/>
44        <option name="hidden-api-checks" value="false"/>
45    </test>
46
47    <object type="module_controller" class="com.android.tradefed.testtype.suite.module.TestFailureModuleController">
48        <option name="screenshot-on-failure" value="false" />
49    </object>
50
51    <!-- When this test is run in a Mainline context (e.g. with `mts-tradefed`), only enable it if
52         one of the Mainline modules below is present on the device used for testing. -->
53    <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
54        <!-- ART Mainline Module (internal version). -->
55        <option name="mainline-module-package-name" value="com.google.android.art" />
56        <!-- ART Mainline Module (external (AOSP) version). -->
57        <option name="mainline-module-package-name" value="com.android.art" />
58    </object>
59</configuration>
60