aboutsummaryrefslogtreecommitdiff
path: root/en/devices/tech/test_infra/tradefed/fundamentals
diff options
context:
space:
mode:
Diffstat (limited to 'en/devices/tech/test_infra/tradefed/fundamentals')
-rw-r--r--en/devices/tech/test_infra/tradefed/fundamentals/machine_setup.html6
-rw-r--r--en/devices/tech/test_infra/tradefed/fundamentals/options.html24
-rw-r--r--en/devices/tech/test_infra/tradefed/fundamentals/vts.html40
3 files changed, 46 insertions, 24 deletions
diff --git a/en/devices/tech/test_infra/tradefed/fundamentals/machine_setup.html b/en/devices/tech/test_infra/tradefed/fundamentals/machine_setup.html
index 71dcf5c9..47b99bde 100644
--- a/en/devices/tech/test_infra/tradefed/fundamentals/machine_setup.html
+++ b/en/devices/tech/test_infra/tradefed/fundamentals/machine_setup.html
@@ -33,7 +33,7 @@
<p>
From the root directory of the Android source tree:
</p>
-<pre>
+<pre class="devsite-click-to-copy">
<code class="devsite-terminal">source ./build/make/envsetup.sh</code>
<code class="devsite-terminal">lunch &lt;device-target&gt;</code>
<code class="devsite-terminal">make tradefed-all -j8</code>
@@ -44,7 +44,7 @@
<p>
TradeFed requires the <code>adb</code> utility in your <code>$PATH</code>:
</p>
-<pre class="devsite-terminal">
+<pre class="devsite-terminal devsite-click-to-copy">
export PATH=$PATH:&lt;path/to/adb&gt;
</pre>
@@ -52,7 +52,7 @@ export PATH=$PATH:&lt;path/to/adb&gt;
Once TradeFed is built, the <code>tradefed.sh</code> launcher script is
accessible from your path. To launch the Trade Federation console:
</p>
-<pre class="devsite-terminal">
+<pre class="devsite-terminal devsite-click-to-copy">
tradefed.sh
</pre>
<p>
diff --git a/en/devices/tech/test_infra/tradefed/fundamentals/options.html b/en/devices/tech/test_infra/tradefed/fundamentals/options.html
index fc494f34..bb891b79 100644
--- a/en/devices/tech/test_infra/tradefed/fundamentals/options.html
+++ b/en/devices/tech/test_infra/tradefed/fundamentals/options.html
@@ -46,7 +46,8 @@ the TF console when the command is run with <code>--help</code> or <code>--help-
<p>As an example, let's say we want to build a functional phone test which will dial a variety of
phone numbers, and will expect to receive a sequence of DTMF tones from each number after it
connects.</p>
-<code><pre>public class PhoneCallFuncTest extends IRemoteTest {
+<pre class="prettyprint">
+public class PhoneCallFuncTest extends IRemoteTest {
&#64;Option(name = "timeout", description = "How long to wait for connection, in millis")
private long mWaitTime = 30 * 1000; // 30 seconds
@@ -56,7 +57,8 @@ connects.</p>
public PhoneCallFuncTest() {
mCalls.add("123-456-7890", "01134"); // default
- }</pre></code>
+ }
+</pre>
<p>That's all that's required for the Developer to set up two points of configuration for that
test. They could then go off and use <code>mWaitTime</code> and <code>mCalls</code> as normal,
@@ -73,21 +75,24 @@ suppose the Integrator wanted to define a lower-latency test that calls the defa
as a long-running test that calls a variety of numbers. They could create a pair of configurations
that might look like the following:</p>
-<code><pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
+<pre class="prettyprint">
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;configuration description="low-latency default test; low-latency.xml"&gt;
&lt;test class="com.example.PhoneCallFuncTest"&gt;
&lt;option name="timeout" value="5000" /&gt;
&lt;/test&gt;
-&lt;/configuration&gt;</pre></code>
+&lt;/configuration&gt;</pre>
-<code><pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
+<pre class="prettyprint">
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;configuration description="call a bunch of numbers; many-numbers.xml"&gt;
&lt;test class="com.example.PhoneCallFuncTest"&gt;
&lt;option name="call" key="111-111-1111" value="#*#*TEST1*#*#" /&gt;
&lt;option name="call" key="222-222-2222" value="#*#*TEST2*#*#" /&gt;
&lt;!-- ... --&gt;
&lt;/test&gt;
-&lt;/configuration&gt;</pre></code>
+&lt;/configuration&gt;
+</pre>
<h2 id="testrunner">Test Runner</h2>
<p>The Test Runner also has access to these configuration points via the Trade Federation console.
@@ -98,11 +103,14 @@ append to fields specified by Lifecycle Objects within each config.</p>
<p>To run the low-latency test with the <code>many-numbers</code> phone numbers, the Test Runner
could execute:</p>
-<code><pre>tf >run low-latency.xml --call 111-111-1111 #*#*TEST1*#*# --call 222-222-2222 #*#*TEST2*#*#</pre></code>
+<pre class="devsite-click-to-copy">
+tf&gt; run low-latency.xml --call 111-111-1111 #*#*TEST1*#*# --call 222-222-2222 #*#*TEST2*#*#
+</pre>
<p>Or, to get a similar effect from the opposite direction, the Test Runner could reduce the wait time
for the <code>many-numbers</code> test:</p>
-<code><pre>tf >run many-numbers.xml --timeout 5000</code></pre>
+<pre class="devsite-click-to-copy">
+tf&gt; run many-numbers.xml --timeout 5000</pre>
</body>
</html>
diff --git a/en/devices/tech/test_infra/tradefed/fundamentals/vts.html b/en/devices/tech/test_infra/tradefed/fundamentals/vts.html
index 473db22f..8ba912d8 100644
--- a/en/devices/tech/test_infra/tradefed/fundamentals/vts.html
+++ b/en/devices/tech/test_infra/tradefed/fundamentals/vts.html
@@ -31,27 +31,41 @@ then test a patch using a VTS plan.</p>
<p>To set up a testing environment:</p>
<ol>
<li>Install Python development kit:
-<pre><code>$ sudo apt-get install python-dev</code></pre></li>
+<pre class="devsite-terminal devsite-click-to-copy">
+sudo apt-get install python-dev
+</pre>
+</li>
<li>Install Protocol Buffer tools (for Python):
-<pre><code>$ sudo apt-get install python-protobuf<br>
-$ sudo apt-get install protobuf-compiler
-</code></pre></li>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo apt-get install python-protobuf</code>
+<code class="devsite-terminal">sudo apt-get install protobuf-compiler</code>
+</pre>
+</li>
<li>Install Python virtual environment-related tools:
-<pre><code>$ sudo apt-get install python-virtualenv<br>
-$ sudo apt-get install python-pip
-</code></pre></li></ol>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo apt-get install python-virtualenv</code>
+<code class="devsite-terminal">sudo apt-get install python-pip</code>
+</pre>
+</li>
+</ol>
<h2 id="test">Testing a patch</h2>
<p>To test a patch:</p>
<ol>
<li>Build a VTS host-side package:
-<pre><code>$ . build/envsetup.sh
-$ lunch aosp_arm64-userdebug
-$ make vts -j</code></pre></li>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">. build/envsetup.sh</code>
+<code class="devsite-terminal">lunch aosp_arm64-userdebug</code>
+<code class="devsite-terminal">make vts -j</code>
+</pre>
+</li>
<li>Run the default VTS tests:
-<pre><code>$ vts-tradefed<br>
-&gt; run vts // where vts is the test plan name
-</pre></code></li></ol>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">vts-tradefed</code>
+tf&gt; run vts // where vts is the test plan name
+</pre>
+</li>
+</ol>
<h2 id="plans">VTS plans</h2>
<p>Available VTS test plans include:</p>