mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
test: Make test_gpio_read() independent
This assumes that the GPIO starts as 0 but it does not if test_gpio_input() ran first and test_gpio_exit_statuses() was skipped. This can happen when running tests in parallel. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d401187fec
commit
b681669aa5
1 changed files with 1 additions and 0 deletions
|
@ -51,6 +51,7 @@ def test_gpio_exit_statuses(u_boot_console):
|
|||
def test_gpio_read(u_boot_console):
|
||||
"""Test that gpio read correctly sets the variable to the value of a gpio pin."""
|
||||
|
||||
u_boot_console.run_command('gpio clear 0')
|
||||
response = u_boot_console.run_command('gpio read var 0; echo val:$var,rc:$?')
|
||||
expected_response = 'val:0,rc:0'
|
||||
assert(expected_response in response)
|
||||
|
|
Loading…
Reference in a new issue