Integration with ttc
This page describes how ttc and fuego can be integrated, so that the fuego test framework can use 'ttc' as it's transport mechanism.
You can find more information about 'ttc' on the linux wiki at: http://elinux.org/Ttc_Program_Usage_Guide
- Integration for the tool and helper utilities in the container build
- When the docker container is built, ttc is downloaded from github and installed into the docker image.
- During this process, the path to the ttc.conf file is changed from /etc/ttc.conf to /fuego-ro/conf/ttc.conf
- 'ttc' is now a valid transport option
- You can specify ttc as the 'transport' for a board, instead of ssh
- ttc now supports -r as an option to the 'ttc cp' command
- this is required since fuego uses -r extensively to do recursive directory copies (See Transport_notes for details)
- fuego-core has been modified to avoid using wildcards on 'get' operations
- a new test called Functional.fuego_transport has been added
- this tests use of wildcards, multiple files and directories and directory recursion with the 'put' command.
- it also indirectly tests the 'get' command, because logs are obtained during the test.
- 'ttc run' - to run a command on the target
- 'ttc cp' - to get a file from the target, and to put files to the target
Finally, other commands, such as 'ttc get_kernel', 'ttc get_config', 'ttc kbuild' and 'ttc kinstall' are not used currently. These may be used in the future, when fuego is expanded to have a focus on tests that require kernel rebuilding.
During fuego installation, /etc/ttc.conf is copied to userdata/conf from the host machine, if it is present (and a copy of ttc.conf is not already there).
Adding a board.
- If needed, create your docker container using 'docker-create-usb-privileged-container.sh
- This may be needed if you are using ttc with board controls that require access to USB devices (such as the Sony debug board)
- substitute this command in place of 'docker-create-container.sh' in the Fuego Quickstart Guide.
- Make sure that /userdata/conf/ttc.conf has the definitions required for your target board
- Validate this by doing 'ttc list' to see that the board is present, and 'ttc run' and 'ttc cp' commands, to test that these operations work with the board, from inside the container.
- Edit the fuego board file (found in /userdata/conf/boards/<somthing>.board
- Set the TRANSPORT to 'ttc'
- Set the TTC_TARGET variable is set to the name for the target used by ttc
- See the following example, for a definition for a target named 'bbb' (for my beaglebone black board)
All versions of copy_to_cmd should be modified to reference a new environment variable $copy_args.
Basically, if a fuego test uses 'put -r' at any point, this needs to be supported by ttc. ttc will pass any '-r' seen to the subcommand in the environment variable $copy_args, where you can use it as needed with whatever sub-command (cp, scp, or something else) that you use to execute a copy_to_cmd.
See examples in ttc.conf.sample and ttc.conf.sample2 for usage examples.