* [U-Boot] [PATCH 1/1] test/py: cleanup test_efi_selftest.py
@ 2018-09-23 19:52 Heinrich Schuchardt
0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2018-09-23 19:52 UTC (permalink / raw)
To: u-boot
Remove unused import and variables.
Remove superfluous semicolons.
Reformat long lines.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
test/py/tests/test_efi_selftest.py | 35 ++++++++++++++++--------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/test/py/tests/test_efi_selftest.py b/test/py/tests/test_efi_selftest.py
index e0833ffe22..380be0bbfd 100644
--- a/test/py/tests/test_efi_selftest.py
+++ b/test/py/tests/test_efi_selftest.py
@@ -4,7 +4,6 @@
# Test efi API implementation
import pytest
-import u_boot_utils
@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
def test_efi_selftest(u_boot_console):
@@ -13,15 +12,17 @@ def test_efi_selftest(u_boot_console):
"""
u_boot_console.run_command(cmd='setenv efi_selftest')
- u_boot_console.run_command(cmd='bootefi selftest', wait_for_prompt=False)
+ u_boot_console.run_command(cmd='bootefi selftest',
+ wait_for_prompt=False)
m = u_boot_console.p.expect(['Summary: 0 failures', 'Press any key'])
if m != 0:
raise Exception('Failures occurred during the EFI selftest')
- u_boot_console.run_command(cmd='', wait_for_echo=False, wait_for_prompt=False);
+ u_boot_console.run_command(cmd='', wait_for_echo=False,
+ wait_for_prompt=False)
m = u_boot_console.p.expect(['resetting', 'U-Boot'])
if m != 0:
raise Exception('Reset failed during the EFI selftest')
- u_boot_console.restart_uboot();
+ u_boot_console.restart_uboot()
@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
@pytest.mark.buildconfigspec('of_control')
@@ -31,11 +32,12 @@ def test_efi_selftest_device_tree(u_boot_console):
assert '\'device tree\'' in output
u_boot_console.run_command(cmd='setenv efi_selftest device tree')
u_boot_console.run_command(cmd='setenv -f serial# Testing DT')
- u_boot_console.run_command(cmd='bootefi selftest ${fdtcontroladdr}', wait_for_prompt=False)
+ u_boot_console.run_command(cmd='bootefi selftest ${fdtcontroladdr}',
+ wait_for_prompt=False)
m = u_boot_console.p.expect(['serial-number: Testing DT', 'U-Boot'])
if m != 0:
raise Exception('Reset failed in \'device tree\' test')
- u_boot_console.restart_uboot();
+ u_boot_console.restart_uboot()
@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
def test_efi_selftest_watchdog_reboot(u_boot_console):
@@ -43,11 +45,12 @@ def test_efi_selftest_watchdog_reboot(u_boot_console):
output = u_boot_console.run_command('bootefi selftest')
assert '\'watchdog reboot\'' in output
u_boot_console.run_command(cmd='setenv efi_selftest watchdog reboot')
- u_boot_console.run_command(cmd='bootefi selftest', wait_for_prompt=False)
+ u_boot_console.run_command(cmd='bootefi selftest',
+ wait_for_prompt=False)
m = u_boot_console.p.expect(['resetting', 'U-Boot'])
if m != 0:
raise Exception('Reset failed in \'watchdog reboot\' test')
- u_boot_console.restart_uboot();
+ u_boot_console.restart_uboot()
@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
def test_efi_selftest_text_input(u_boot_console):
@@ -58,8 +61,8 @@ def test_efi_selftest_text_input(u_boot_console):
This function calls the text input EFI selftest.
"""
u_boot_console.run_command(cmd='setenv efi_selftest text input')
- output = u_boot_console.run_command(cmd='bootefi selftest',
- wait_for_prompt=False)
+ u_boot_console.run_command(cmd='bootefi selftest',
+ wait_for_prompt=False)
m = u_boot_console.p.expect(['To terminate type \'x\''])
if m != 0:
raise Exception('No prompt for \'text input\' test')
@@ -117,7 +120,7 @@ def test_efi_selftest_text_input(u_boot_console):
m = u_boot_console.p.expect(['Summary: 0 failures', 'Press any key'])
if m != 0:
raise Exception('Failures occurred during the EFI selftest')
- u_boot_console.restart_uboot();
+ u_boot_console.restart_uboot()
@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
def test_efi_selftest_text_input_ex(u_boot_console):
@@ -128,8 +131,8 @@ def test_efi_selftest_text_input_ex(u_boot_console):
This function calls the extended text input EFI selftest.
"""
u_boot_console.run_command(cmd='setenv efi_selftest extended text input')
- output = u_boot_console.run_command(cmd='bootefi selftest',
- wait_for_prompt=False)
+ u_boot_console.run_command(cmd='bootefi selftest',
+ wait_for_prompt=False)
m = u_boot_console.p.expect(['To terminate type \'CTRL\+x\''])
if m != 0:
raise Exception('No prompt for \'text input\' test')
@@ -191,9 +194,9 @@ def test_efi_selftest_text_input_ex(u_boot_console):
if m != 0:
raise Exception('SHIFT+ALT+FN 5 failed in \'text input\' test')
u_boot_console.drain_console()
- u_boot_console.run_command(cmd=chr(24), wait_for_echo=False, send_nl=False,
- wait_for_prompt=False)
+ u_boot_console.run_command(cmd=chr(24), wait_for_echo=False,
+ send_nl=False, wait_for_prompt=False)
m = u_boot_console.p.expect(['Summary: 0 failures', 'Press any key'])
if m != 0:
raise Exception('Failures occurred during the EFI selftest')
- u_boot_console.restart_uboot();
+ u_boot_console.restart_uboot()
--
2.19.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-09-23 19:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-23 19:52 [U-Boot] [PATCH 1/1] test/py: cleanup test_efi_selftest.py Heinrich Schuchardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.