[U-Boot] [PATCH 00/14] test/py: Convert vboot tests to use the test/py framework

Simon Glass
2016-07-03T15:40:32Z

There are a number of tests which still exist as shell scripts in U-Boot.
This series converts the vboot test over, adding some functionality to the
test environment as needed.

A few minor changes are made to the vboot test as part of this:
- fit_check_sign is used to check that an invalid signature is detected.
Previously only the valid case was checked
- Sandbox is adjusted to return normally from a bootm command, instead of
exiting. This makes the test easier to write and seems more consistent.

One observation about the test/py code. I feel it is confusing that the
classes for running U-Boot commands and shell commands are named in a
similar way. I would suggest renaming u_boot_utils to test_utils, or
similar.

Simon Glass (14):
test: Add a README
test: Add a simple script to run tests on sandbox
sandbox: Don't exit when bootm completes
test/py: Allow tests to control the sandbox device-tree file
test/py: Allow RunAndLog() to return the output
test/py: Provide output from exceptions with RunAndLog()
test/py: Return output from run_and_log()
test/py: Add an option to execute a string containing a command
test/py: Provide a way to check that a command fails
test/py: Add a helper to run a list of U-Boot commands
tools: Add an error code when fit_handle_file() fails
tools: Correct error handling in fit_image_process_hash()
test/py: Fix up after the rename of CONFIG_SYS_HUSH_PARSER
test: Convert the vboot test to test/py

arch/sandbox/lib/bootm.c | 2 +-
common/bootm_os.c | 1 +
test/README | 92 +++++++++++
test/py/conftest.py | 1 +
test/py/multiplexed_log.py | 10 +-
test/py/tests/test_hush_if_test.py | 8 +-
test/py/tests/test_vboot.py | 185 ++++++++++++++++++++++
test/{ => py/tests}/vboot/sandbox-kernel.dts | 0
test/{ => py/tests}/vboot/sandbox-u-boot.dts | 0
test/{ => py/tests}/vboot/sign-configs-sha1.its | 0
test/{ => py/tests}/vboot/sign-configs-sha256.its | 0
test/{ => py/tests}/vboot/sign-images-sha1.its | 0
test/{ => py/tests}/vboot/sign-images-sha256.its | 0
test/py/u_boot_console_base.py | 16 ++
test/py/u_boot_console_sandbox.py | 2 +-
test/py/u_boot_utils.py | 39 ++++-
test/run | 4 +
test/vboot/.gitignore | 3 -
test/vboot/vboot_test.sh | 151 ------------------
tools/fit_image.c | 4 +-
tools/image-host.c | 14 +-
21 files changed, 361 insertions(+), 171 deletions(-)
create mode 100644 test/README
create mode 100644 test/py/tests/test_vboot.py
rename test/{ => py/tests}/vboot/sandbox-kernel.dts (100%)
rename test/{ => py/tests}/vboot/sandbox-u-boot.dts (100%)
rename test/{ => py/tests}/vboot/sign-configs-sha1.its (100%)
rename test/{ => py/tests}/vboot/sign-configs-sha256.its (100%)
rename test/{ => py/tests}/vboot/sign-images-sha1.its (100%)
rename test/{ => py/tests}/vboot/sign-images-sha256.its (100%)
create mode 100755 test/run
delete mode 100644 test/vboot/.gitignore
delete mode 100755 test/vboot/vboot_test.sh

--
2.8.0.rc3.226.g39d4020