This page describes how to write a shell test. If a test can be done with a
shell script, you can run it with
ExecutableHostTest supports test filtering and
Writing a shell test
Your main shell script runs on the host. Other scripts or binaries to run on
the device and the data files required must be pushed to the device first.
This can be done as part of the main script or using
The test result for each test is based on the exit status of your main script.
A test can timeout if
per-binary-timeout has been specified.
Configuring a shell test
In Tradefed XML configuration, shell tests are run through the
<test class="com.android.tradefed.testtype.binary.ExecutableHostTest" > <option name="binary" value="your-test-script.sh" /> <option name="relative-path-execution" value="true" /> <option name="per-binary-timeout" value="15m" /> </test>
Set the main script for the test as the value of the
binary option. Check out
If the script requires root privilege, add
RootTargetPreparer to the configuration.