Improvements for bootloader testing
- Allow extra files to be deployed to the TFTP server, such as a test scripts '.itb' file.
- Allow the TFTP deployment to be used without a kernel image, for test cases where we don't actually boot Linux.
- Tidy up the docs a little while making these changes.
As an example of how we're using this, see the following actions list. The tests.itb
file contains a couple of test scripts which can be executed in u-boot using the source
command. This image is deployed to the TFTP server and then downloaded to the DUT as part of an "interactive" test.
- deploy:
to: tftp
extra_files:
tests:
url: https://example.com/raw/tests/tests.itb
- boot:
method: bootloader
bootloader: u-boot
commands: []
prompts:
- "=>"
- test:
timeout:
minutes: 20
interactive:
- name: test_script
prompts: ["\n=> "]
script:
# Download and run test scripts
- command: "setenv autoload no && dhcp"
name: dhcp
successes:
- message: "DHCP client bound to address"
- command: "setenv serverip {SERVER_IP} && tftp 0x48000000 {EXTRA_FILES_DIR}/tests/tests.itb"
name: fetch_script
successes:
- message: "Bytes transferred"
- command: "source 0x48000000:test_emmc"
name: test_emmc
successes:
- message: "test_emmc PASS"
- command: "source 0x48000000:test_sdcard"
name: test_sdcard
successes:
- message: "test_sdcard PASS"