mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
test: efi_selftest: fix pylint warnings
Fix pylint warnings: * add missing module and function documentation * correct indentation Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (c) 2017, Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
|
||||
# Test efi API implementation
|
||||
"""
|
||||
Test UEFI API implementation
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import u_boot_utils
|
||||
|
||||
@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
|
||||
def test_efi_selftest(u_boot_console):
|
||||
"""Test the UEFI implementation
|
||||
"""Run UEFI unit tests
|
||||
|
||||
:param u_boot_console: U-Boot console
|
||||
|
||||
@@ -19,12 +20,18 @@ def test_efi_selftest(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')
|
||||
@pytest.mark.buildconfigspec('of_control')
|
||||
@pytest.mark.notbuildconfigspec('generate_acpi_table')
|
||||
def test_efi_selftest_device_tree(u_boot_console):
|
||||
"""Test the device tree support in the UEFI sub-system
|
||||
|
||||
:param u_boot_console: U-Boot console
|
||||
|
||||
This test executes the UEFI unit test by calling 'bootefi selftest'.
|
||||
"""
|
||||
u_boot_console.run_command(cmd='setenv efi_selftest list')
|
||||
output = u_boot_console.run_command('bootefi selftest')
|
||||
assert '\'device tree\'' in output
|
||||
@@ -34,10 +41,16 @@ def test_efi_selftest_device_tree(u_boot_console):
|
||||
m = u_boot_console.p.expect(['serial-number: Testing DT', 'U-Boot'])
|
||||
if m != 0:
|
||||
raise Exception('serial-number missing in device tree')
|
||||
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):
|
||||
"""Test the watchdog timer
|
||||
|
||||
:param u_boot_console: U-Boot console
|
||||
|
||||
This function executes the 'watchdog reboot' unit test.
|
||||
"""
|
||||
u_boot_console.run_command(cmd='setenv efi_selftest list')
|
||||
output = u_boot_console.run_command('bootefi selftest')
|
||||
assert '\'watchdog reboot\'' in output
|
||||
@@ -46,7 +59,7 @@ def test_efi_selftest_watchdog_reboot(u_boot_console):
|
||||
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):
|
||||
@@ -116,7 +129,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):
|
||||
@@ -195,4 +208,4 @@ def test_efi_selftest_text_input_ex(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()
|
||||
|
Reference in New Issue
Block a user