| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- Copyright 2024 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="Runs Linux Terminal test"> | |
| <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" /> | |
| <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" /> | |
| <option name="config-descriptor:metadata" key="parameter" value="secondary_user" /> | |
| <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> | |
| <option name="screen-always-on" value="on" /> | |
| <option name="screen-saver" value="off"/> | |
| </target_preparer> | |
| <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup"> | |
| <option name="test-file-name" value="TerminalAppTests.apk" /> | |
| </target_preparer> | |
| <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"> | |
| <option name="force-root" value="true"/> | |
| </target_preparer> | |
| <!-- Ensure that the capability to run test --> | |
| <target_preparer class="com.android.tradefed.targetprep.RunHostScriptTargetPreparer"> | |
| <option name="script-file" value="TerminalAppTests-precondition-checker.sh" /> | |
| </target_preparer> | |
| <!-- Push the helper script to the device --> | |
| <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> | |
| <option name="push" value="TerminalAppTests-helper.sh->/data/local/tmp/helper.sh"/> | |
| <option name="post-push" value="chmod 755 /data/local/tmp/helper.sh"/> | |
| <option name="cleanup" value="true"/> | |
| </target_preparer> | |
| <!-- Run the helper script to enable/disable the Terminal app before and after the test run --> | |
| <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> | |
| <option name="run-command" value="/data/local/tmp/helper.sh setup"/> | |
| <option name="teardown-command" value="/data/local/tmp/helper.sh teardown"/> | |
| </target_preparer> | |
| <test class="com.android.tradefed.testtype.AndroidJUnitTest"> | |
| <option name="package" value="com.android.virtualization.terminal.test"/> | |
| <option name="runner" value="androidx.test.runner.AndroidJUnitRunner"/> | |
| <!-- Set timeout to 30min for downloading, installing, and booting --> | |
| <option name="test-timeout" value="1800000" /> | |
| <option name="shell-timeout" value="1800000" /> | |
| </test> | |
| </configuration> |