mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 13:56:20 +00:00
test: fix pydoc issues for EFI tests
Fix issues reported by pydocstyle. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
d1474f5aa0
commit
bd730aa05b
5 changed files with 16 additions and 11 deletions
|
@ -1,7 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
|
||||||
"""Fixture for UEFI bootmanager test
|
"""Fixture for UEFI bootmanager test."""
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -10,8 +9,7 @@ import pytest
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def efi_bootmgr_data(u_boot_config):
|
def efi_bootmgr_data(u_boot_config):
|
||||||
"""Set up a file system to be used in UEFI bootmanager
|
"""Set up a file system to be used in UEFI bootmanager tests.
|
||||||
tests
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
u_boot_config -- U-boot configuration.
|
u_boot_config -- U-boot configuration.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
|
||||||
|
"""Directoreis used for authentication and capsule tests."""
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
CAPSULE_DATA_DIR = '/EFI/CapsuleTestData'
|
CAPSULE_DATA_DIR = '/EFI/CapsuleTestData'
|
||||||
CAPSULE_INSTALL_DIR = '/EFI/UpdateCapsule'
|
CAPSULE_INSTALL_DIR = '/EFI/UpdateCapsule'
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# Copyright (c) 2020, Linaro Limited
|
# Copyright (c) 2020, Linaro Limited
|
||||||
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
|
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
|
||||||
|
|
||||||
"""Fixture for UEFI capsule test
|
"""Fixture for UEFI capsule test."""
|
||||||
"""
|
|
||||||
|
|
||||||
from subprocess import call, check_call, CalledProcessError
|
from subprocess import call, check_call, CalledProcessError
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -11,13 +10,15 @@ from capsule_defs import CAPSULE_DATA_DIR, CAPSULE_INSTALL_DIR, EFITOOLS_PATH
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def efi_capsule_data(request, u_boot_config):
|
def efi_capsule_data(request, u_boot_config):
|
||||||
"""Set up a file system to be used in UEFI capsule and authentication test
|
"""Set up a file system and return path to image.
|
||||||
and return a ath to disk image to be used for testing
|
|
||||||
|
The function sets up a file system to be used in UEFI capsule and
|
||||||
|
authentication test and returns a path to disk image to be used
|
||||||
|
for testing.
|
||||||
|
|
||||||
request -- Pytest request object.
|
request -- Pytest request object.
|
||||||
u_boot_config -- U-boot configuration.
|
u_boot_config -- U-boot configuration.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
mnt_point = u_boot_config.persistent_data_dir + '/test_efi_capsule'
|
mnt_point = u_boot_config.persistent_data_dir + '/test_efi_capsule'
|
||||||
data_dir = mnt_point + CAPSULE_DATA_DIR
|
data_dir = mnt_point + CAPSULE_DATA_DIR
|
||||||
install_dir = mnt_point + CAPSULE_INSTALL_DIR
|
install_dir = mnt_point + CAPSULE_INSTALL_DIR
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Copyright (c) 2019, Linaro Limited
|
# Copyright (c) 2019, Linaro Limited
|
||||||
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
|
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
|
||||||
|
|
||||||
""" Fixture for UEFI secure boot test """
|
"""Fixture for UEFI secure boot test."""
|
||||||
|
|
||||||
from subprocess import call, check_call, CalledProcessError
|
from subprocess import call, check_call, CalledProcessError
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -132,7 +132,9 @@ def efi_boot_env(request, u_boot_config):
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def efi_boot_env_intca(request, u_boot_config):
|
def efi_boot_env_intca(request, u_boot_config):
|
||||||
"""Set up a file system to be used in UEFI secure boot test
|
"""Set up file system for secure boot test.
|
||||||
|
|
||||||
|
Set up a file system to be used in UEFI secure boot test
|
||||||
of intermediate certificates.
|
of intermediate certificates.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
|
||||||
|
"""Constants used for secure boot test."""
|
||||||
|
|
||||||
# Owner guid
|
# Owner guid
|
||||||
GUID = '11111111-2222-3333-4444-123456789abc'
|
GUID = '11111111-2222-3333-4444-123456789abc'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue