Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | * Copyright 2018 Google Inc. All Rights Reserved. |
| 4 | --> |
Nataniel Borges | 160b9df | 2023-05-12 12:29:57 +0000 | [diff] [blame] | 5 | <configuration description="Runs WindowManager {MODULE}"> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 6 | <option name="test-tag" value="FlickerTests"/> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 7 | <!-- Needed for storing the perfetto trace files in the sdcard/test_results--> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 8 | <option name="isolated-storage" value="false"/> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 9 | |
Hsin-Yi Chen | 677a002 | 2019-03-19 13:20:53 +0800 | [diff] [blame] | 10 | <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> |
Linus Tufvesson | 23f0d5f | 2024-04-18 13:37:42 +0200 | [diff] [blame] | 11 | <!-- disable DeprecatedTargetSdk warning --> |
| 12 | <option name="run-command" value="setprop debug.wm.disable_deprecated_target_sdk_dialog 1"/> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 13 | <!-- keeps the screen on during tests --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 14 | <option name="screen-always-on" value="on"/> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 15 | <!-- prevents the phone from restarting --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 16 | <option name="force-skip-system-props" value="true"/> |
Nataniel Borges | 992a155 | 2019-09-25 17:12:40 +0200 | [diff] [blame] | 17 | <!-- set WM tracing verbose level to all --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 18 | <option name="run-command" value="cmd window tracing level all"/> |
Nataniel Borges | d85b2e2 | 2021-03-05 15:52:05 +0100 | [diff] [blame] | 19 | <!-- set WM tracing to frame (avoid incomplete states) --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 20 | <option name="run-command" value="cmd window tracing frame"/> |
Nataniel Borges | 12fafee | 2022-10-03 20:07:04 +0000 | [diff] [blame] | 21 | <!-- ensure lock screen mode is swipe --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 22 | <option name="run-command" value="locksettings set-disabled false"/> |
Sam Dubey | 261cc40 | 2022-11-10 07:46:34 +0000 | [diff] [blame] | 23 | <!-- disable betterbug as it's log collection dialogues cause flakes in e2e tests --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 24 | <option name="run-command" value="pm disable com.google.android.internal.betterbug"/> |
Nataniel Borges | 545adf8 | 2020-04-21 16:36:00 +0000 | [diff] [blame] | 25 | <!-- restart launcher to activate TAPL --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 26 | <option name="run-command" |
| 27 | value="setprop ro.test_harness 1 ; am force-stop com.google.android.apps.nexuslauncher"/> |
Nataniel Borges | 33aad1b | 2023-05-02 09:52:30 +0000 | [diff] [blame] | 28 | <!-- Increase trace size: 20mb for WM and 80mb for SF --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 29 | <option name="run-command" value="cmd window tracing size 20480"/> |
| 30 | <option name="run-command" value="su root service call SurfaceFlinger 1029 i32 81920"/> |
Nataniel Borges | f7bb844 | 2023-10-31 16:52:05 +0000 | [diff] [blame] | 31 | <!-- b/307664397 - Ensure camera has the correct permissions and doesn't show a dialog --> |
| 32 | <option name="run-command" |
Nataniel Borges | 3601a65f | 2023-11-03 14:45:18 +0000 | [diff] [blame] | 33 | value="pm grant com.google.android.GoogleCamera android.permission.CAMERA"/> |
| 34 | <option name="run-command" |
| 35 | value="pm grant com.google.android.GoogleCamera android.permission.RECORD_AUDIO"/> |
| 36 | <option name="run-command" |
Nataniel Borges | f7bb844 | 2023-10-31 16:52:05 +0000 | [diff] [blame] | 37 | value="pm grant com.google.android.GoogleCamera android.permission.ACCESS_FINE_LOCATION"/> |
Nataniel Borges | 3601a65f | 2023-11-03 14:45:18 +0000 | [diff] [blame] | 38 | <option name="run-command" |
| 39 | value="pm grant com.google.android.GoogleCamera android.permission.ACCESS_COARSE_LOCATION"/> |
Nataniel Borges | 992a155 | 2019-09-25 17:12:40 +0200 | [diff] [blame] | 40 | </target_preparer> |
Nataniel Borges | a11775f | 2023-01-16 20:57:16 +0000 | [diff] [blame] | 41 | <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 42 | <option name="test-user-token" value="%TEST_USER%"/> |
| 43 | <option name="run-command" value="rm -rf /data/user/%TEST_USER%/files/*"/> |
| 44 | <option name="run-command" value="settings put secure show_ime_with_hard_keyboard 1"/> |
| 45 | <option name="run-command" value="settings put system show_touches 1"/> |
| 46 | <option name="run-command" value="settings put system pointer_location 1"/> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 47 | <option name="teardown-command" |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 48 | value="settings delete secure show_ime_with_hard_keyboard"/> |
| 49 | <option name="teardown-command" value="settings delete system show_touches"/> |
| 50 | <option name="teardown-command" value="settings delete system pointer_location"/> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 51 | <option name="teardown-command" |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 52 | value="cmd overlay enable com.android.internal.systemui.navbar.gestural"/> |
Nataniel Borges | a11775f | 2023-01-16 20:57:16 +0000 | [diff] [blame] | 53 | </target_preparer> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 54 | <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> |
| 55 | <option name="cleanup-apks" value="true"/> |
Nataniel Borges | 160b9df | 2023-05-12 12:29:57 +0000 | [diff] [blame] | 56 | <option name="test-file-name" value="{MODULE}.apk"/> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 57 | <option name="test-file-name" value="FlickerTestApp.apk"/> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 58 | </target_preparer> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 59 | <!-- Needed for pushing the trace config file --> |
| 60 | <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> |
| 61 | <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> |
| 62 | <option name="push-file" |
| 63 | key="trace_config.textproto" |
| 64 | value="/data/misc/perfetto-traces/trace_config.textproto" |
| 65 | /> |
| 66 | <!--Install the content provider automatically when we push some file in sdcard folder.--> |
| 67 | <!--Needed to avoid the installation during the test suite.--> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 68 | <option name="push-file" key="trace_config.textproto" value="/sdcard/sample.textproto"/> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 69 | </target_preparer> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 70 | <test class="com.android.tradefed.testtype.AndroidJUnitTest"> |
Nataniel Borges | 160b9df | 2023-05-12 12:29:57 +0000 | [diff] [blame] | 71 | <option name="package" value="{PACKAGE}"/> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 72 | <option name="shell-timeout" value="6600s"/> |
| 73 | <option name="test-timeout" value="6600s"/> |
| 74 | <option name="hidden-api-checks" value="false"/> |
| 75 | <option name="device-listeners" value="android.device.collectors.PerfettoListener"/> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 76 | <!-- PerfettoListener related arguments --> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 77 | <option name="instrumentation-arg" key="perfetto_config_text_proto" value="true"/> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 78 | <option name="instrumentation-arg" |
| 79 | key="perfetto_config_file" |
| 80 | value="trace_config.textproto" |
| 81 | /> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 82 | <option name="instrumentation-arg" key="per_run" value="true"/> |
Nataniel Borges | 6f6f8ba | 2024-05-14 16:16:23 +0000 | [diff] [blame] | 83 | <option name="instrumentation-arg" key="perfetto_persist_pid_track" value="true"/> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 84 | </test> |
Nataniel Borges | 29178cb | 2022-02-07 17:03:04 +0100 | [diff] [blame] | 85 | <!-- Needed for pulling the collected trace config on to the host --> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 86 | <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 87 | <option name="pull-pattern-keys" value="perfetto_file_path"/> |
| 88 | <option name="directory-keys" |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 89 | value="/data/user/0/com.android.server.wm.flicker.quickswitch/files"/> |
Nataniel Borges | 0b77bab | 2023-05-26 12:50:06 +0000 | [diff] [blame] | 90 | <option name="collect-on-run-ended-only" value="true"/> |
| 91 | <option name="clean-up" value="true"/> |
Vishnu Nair | 8248b7c | 2018-08-01 10:13:36 -0700 | [diff] [blame] | 92 | </metrics_collector> |
| 93 | </configuration> |