1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 * Copyright 2018 Google Inc. All Rights Reserved. 4 --> 5<configuration description="Tests WM Flicker detection library {MODULE}"> 6 <option name="test-tag" value="FlickerLibTest"/> 7 <!-- Needed for storing the perfetto trace files in the sdcard/test_results--> 8 <option name="isolated-storage" value="false"/> 9 10 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> 11 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> 12 <!-- disable DeprecatedTargetSdk warning --> 13 <option name="run-command" value="setprop debug.wm.disable_deprecated_target_sdk_dialog 1"/> 14 <!-- keeps the screen on during tests --> 15 <option name="screen-always-on" value="on"/> 16 <!-- prevents the phone from restarting --> 17 <option name="force-skip-system-props" value="true"/> 18 <!-- restart launcher to activate TAPL --> 19 <option name="run-command" 20 value="setprop ro.test_harness 1 ; am force-stop com.google.android.apps.nexuslauncher"/> 21 <!-- cleanup flicker output dir --> 22 <option name="run-command" value="rm -rf /sdcard/flicker"/> 23 </target_preparer> 24 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 25 <option name="cleanup-apks" value="true"/> 26 <option name="test-file-name" value="{MODULE}.apk"/> 27 </target_preparer> 28 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 29 <option name="test-user-token" value="%TEST_USER%"/> 30 </target_preparer> 31 <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> 32 <option name="push-file" 33 key="trace_config.textproto" 34 value="/data/misc/perfetto-traces/trace_config.textproto" 35 /> 36 <!--Install the content provider automatically when we push some file in sdcard folder.--> 37 <!--Needed to avoid the installation during the test suite.--> 38 <option name="push-file" key="trace_config.textproto" value="/sdcard/sample.textproto"/> 39 </target_preparer> 40 41 <test class="com.android.tradefed.testtype.AndroidJUnitTest"> 42 <option name="exclude-annotation" value="androidx.test.filters.FlakyTest"/> 43 <option name="package" value="{PACKAGE}"/> 44 <option name="shell-timeout" value="6600s"/> 45 <option name="test-timeout" value="6600s"/> 46 <option name="hidden-api-checks" value="false"/> 47 <!-- PerfettoListener related arguments --> 48 <option name="device-listeners" value="android.device.collectors.PerfettoListener"/> 49 <option name="instrumentation-arg" key="perfetto_config_text_proto" value="true"/> 50 <option name="instrumentation-arg" 51 key="perfetto_config_file" 52 value="trace_config.textproto" 53 /> 54 <option name="instrumentation-arg" key="per_run" value="true"/> 55 <option name="instrumentation-arg" key="perfetto_persist_pid_track" value="true"/> 56 </test> 57 58 <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> 59 <option name="pull-pattern-keys" value="perfetto_file_path"/> 60 <option name="directory-keys" value="/data/user/0/android.tools/files"/> 61 <option name="directory-keys" value="/data/user/0/android.tools.integration/files"/> 62 <option name="collect-on-run-ended-only" value="true"/> 63 <option name="clean-up" value="true"/> 64 </metrics_collector> 65</configuration> 66