3. Introduction
• Fuego is the official automated test framework for the LTSI project.
• It was formerly called "JTA" (for Jenkins-based Test Automation), but
the name was changed in March 2016 for branding purposes.
• This project has its own wiki, located at
http://bird.org/fuego/FrontPage
• Fuego is a test framework specifically designed for embedded Linux
testing. It supports automated testing of embedded targets from a
host system, as it's primary method of test execution.
4. Background
• Tim Bird gave a talk introducing Fuego, at Embedded Linux
Conference in April 2016, and LinuxCon Japan 2016. The slides were
improved a bit for the talk in Japan, but there's only video for the ELC
talk (not the LCJ talk). Therefore, here are links to the LCJ slides and
the ELC video. The slides are close enough that you should be able to
follow the presentation. The slides from LCJ are available
here: Introduction-to-Fuego-LCJ-2016.pdf
• And here is the video from
ELC: https://www.youtube.com/watch?v=YbL8oauJv1c
5. Installation
• Code for the test framework is available in 2 Git repositories:
https://bitbucket.org/tbird20d/fuego/
https://bitbucket.org/tbird20d/fuego-core/
• To use Fuego, you only need to download the first repo. It is setup
with following instructions:
1. install pre-requisite software Git and Docker
2. download the Fuego repository
3. build your Fuego container
4. start the container
5. access the interface
6. add your board to Fuego
7. run a test
6. Installation (continued)
• To accomplish the first 4 steps, do the following from a Linux
command prompt:
$ git clone https://bitbucket.org/tbird20d/fuego.git
$ cd fuego; ./install.sh
$ fuego-host-scripts/docker-create-container.sh
$ fuego-host-scripts/docker-start-container.sh
$ firefox http://localhost:8080/fuego or hostip address
7. Test Framework 1
• Our Test Setup
Host Centos 7
10.0.2.9
Target
Unbuntu
10.0.2.10
11. Test Framework 3 - How Tests Work
A simple test that requires no building is Functional.bc
• the test script and test program source are found in the directory:
/home/jenkins/tests/Functional.bc
• It runs a shell script on a target to test the 'bc' program.
• Functional.bc files:
• bc-script.sh
declares "tarball=bc-script.tar.gz"
defines shell functions:
test_build - calls 'echo' (does nothing)
test_deploy - calls 'put bc-device.sh'
test_run - calls 'assert_define', 'report'
report references bc-device.sh
test_processing - calls 'log_compare'
looking for "OK"
sources $JTA_SCRIPTS_PATH/functional.sh
• bc-script.tar.gz
• bc-script/bc-device.sh
• Variables used (in bc-script.sh):
FUEGO_HOME TESTDIR FUNCTIONAL_BC_EXPR FUNCTIONAL_BC_RESULT
12. Basic Operations
• Adding a board
1. create a test directory on the target
2. create a board file (on the host)
3. add your board to the Jenkins interface
• Adding a toolchain
1. obtain (generate or retrieve) the toolchain
2. copy the toolchain to the container
3. install the toolchain inside the container
4. create a -tools.sh file for the toolchain
5. reference the toolchain in the appropriate board file
13. Demo
• Starting Jenkins User Interface
• Adding a Board - Target
• Adding a Yocto X86 Toolchain
• Running Tests on remote target