blob: d08dd35eb31016afc2afa5301fa787ddd3aea89a [file] [log] [blame]
Bert McMeenf902a282015-03-06 14:44:22 -08001page.title=Running the tests
2@jd:body
3
4<!--
5 Copyright 2015 The Android Open Source Project
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18-->
19
20<div id="qv-wrapper">
21 <div id="qv">
22 <h2>In this document</h2>
23 <ol id="auto-toc">
24 </ol>
25 </div>
26</div>
Heidi von Markhama8166e22016-06-24 16:18:58 -070027<p>This page provides instructions for running deqp tests in Linux and Windows
28environments, using command line arguments, and working with the Android
29application package.</p>
Bert McMeenf902a282015-03-06 14:44:22 -080030
31<h2 id=linux_and_windows_environments>Linux and Windows environments</h2>
32
Heidi von Markhama8166e22016-06-24 16:18:58 -070033<p>Start by copying the following files and directories to the target.</p>
Bert McMeenf902a282015-03-06 14:44:22 -080034
35<table>
36 <tr>
37 <th>Module</th>
38 <th>Directory</th>
39 <th>Target</th>
40 </tr>
41
42 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070043 <td>Execution Server</td>
Bert McMeenf902a282015-03-06 14:44:22 -080044 <td><code>build/execserver/execserver</code></td>
Heidi von Markhama8166e22016-06-24 16:18:58 -070045 <td><code>&lt;dst&gt;/execserver</code></td>
Bert McMeenf902a282015-03-06 14:44:22 -080046 </tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070047
Bert McMeenf902a282015-03-06 14:44:22 -080048 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070049 <td>EGL Module</td>
Bert McMeenf902a282015-03-06 14:44:22 -080050 <td><code>build/modules/egl/deqp-egl</code></td>
Heidi von Markhama8166e22016-06-24 16:18:58 -070051 <td><code>&lt;dst&gt;/deqp-egl</code></td>
Bert McMeenf902a282015-03-06 14:44:22 -080052 </tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070053
Bert McMeenf902a282015-03-06 14:44:22 -080054 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070055 <td rowspan=2 style="vertical-align:middle">GLES2 Module</td>
56 <td><code>build/modules/gles2/deqp-gles2</code></td>
57 <td><code>&lt;dst&gt;/deqp-gles2</code></td>
Bert McMeenf902a282015-03-06 14:44:22 -080058 </tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070059
60
Bert McMeenf902a282015-03-06 14:44:22 -080061 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070062 <td><code>data/gles2</code></td>
63 <td><code>&lt;dst&gt;/gles2</code></td>
Bert McMeenf902a282015-03-06 14:44:22 -080064 </tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070065
66
67
Bert McMeenf902a282015-03-06 14:44:22 -080068 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070069 <td rowspan=2 style="vertical-align:middle">GLES3 Module</td>
70 <td><code>build/modules/gles3/deqp-gles3</td>
71 <td><code>&lt;dst&gt;/deqp-gles3</code></td>
Bert McMeenf902a282015-03-06 14:44:22 -080072 </tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -070073
74 <tr>
75 <td><code>data/gles3</code></td>
76 <td><code>&lt;dst&gt;/gles3</code></td>
77 </tr>
78
79 <tr>
80 <td rowspan=2 style="vertical-align:middle">GLES3.1 Module</td>
81 <td><code>build/modules/gles31/deqp-gles31</code></td>
82 <td><code>&lt;dst&gt;/deqp-gles31</code></td>
83 </tr>
84
85 <tr>
86 <td><code>data/gles31</code></td>
87 <td><code>&lt;dst&gt;/gles31</code></td>
88 </tr>
89
90
91 <tr>
92 <td rowspan=2 style="vertical-align:middle">GLES3.2 Module</td>
93 <td><code>build/modules/gles32/deqp-gles32</code></td>
94 <td><code>&lt;dst&gt;/deqp-gles32</code></td>
95 </tr>
96
97 <tr>
98 <td><code>data/gles32</code></td>
99 <td><code>&lt;dst&gt;/gles32</code></td>
100 </tr>
101
Bert McMeenf902a282015-03-06 14:44:22 -0800102</table>
103
Heidi von Markhama8166e22016-06-24 16:18:58 -0700104<p>You can deploy the execution service and test binaries anywhere in the target
105file system; however, test binaries expect to find data directories in the
106current working directory. When ready, start the Test Execution Service on the
107target device. For details on starting the service, see
108<a href="{@docRoot}devices/graphics/port-tests.html#test_execution_service">Test
109execution service</a>.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800110
111<h2 id=command_line_arguments>Command line arguments</h2>
112
Heidi von Markhama8166e22016-06-24 16:18:58 -0700113<p>The following table lists command line arguments that affect execution of all
114test programs.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800115
116<table width="100%">
117<col style="width:50%">
118<col style="width:50%">
119 <tr>
120 <th>Argument</th>
121 <th>Description</th>
122 </tr>
123
124 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700125<td><code>--deqp-case=&lt;casename&gt;</code></td>
126<td>Run cases that match a given pattern. Wildcard (*) is supported.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800127 </tr>
128
129 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700130<td><code>--deqp-log-filename=&lt;filename&gt;</code></td>
131<td>Write test results to the file whose name you provide. The test execution
132service will set the filename when starting a test.</td>
133 </tr>
134
135 <tr>
136 <td><code>--deqp-stdin-caselist<br/>
137--deqp-caselist=&lt;caselist&gt;<br/>
138--deqp-caselist-file=&lt;filename&gt;</code></td>
139<td>Read case list from stdin or from a given argument. The test execution
140service will set the argument according to the execution request received. See
141the next section for a description of the case list format.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800142 </tr>
143 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700144<td><code>--deqp-test-iteration-count=&lt;count&gt;</code></td>
145<td>Override iteration count for tests that support a variable number of
146iterations.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800147 </tr>
148 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700149 <td><code>--deqp-base-seed=&lt;seed&gt;</code></td>
150 <td>Base seed for the test cases that use randomization.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800151 </tr>
152</table>
153
154<h3 id=gles2_and_gles3-specific_arguments>GLES2 and GLES3-specific arguments</h3>
155
156The following table lists the GLES2- and GLES3-specific arguments.
157
158<table>
159<table width="100%">
160<col style="width:50%">
161<col style="width:50%">
162 <tr>
163 <th>Argument</th>
164 <th>Description</th>
165 </tr>
166 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700167 <td><code>--deqp-gl-context-type=&lt;type&gt;</code></td>
168 <td>OpenGL context type. Available context types depend on the platform. On
169 platforms supporting EGL, the value <code>egl</code> can be used to select
170 the EGL context.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800171 </tr>
172 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700173 <td><code>--deqp-gl-config-id=&lt;id&gt;</code></td>
174 <td>Run tests for the provided GL configuration ID. Interpretation is
175 platform-dependent. On the EGL platform, this is the EGL configuration ID.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800176 </tr>
177 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700178 <td><code>--deqp-gl-config-name=&lt;name&gt;</code></td>
179 <td><p>Run tests for a named GL configuration. Interpretation is
180 platform-dependent. For EGL, the format is
181 <code>rgb(a)&lt;bits&gt;d&lt;bits&gt;s&lt;bits&gt;</code>. For example, a
182 value of <code>rgb888s8</code> will select the first configuration where the
183 color buffer is RGB888 and the stencil buffer has 8 bits.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800184 </tr>
185 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700186 <td><code>--deqp-gl-context-flags=&lt;flags&gt;</code></td>
187 <td>Creates a context. Specify <code>robust</code> or <code>debug</code>.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800188 </tr>
189 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700190 <td><code>--deqp-surface-width=&lt;width&gt;<br/>
191 --deqp-surface-height=&lt;height&gt;</code></td>
192 <td>Try to create a surface with a given size. Support for this is optional.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800193 </tr>
194 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700195 <td><code>--deqp-surface-type=&lt;type&gt;</code></td>
196 <td>Use a given surface type as the main test rendering target. Possible
197 types are <code>window</code>, <code>pixmap</code>, <code>pbuffer</code>,
198 and <code>fbo</code>.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800199 </tr>
200 <tr>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700201 <td><code>--deqp-screen-rotation=&lt;rotation&gt;</code></td>
202 <td>Screen orientation in increments of 90 degrees for platforms that
203 support it.</td>
Bert McMeenf902a282015-03-06 14:44:22 -0800204 </tr>
205</table>
206
207<h3 id=test_case_list_format>Test case list format</h3>
208
Heidi von Markhama8166e22016-06-24 16:18:58 -0700209<p>The test case list can be given in two formats. The first option is to list
210the full name of each test on a separate line in a standard ASCII file. As the
211test sets grow, the repetitive prefixes can be cumbersome. To avoid repeating
212the prefixes, use a trie (also known as a prefix tree) syntax shown below.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800213
214<pre>
215{nodeName{firstChild{…},…lastChild{…}}}
216</pre>
217
Heidi von Markhama8166e22016-06-24 16:18:58 -0700218<p>For example:</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800219
220<pre>
221{dEQP-EGL{config-list,create_context{rgb565_depth_stencil}}}
222</pre>
223
Heidi von Markhama8166e22016-06-24 16:18:58 -0700224<p>Translates into the following two test cases:</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800225
226<pre>
227dEQP-EGL.config_list
228dEQP-EGL.create_context.rgb565_depth_stencil
229</pre>
230
231<h2 id=android>Android</h2>
232
Heidi von Markhama8166e22016-06-24 16:18:58 -0700233<p>The Android application package contains all required components, including
234the test execution service, test binaries, and data files. The test activity is
235a <code>NativeActivity</code> that uses EGL (requires Android 3.2 or higher).</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800236
Heidi von Markhama8166e22016-06-24 16:18:58 -0700237<p>The application package can be installed with the following command (name
238shown is the name of the APK in the Android CTS package; which name depends on
239the build):</p>
240<pre>$ adb d install r com.drawelements.deqp.apk</pre>
Bert McMeenf902a282015-03-06 14:44:22 -0800241
242<p>To launch the test execution service and to setup port forwarding, use the
243following:</p>
244<pre>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700245$ adb d forward tcp:50016 tcp:50016
246$ adb d shell am start n com.drawelements.deqp/.execserver.ServiceStarter
Bert McMeenf902a282015-03-06 14:44:22 -0800247</pre>
248
249<p>Debug prints can be enabled by executing the following before starting the
250tests:</p>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700251
Bert McMeenf902a282015-03-06 14:44:22 -0800252<pre>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700253$ adb d shell setprop log.tag.dEQP DEBUG
Bert McMeenf902a282015-03-06 14:44:22 -0800254</pre>
255
Heidi von Markhama8166e22016-06-24 16:18:58 -0700256<h3 id=executing_tests_on_android_without_android_cts>Executing tests on
257Android without Android CTS</h3>
Bert McMeenf902a282015-03-06 14:44:22 -0800258
Heidi von Markhama8166e22016-06-24 16:18:58 -0700259<p>To manually start the test execution activity, construct an Android intent
260that targets <code>android.app.NativeActivity</code>. The activities can be
261found in the <code>com.drawelements.deqp</code> package. The command line must
262be supplied as an extra string with key <code>"cmdLine"</code> in the Intent.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800263
Heidi von Markhama8166e22016-06-24 16:18:58 -0700264<p>A test log is written to <code>/sdcard/dEQP-log.qpa</code>. If the test run
265does not start normally, additional debug information is available in the device
266log.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800267
Heidi von Markhama8166e22016-06-24 16:18:58 -0700268<p>You can launch an activity from the command line using the <code>am</code>
269utility. For example, to run <code>dEQP-GLES2.info</code> tests on a platform
270supporting <code>NativeActivity,</code> use the following commands.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800271
Heidi von Markhama8166e22016-06-24 16:18:58 -0700272<pre>$ adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \
273cmdLine "deqp --deqp-case=dEQP-GLES2.info.* --deqp-log-filename=/sdcard/dEQP-Log.qpa
Bert McMeenf902a282015-03-06 14:44:22 -0800274</pre>
275
276<h3 id=debugging_on_android>Debugging on Android</h3>
277
278<p>To run the tests under the GDB debugger on Android, first compile and install
279the debug build by running the following two scripts:</p>
280
281<pre>
Heidi von Markhama8166e22016-06-24 16:18:58 -0700282$ python android/scripts/build.py --native-build-type=Debug
283$ python android/scripts/install.py
Bert McMeenf902a282015-03-06 14:44:22 -0800284</pre>
285
Heidi von Markhama8166e22016-06-24 16:18:58 -0700286<p>After the debug build is installed on the device, to launch the tests under
287GDB running on the host, run the following command:</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800288
Heidi von Markhama8166e22016-06-24 16:18:58 -0700289<pre>$ python android/scripts/debug.py \
290--deqp-commandline="--deqp-log-filename=/sdcard/TestLog.qpa --deqp-case=dEQP-GLES2.functional.*"
Bert McMeenf902a282015-03-06 14:44:22 -0800291</pre>
292
Heidi von Markhama8166e22016-06-24 16:18:58 -0700293<p>The deqp command line depends on the test cases to be executed and other
294required parameters. The script adds a default breakpoint at the beginning of
295the deqp execution (<code>tcu::App::App</code>).</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800296
Heidi von Markhama8166e22016-06-24 16:18:58 -0700297<p>The <code>debug.py</code> script accepts multiple command line arguments for
298actions such as setting breakpoints for debugging, gdbserver connection
299parameters, and paths to additional binaries to debug (use <code>debug.py
300--help</code> for all arguments and explanations). The script also copies some
301default libraries from the target device to get symbol listings.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800302
Heidi von Markhama8166e22016-06-24 16:18:58 -0700303<p>To step through driver code (such as when the GDB needs to know the locations
304of the binaries with full debug information), add more libraries via
305<code>debug.py</code> command line parameters. This script writes out a
306configuration file for the GDB starting from line 132 of the script file. You
307can provide additional paths to binaries, etc., but supplying correct command
308line parameters should be enough.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800309
Heidi von Markhama8166e22016-06-24 16:18:58 -0700310<p class="note"><strong>Note:</strong> On Windows, the GDB binary requires
311<code>libpython2.7.dll</code>. Before launching <code>debug.py</code>, add
312<code>&lt;path-to-ndk&gt;/prebuilt/windows/bin</code> to the PATH variable.</p>
Bert McMeenf902a282015-03-06 14:44:22 -0800313
Heidi von Markhama8166e22016-06-24 16:18:58 -0700314<p class="note"><strong>Note:</strong> Native code debugging does not work on
315stock Android 4.3; for workarounds, refer to
316<a href="https://code.google.com/p/android/issues/detail?id=58373">https://code.google.com/p/android/issues/detail?id=58373</a>.
317Android 4.4 and higher do not contain this bug.</p>