• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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="Runs Platform UiBench Microbenchmark Tests.">
17
18    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
19    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
20        <option name="push-file" key="trace_config_detailed.textproto" value="/data/misc/perfetto-traces/trace_config.textproto" />
21    </target_preparer>
22
23    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
24        <option name="test-file-name" value="UiBenchMicrobenchmark.apk" />
25        <option name="test-file-name" value="UiBench.apk" />
26    </target_preparer>
27
28    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
29        <option name="pull-pattern-keys" value="perfetto_file_path" />
30    </metrics_collector>
31
32    <option name="post-boot-command" value="am broadcast -a com.google.android.clockwork.action.TEST_MODE" />
33    <option name="post-boot-command" value="setprop debug.hwui.filter_test_overhead true" />
34    <option name="post-boot-command" value="settings put secure accessibility_disable_animations 0" />
35
36    <option name="test-tag" value="UiBenchMicrobenchmarks" />
37
38    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
39        <option name="instrumentation-arg" key="newRunListenerMode" value="true" />
40        <option name="package" value="com.android.uibench.microbenchmark" />
41        <!-- Uncomment the below option to run only subset of tests -->
42        <option name="class" value="com.android.uibench.microbenchmark.UiBenchInvalidateMicrobenchmark#testInvalidate" />
43        <option name="device-listeners" value="android.device.collectors.PerfettoListener,android.device.collectors.JankListener,android.device.collectors.SfStatsListener" />
44        <option name="instrumentation-arg" key="iterations" value="2" />
45        <!-- Args are used for renaming the test name with the iteration number -->
46        <option name="instrumentation-arg" key="rename-iterations" value="true" />
47        <option name="instrumentation-arg" key="iteration-separator" value="$" />
48        <!-- Perfetto trace related arguments -->
49        <option name="instrumentation-arg" key="perfetto_config_text_proto" value="true" />
50        <option name="instrumentation-arg" key="perfetto_config_file" value="trace_config.textproto" />
51        <!-- Jank listener related arguments -->
52        <option name="instrumentation-arg" key="jank-listener:jank-package-names" value="com.android.test.uibench" />
53    </test>
54
55</configuration>
56