1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2023 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License. 16 --> 17<configuration description="Runs WindowManager Shell Flicker Tests {MODULE}"> 18 <option name="test-tag" value="FlickerTests"/> 19 <!-- Needed for storing the perfetto trace files in the sdcard/test_results--> 20 <option name="isolated-storage" value="false"/> 21 22 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> 23 <!-- keeps the screen on during tests --> 24 <option name="screen-always-on" value="on"/> 25 <!-- prevents the phone from restarting --> 26 <option name="force-skip-system-props" value="true"/> 27 <!-- set WM tracing verbose level to all --> 28 <option name="run-command" value="cmd window tracing level all"/> 29 <!-- set WM tracing to frame (avoid incomplete states) --> 30 <option name="run-command" value="cmd window tracing frame"/> 31 <!-- disable betterbug as it's log collection dialogues cause flakes in e2e tests --> 32 <option name="run-command" value="pm disable com.google.android.internal.betterbug"/> 33 <!-- ensure lock screen mode is swipe --> 34 <option name="run-command" value="locksettings set-disabled false"/> 35 <!-- restart launcher to activate TAPL --> 36 <option name="run-command" 37 value="setprop ro.test_harness 1 ; am force-stop com.google.android.apps.nexuslauncher"/> 38 <!-- Increase trace size: 20mb for WM and 80mb for SF --> 39 <option name="run-command" value="cmd window tracing size 20480"/> 40 <option name="run-command" value="su root service call SurfaceFlinger 1029 i32 81920"/> 41 </target_preparer> 42 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 43 <option name="test-user-token" value="%TEST_USER%"/> 44 <option name="run-command" value="rm -rf /data/user/%TEST_USER%/files/*"/> 45 <option name="run-command" value="settings put secure show_ime_with_hard_keyboard 1"/> 46 <option name="run-command" value="settings put system show_touches 1"/> 47 <option name="run-command" value="settings put system pointer_location 1"/> 48 <option name="teardown-command" 49 value="settings delete secure show_ime_with_hard_keyboard"/> 50 <option name="teardown-command" value="settings delete system show_touches"/> 51 <option name="teardown-command" value="settings delete system pointer_location"/> 52 <option name="teardown-command" 53 value="cmd overlay enable com.android.internal.systemui.navbar.gestural"/> 54 </target_preparer> 55 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 56 <option name="cleanup-apks" value="true"/> 57 <option name="test-file-name" value="{MODULE}.apk"/> 58 <option name="test-file-name" value="FlickerTestApp.apk"/> 59 </target_preparer> 60 <!-- Needed for pushing the trace config file --> 61 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> 62 <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> 63 <option name="push-file" 64 key="trace_config.textproto" 65 value="/data/misc/perfetto-traces/trace_config.textproto" 66 /> 67 <!--Install the content provider automatically when we push some file in sdcard folder.--> 68 <!--Needed to avoid the installation during the test suite.--> 69 <option name="push-file" key="trace_config.textproto" value="/sdcard/sample.textproto"/> 70 </target_preparer> 71 <test class="com.android.tradefed.testtype.AndroidJUnitTest"> 72 <option name="package" value="{PACKAGE}"/> 73 <option name="shell-timeout" value="6600s"/> 74 <option name="test-timeout" value="6000s"/> 75 <option name="hidden-api-checks" value="false"/> 76 <option name="device-listeners" value="android.device.collectors.PerfettoListener"/> 77 <!-- PerfettoListener related arguments --> 78 <option name="instrumentation-arg" key="perfetto_config_text_proto" value="true"/> 79 <option name="instrumentation-arg" 80 key="perfetto_config_file" 81 value="trace_config.textproto" 82 /> 83 <option name="instrumentation-arg" key="per_run" value="true"/> 84 </test> 85 <!-- Needed for pulling the collected trace config on to the host --> 86 <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> 87 <option name="pull-pattern-keys" value="perfetto_file_path"/> 88 <option name="directory-keys" 89 value="/data/user/0/com.android.wm.shell.flicker/files"/> 90 <option name="directory-keys" 91 value="/data/user/0/com.android.wm.shell.flicker.bubbles/files"/> 92 <option name="directory-keys" 93 value="/data/user/0/com.android.server.wm.flicker.pip/files"/> 94 <option name="directory-keys" 95 value="/data/user/0/com.android.server.wm.flicker.splitscreen/files"/> 96 <option name="directory-keys" 97 value="/data/user/0/com.android.server.wm.flicker.service/files"/> 98 <option name="collect-on-run-ended-only" value="true"/> 99 <option name="clean-up" value="true"/> 100 </metrics_collector> 101</configuration> 102