summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeLines
* test/py: fix NameError exception if bdi cmd is not supportedHeiko Schocher2016-05-27-0/+1
| | | | | | | | | | | | 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>
* dm: mmc: test: Add tests for MMCSimon Glass2016-05-17-3/+20
| | | | | | | | Add a simple test which checks that a sandbox-emulated SD card can be used correctly. This tests plumbing through the MMC stack's block-device implementaion. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: mmc: Enable building MMC code for sandboxSimon Glass2016-05-17-2/+2
| | | | | | | Enable building the MMC code for sandbox. This increases build coverage for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: Only enable the sandbox MMC driver when validSimon Glass2016-05-17-1/+3
| | | | | | | This driver will require generic MMC and block-device support in a future commit. To avoid test errors, make this change now. Signed-off-by: Simon Glass <sjg@chromium.org>
* tests: py: fix NameError exception if bdi cmd is not supportedHeiko Schocher2016-05-13-0/+1
| | | | | | | | | | | | 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>
* test/py: dfu: wait for USB device to go away at bootStephen Warren2016-05-06-0/+2
| | | | | | | | | | | | | It can take a while for a host machine to notice that a USB device has disconnected, and process the change. At the end of the DFU test, we wait up to 10 seconds for this to happen. This change makes the test wait the same (up to) 10 seconds at the start of the test for any previously active USB device-mode session to be cleaned up. Such as session might have been used to download U-Boot into memory for example; this is certainly true on my Tegra test systems. This changes should solve the DFU test intermittency issues I've been seeing on some Tegra devices. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* tests: py: dfu: Provide functionality to set test and dummy files alt settingsLukasz Majewski2016-04-25-5/+21
| | | | | | | | | | | | | | | | | | | | After concatenation of "dfu_alt_info" variable from "dfu_alt_boot" and "dfu_alt_system" it may happen that test and dummy files alt settings are different than default 0 and 1. This patch provides the ability to set different values for them. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Stephen Warren <swarren@nvidia.com> --- Changes for v3: - replace variables declarations with ones read from configuration file - remove not necessary str() conversion at DFU host command generation Changes for v2: - generate "alt_info" automatically - use file names as alt settings instead of numerical values - extend in-code documentation
* tests: py: dfu: Add functionality to set different u-boot's dfu env variableLukasz Majewski2016-04-25-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default (on almost all systems) the dfu env variable, which defines available alt settings, is named as "dfu_alt_info". However on some platforms (i.e. Odroid XU3), the 'dfu_alt_info' is concatenated from other variables - namely 'dfu_alt_boot' and 'dfu_alt_system' at run time (when one types 'dfu 0 mmc 0' for first time). 'dfu_alt_boot' describes alt settings which depend on boot medium - for example boot loader's LBA sectors which are different on eMMC and SD card because of e.g. MBR/GPT. 'dfu_alt_system' describes board agnostic alt settings - like rootfs, kernel. On such system we can only append/modify this env variable. Because of the above, we must have way to modify other than "dfu_ale_info" variable to perform tests. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Stephen Warren <swarren@nvidia.com> --- Changes for v3: - None Changes for v2: - Rewrite of "alt_info_env_name" variable description - Use of get() method on python's dictionary to easily obtain default value
* tests: py: dfu: Add variables to store dfu alt numbers for test and dummy filesLukasz Majewski2016-04-25-4/+8
| | | | | | | | | | | | | This patch replaces hardcoded (i.e. 0 and 1) values passed to dfu_{read|write} with variables. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Stephen Warren <swarren@nvidia.com> --- Changes for v3: - Replace per module global variables with ones defined inside a function Changes for v2: - None
* test/dm/core.c: Make pre-reloc test use pre-reloc structTom Rini2016-04-14-1/+1
| | | | | | | | | | | | | LLVM 3.5 noted: test/dm/core.c:41:35: warning: unused variable 'test_pdata_pre_reloc' [-Wunused-const-variable] static const struct dm_test_pdata test_pdata_pre_reloc = { And the correct fix here is that the driver_info_pre_reloc test should use the test_pdata_pre_reloc not test_pdata_manual variable Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test/py: README: link to example hook scriptsStephen Warren2016-04-11-0/+6
| | | | | | | | | | When implementing test/py hook scripts, it's helpful to read some working examples. Provide a link to some. The link was mentioned in the commit message which first added test/py, but not in any documentation file. Suggested-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* test/py: Add support for loading image via tftp to specified locationMichal Simek2016-04-11-1/+5
| | | | | | | | | | | | | | For example this setting: env__net_tftp_readable_file = { "fn": "ep108/image.ub", "addr": 0x10000000, "size": 25846296, "crc32": "b726f9de", } Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* test/py: pass -v option when executing sandboxStephen Warren2016-04-11-0/+1
| | | | | | | | | This shows more output, such as the internal output generated by the unit test ("ut") command, which makes it easier to debug issues. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spmi: Add sandbox test driverMateusz Kulikowski2016-04-01-0/+115
| | | | | | | | This patch adds emulated spmi bus controller with part of pm8916 pmic on it to sandbox and tests validating SPMI uclass. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: blk: Add tests for block devicesSimon Glass2016-03-17-0/+97
| | | | | | | Add some tests to check that block devices work as expected. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: usb: Clean up USB after each testSimon Glass2016-03-14-0/+2
| | | | | | | | | | | | | | | The USB subsystem has a few counters that need to be reset since they are stored in static variables rather than driver-model data. An example is usb_max_devs. Ultimately we should move this data into the USB uclass. For now, make sure that USB is reset after each test, so that the counters go back to zero. Note: this is not a perfect solution: It a USB test fails it will exit immediately and leave USB un-reset. The impact here is that it may cause subsequence test failures in the same run. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: block: Adjust device calls to go through helpers functionSimon Glass2016-03-14-1/+1
| | | | | | | | | | | | To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: blk: Rename get_device() to blk_get_device_by_str()Simon Glass2016-03-14-1/+1
| | | | | | | | | | The current name is too generic. The function returns a block device based on a provided string. Rename it to aid searching and make its purpose clearer. Also add a few comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* dm: Drop the block_dev_desc_t typedefSimon Glass2016-03-14-1/+1
| | | | | | | | | Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* spi: Re-enable the SPI flash testsSimon Glass2016-02-26-2/+2
| | | | | | | | These are working correctly again, so re-enable them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jteki@openedev.com> Tested-by: Jagan Teki <jteki@openedev.com>
* trace: Improve the trace test number recognitionSimon Glass2016-02-26-1/+3
| | | | | | | | | The awk tool can be confused by return character (ASCII 13) in its input since it thinks there is a separate field. These can appear if the terminal is in raw mode, perhaps due to a previous U-Boot crash with sandbox. This is very confusing. Remove these so that the trace test passes. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Fix FIT and vboot tests to exit sandbox correctlySimon Glass2016-02-26-0/+7
| | | | | | | | When used with a device tree, sandbox now requires a 'reset' controller. Add this to the device trees so that reset works and the tests can complete. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 5010d98f (sandbox: Use the reset driver to handle reset)
* test/py: skip tests that require large CONFIG_SYS_MAXARGSStephen Warren2016-02-26-0/+8
| | | | | | | | | | | | | | | | | test_hush_if_test.py executes commands that require large values of CONFIG_SYS_MAXARGS. Detect cases where the configured value is too low and skip those tests. Ideally, this would be implemented inside console.run_command(). However, the command passed to that function is already a completely formed string, and determining its argument count usage would require splitting commands at ;, handling quoting to deal with arguments containing spaces, etc. Even passing the command as a list wouldn't solve all these issues, since we'd still need to split commands on ; and deal with cases like "if test ..." which consumes 0 of the argument count. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: use space to interrupt autobootStephen Warren2016-02-26-1/+1
| | | | | | | | | | | | | | | Sending CTRL-C to QEMU's stdin aborts the process, even if stdin is being used as a serial port (at least in the raspi2 machine with "qemu -serial stdin"). Avoid sending CTRL-C to U-Boot to prevent it exiting. I'd originally used CTRL-C to make sure that if the character used to abort autoboot ended up being treated as part of a command as well, it'd abort command entry and return the prompt to a known state. However, this is not needed, since aborting the autoboot eats the character used to do that. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: Add option to skip SPL signature checkingMichal Simek2016-02-25-1/+3
| | | | | | | | | | | | | | Provide user option to skip SPL signature verification for cases where u-boot is build with SPL support but full U-Boot is also verified without SPL. If you want to support this feature please add env__spl_skipped = True to your boardenv configuration file. For example Xilinx Zynq is using this feature where the same U-Boot binary is checked with SPL and without SPL(with FSBL). Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* test/py: only check for SPL signature if SPL uses serial outputHeiko Schocher2016-02-24-2/+7
| | | | | | | | | check for U-Boot SPL signature only if SPL really has a serial output. So check if CONFIG_SPL_SERIAL_SUPPORT is active in board config. Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* test/py: put "Starting U-Boot" into separate log sectionStephen Warren2016-02-15-1/+3
| | | | | | | | | | | | | | | | | The initial boot of U-Boot happens within the context of the first test that needs to access the U-Boot console when there is no existing connection. This keeps all activity nestled within test execution, which fits well into the pytest model. However, this mingles the U-Boot startup logs with the execution of some test(s), which hides find the boundary between the two. To solve this, wrap the "Starting U-Boot" logic into a separate log section. If the user wishes, they can simply collapse this log section when viewing the HTML log, to concentrate purely on the test's own interaction. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: handle exceptions in console creationStephen Warren2016-02-15-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | u_boot_console.exec_attach.get_spawn() performs two steps: 1) Spawn a process to communicate with the serial console. 2) Reset the board so that U-Boot starts running from scratch. Currently, if an exception happens in step (2), no cleanup is performed on the process created in step (1). That process stays running and may e.g. hold serial port locks, or simply continue to read data from the serial port, thus preventing it from reaching any other process that attempts to read from the same serial port later. While there is error cleanup code in u_boot_console_base.ensure_spawned(), this is not triggered since the exception prevents assignment to self.p there, and hence the exception handler has no object to operate upon in cleanup_spawn(). Solve this by enhancing u_boot_console.exec_attach.get_spawn() to clean up any objects it has created. In theory, u_boot_spawn.Spawn's constructor has a similar issue, so fix this too. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: print summary in test orderStephen Warren2016-02-15-8/+8
| | | | | | | | | | | | Use lists rather than sets to record the status of tests. This causes the test summary in the HTML file to be generated in the same order as the tests are (or would have been) run. This makes it easier to locate the first failed test. The log for this test might have interesting first clues re: interaction with the environment (e.g. hardware flashing, serial console, ...) and may help tracking down external issues. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: fix CONFIG_SPL testStephen Warren2016-02-15-1/+1
| | | | | | | | | | The Python ini file parser that's used to parse .config converts all keys to lower-case. Hence, all queries against the results must use lower-case. Fix u_boot_console.ensure_spawned() to test CONFIG_SPL correctly, or the connection will fail for boards that have SPL. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: don't import pexpectStephen Warren2016-02-15-1/+0
| | | | | | | | The code replaced pexpect with custom code long ago. Don't import the unused module so it doesn't need to be installed. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: add docs for gdbserver and pytest optionsStephen Warren2016-02-15-4/+56
| | | | | | | | Add documentation describing the new --gdbserver feature, and some common pytest options. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: run all "ut" subtestsStephen Warren2016-02-15-40/+108
| | | | | | | | | | | Invoke each "ut"-based unit test as a separate pytest. Now that the DM unit test runs under test/py, remove the manual shell script that invokes it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> # v2, on sandbox
* test/py: capture the entire U-Boot version at bootStephen Warren2016-02-09-8/+3
| | | | | | | | | The existing regex simply ensures that the captured version string doesn't go past the end of a line. We really want to grab as much as possible. Do this by explicitly including a ) character at the end of the regex to match the last character of the version test. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* test/py: fix off-by-one error in spawn matching codeStephen Warren2016-02-09-1/+1
| | | | | | | | A regex match object's .end() value is already the index after the match, not the index of the last character in the match, so there's no need to add 1 to point past the match. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* test/py: HTML awesome!Stephen Warren2016-02-09-78/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement three improvements to the HTML log file: - Ability to expand/contract sections. All passing sections are contracted at file load time so the user can concentrate on issues requiring action. - The overall status report is copied to the top of the log for easy access. - Add links from the status report to the test logs, for easy navigation. This all relies on Javascript and the jquery library. If the user doesn't have Javascript enabled, or jquery can't be downloaded, the log should look and behave identically to how it did before this patch. A few notes on the diff: - A few more 'with log.section("xxx")' were added, so that all stream blocks are kept within a section block for consistent HTML entity nesting structure. This changed indentation in a few places, making the diff look slightly larger. - HTML entity IDs are cleaned up. We assign simple incrementing integer IDs now, rather than using mangled test names which were possibly invalid. - Sections and streams now use common CSS class names (in addition to the current separate class names) to more easily share the new behaviour. This also reduces the CSS file size since rules don't need to be duplicated. - An "OK" status is logged after some external command executions so that make and flash steps are auto-contracted at log file load time, assuming they passed. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* test/py: exit(1) if there are problems running py.testStephen Warren2016-02-09-0/+1
| | | | | | | | | | The test/py/test.py wrapper script catches exceptions thrown when exec()ing py.test in order to print a helpful error message. However, the exception handling code squashes the exception and so the script exits with a non-zero exit code, leading callers to believe that it passed. Fix this. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* test/py: support running sandbox under gdbserverStephen Warren2016-02-08-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement command--line option --gdbserver COMM, which does two things: a) Run the sandbox process under gdbserver, using COMM as gdbserver's communication channel. b) Disables all timeouts, so that if U-Boot is halted under the debugger, tests don't fail. If the user gives up in the middle of a debugging session, they can simply CTRL-C the test script to abort it. This allows easy debugging of test failures without having to manually re-create the failure conditions. Usage is: Window 1: ./test/py/test.py --bd sandbox --gdbserver localhost:1234 Window 2: gdb ./build-sandbox/u-boot -ex 'target remote localhost:1234' When using this option, it likely makes sense to use pytest's -k option to limit the set of tests that are executed. Simply running U-Boot directly under gdb (rather than gdbserver) was also considered. However, this was rejected because: a) gdb's output would then be processed by the test script, and likely confuse it causing false failures. b) pytest by default hides stdout from tests, which would prevent the user from interacting with gdb. While gdb can be told to redirect the debugee's stdio to a separate PTY, this would appear to leave gdb's stdio directed at the test scripts and the debugee's stdio directed elsewhere, which is the opposite of the desired effect. Perhaps some complicated PTY muxing and process hierarchy could invert this. However, the current scheme is simple to implement and use, so it doesn't seem worth complicating matters. c) Using gdbserver allows arbitrary debuggers to be used, even those with a GUI. If the test scripts invoked the debugger themselves, they'd have to know how to execute arbitary applications. While the user could hide this all in a wrapper script, this feels like extra complication. An interesting future idea might be a --gdb-screen option, which could spawn both U-Boot and gdb separately, and spawn the screen into a newly created window under screen. Similar options could be envisaged for creating a new xterm/... too. --gdbserver currently only supports sandbox, and not real hardware. That's primarily because the test hooks are responsible for all aspects of hardware control, so there's nothing for the test scripts themselves can do to enable gdbserver on real hardware. We might consider introducing a separate --disable-timeouts option to support use of debuggers on real hardware, and having --gdbserver imply that option. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* video: test: Adjust order of file closureSimon Glass2016-02-06-1/+1
| | | | | | | | | Close the file earlier to hopefully fix a Coverity error. Reported-by: Coverity (CID: 134901) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* video: test: Add console tests for truetypeSimon Glass2016-01-30-0/+63
| | | | | | | This adds tests for the different character types, line wrap, scrolling and backspace. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: sandbox: Enable truetype fonts for sandboxSimon Glass2016-01-30-1/+20
| | | | | | | | Enable this feature so that truetype fonts can be used on the sandbox console. Update the tests to select the normal/rotated console when needed. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* video: Handle the 'bell' characterSimon Glass2016-01-30-1/+1
| | | | | | | This can be sent when to many characters are entered. Make sure it is ignored and does not cause a character to be displayed. Signed-off-by: Simon Glass <sjg@chromium.org>
* video: Use fractional units for X coordinatesSimon Glass2016-01-30-2/+2
| | | | | | | | | | | | | | With anti-aliased fonts we need a more fine-grained horizontal position than a single pixel. Characters can be positioned to start part-way through a pixel, with anti-aliasing (greyscale edges) taking care of the visual effect. To cope with this, use fractional units (1/256 pixel) for horizontal positions in the text console. Signed-off-by: Simon Glass <sjg@chromium.org> [agust: rebased] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* test/py: dfu: allow boardenv to specify test sizesStephen Warren2016-01-28-2/+10
| | | | | | | | | | | | | Allow the env__dfu_configs boardenv data to specify the set of DFU transfer sizes to test. Manually specifying test sizes is useful if you wish to test multiple DFU configurations (e.g. SD card ext4 filesystem, SD card whole raw partition, RAM, etc.), but don't want to test every single transfer size on each, to avoid bloating the overall time taken by testing. If the boardenv doesn't specify a set of sizes, the built-in list is used as a default, preserving backwards-compatibility. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: fix a couple typos in commentsStephen Warren2016-01-28-2/+2
| | | | | | | s/updata/update/. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* test/py: run sandbox in source directoryStephen Warren2016-01-28-3/+7
| | | | | | | | Some unit tests expect the cwd of the sandbox process to be the root of the source tree. Ensure that requirement is met. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: pass test DTB to sandboxStephen Warren2016-01-28-1/+6
| | | | | | | This is required for at least "ut dm" to operate correctly. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: correctly log xfail/xpass testsStephen Warren2016-01-28-24/+74
| | | | | | | | | | Tests can complete in passed, skipped, xpass, xfailed, or failed, states. Currently the U-Boot log generation code doesn't handle the xfailed or xpass states since they aren't used. Add support for the remaining states. Without this, tests that xfail end up being reported as skipped. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: detect another "bad pattern" in console outputStephen Warren2016-01-28-0/+2
| | | | | | | | | | | | Many error situations in U-Boot print the message: ### ERROR ### Please RESET the board ### Add this to the list of bad patterns the test system detects. One practical advantage of this change is to detect the case where sandbox is told to use a particular DTB file, and the file cannot be opened. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* test/py: check for bad patterns everywhere we waitStephen Warren2016-01-28-7/+19
| | | | | | | | | | | | | | | | Currently, bad patterns are only honored when executing a shell command. Other cases, such as the initial boot-up of U-Boot or when interacting with command output rather than gathering all output prior to the shell prompt, do not currently look for bad patterns in console output. This patch makes sure that bad patterns are honored everywhere. One benefit of this change is that if U-Boot sandbox fails to start up, the error message it emits can be caught immediately, rather than relying on a (long) timeout when waiting for the expected signon message and/or command prompt. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>