summaryrefslogtreecommitdiff
path: root/test/py/u_boot_utils.py
AgeCommit message (Collapse)Author
2016-08-05test: Drop the cmd() functionSimon Glass
Instead of this, use the existing run_and_log() function, enhanced to support a command string as well as a list of arguments. Suggested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2016-08-05test: Fix typos in commentsSimon Glass
Fix some typos in various files introduced with the vboot test conversion. Reported-by: Teddy Reed <teddy.reed@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2016-08-05test: Check exit status in run_and_log_expect_exception()Simon Glass
This check was missed. Add it and make the message more verbose. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Tom Rini <trini@konsulko.com> Fixes: 9e17b034 (test/py: Provide a way to check that a command fails)
2016-07-14test/py: Provide a way to check that a command failsSimon Glass
Sometimes we want to run a command and check that it fails. Add a function to handle this. It can check the return code and also make sure that the output contains a given error message. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-07-14test/py: Add an option to execute a string containing a commandSimon Glass
It is sometimes inconvenient to convert a string into a list for execution with run_and_log(). Provide a helper function to do this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
2016-07-14test/py: Return output from run_and_log()Simon Glass
It is useful to be able to obtain the output from a command. Return it from this function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
2016-07-08test/py: support 'memstart =' in u_boot_utils.find_ram_base()Daniel Schwierzeck
Some archs like MIPS or PPC have a different 'bdinfo' output than ARM regarding the memory configuration. Also support 'memstart = 0x*' in u_boot_utils.find_ram_base() to make all tests requiring the RAM base working on those archs. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Stephen Warren <swarren@nvidia.com>
2016-05-27test/py: fix NameError exception if bdi cmd is not supportedHeiko Schocher
test/py raises an error, if a board has not enabled bdi command > pytest.skip('bdinfo command not supported') E NameError: global name 'pytest' is not defined import pytest in test/py/u_boot_utils.py fixes this. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2016-05-13tests: py: fix NameError exception if bdi cmd is not supportedHeiko Schocher
test/py raises an error, if a board has not enabled bdi command > pytest.skip('bdinfo command not supported') E NameError: global name 'pytest' is not defined import pytest in test/py/u_boot_utils.py fixes this. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2016-01-28test/py: use " for docstringsStephen Warren
Python's coding style docs indicate to use " not ' for docstrings. test/py has other violations of the coding style docs, since the docs specify a stranger style than I would expect, but nobody has complained about those yet:-) Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-01-28test/py: move find_ram_base() into u_boot_utilsStephen Warren
find_ram_base() is a shared utility function, not a core part of the U-Boot console interaction. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-01-28test/py: add various utility codeStephen Warren
Add various common utility functions. These will be used by a forthcoming re-written UMS test, and a brand-new DFU test. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>