Executing a runlist on your local system is quite simple. The utah command is the mechanism for doing this. Its most simple usage is done with:
# NOTE: the test runner needs root support things like "reboot" or # allowing a testcase to install packages sudo utah -r <runlist>
Where runlist can be a path to a local file or a BZR branch:
sudo utah -r /usr/share/utah/cliet/examples/pass.run sudo utah -r lp:utah/utah/client/examples/pass.run
The utah-client can be run directly on a touch device. If this is desired the previous section’s instructions are correct. However, test development for Touch seems to now be more focused on writing tests that run on a host PC and then talk the target device over adb or phablet-tools. Its even possible to write tests that can detect which mode its being run under and then execute its steps accordingly.
The run_utah_phablet.py script includes an option “–from-host” that basically launches utah on the host with ANDROID_SERIAL and TARGET_PREFIX exported into the tests environment. TARGET_PREFIX will be the path to the “adb-shell” command. While ANDROID_SERIAL is the serial of the device under test. A simple tc_control example that can work from host or target would look like:
description: uname shows an ubuntu-phablet image installed dependencies: none action: run uname expected_results: command succeeds type: userland timeout: 60 command: $TARGET_PREFIX uname -a | grep ubuntu-phablet
The default touch tests should serve as an example of how to create a test suite that can run from host or target.