summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-05-04 09:03:02 -0400
committerTom Rini <[email protected]>2023-05-04 09:03:02 -0400
commitbfce695104d59a8570ce0a7cbd75d3728117eb5d (patch)
tree9150b72a6400a69fabcaad33ec2f63897e7ea8d2 /test/py
parent2440719d258a97824395532cb4a775752b423f63 (diff)
parent8a6414d1e410ab65780a4c5eb99e79e5b9bc21c1 (diff)
Merge tag 'efi-2023-07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2023-07-rc2 Documentation: * treat documentation warnings as errors in CI * adjust StarFive VisionFive 2 and SiFive Unmatched documentation * man-page for cp * correct description of uclass_get_device_by_of_path * correct proftool usage UEFI * Fix documentation of EFI Python tests * Rename efi_selftest Python test
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/test_efi_bootmgr/conftest.py6
-rw-r--r--test/py/tests/test_efi_capsule/capsule_defs.py2
-rw-r--r--test/py/tests/test_efi_capsule/conftest.py11
-rw-r--r--test/py/tests/test_efi_secboot/conftest.py6
-rw-r--r--test/py/tests/test_efi_secboot/defs.py2
-rw-r--r--test/py/tests/test_efi_selftest.py2
6 files changed, 17 insertions, 12 deletions
diff --git a/test/py/tests/test_efi_bootmgr/conftest.py b/test/py/tests/test_efi_bootmgr/conftest.py
index a0a754afbe1..eabafa54298 100644
--- a/test/py/tests/test_efi_bootmgr/conftest.py
+++ b/test/py/tests/test_efi_bootmgr/conftest.py
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0+
-"""Fixture for UEFI bootmanager test
-"""
+"""Fixture for UEFI bootmanager test."""
import os
import shutil
@@ -10,8 +9,7 @@ import pytest
@pytest.fixture(scope='session')
def efi_bootmgr_data(u_boot_config):
- """Set up a file system to be used in UEFI bootmanager
- tests
+ """Set up a file system to be used in UEFI bootmanager tests.
Args:
u_boot_config -- U-boot configuration.
diff --git a/test/py/tests/test_efi_capsule/capsule_defs.py b/test/py/tests/test_efi_capsule/capsule_defs.py
index 59b40f11bd1..3cc695e29b5 100644
--- a/test/py/tests/test_efi_capsule/capsule_defs.py
+++ b/test/py/tests/test_efi_capsule/capsule_defs.py
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
+"""Directoreis used for authentication and capsule tests."""
+
# Directories
CAPSULE_DATA_DIR = '/EFI/CapsuleTestData'
CAPSULE_INSTALL_DIR = '/EFI/UpdateCapsule'
diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py
index 0e5137de60d..a337e629362 100644
--- a/test/py/tests/test_efi_capsule/conftest.py
+++ b/test/py/tests/test_efi_capsule/conftest.py
@@ -2,8 +2,7 @@
# Copyright (c) 2020, Linaro Limited
# Author: AKASHI Takahiro <[email protected]>
-"""Fixture for UEFI capsule test
-"""
+"""Fixture for UEFI capsule test."""
from subprocess import call, check_call, CalledProcessError
import pytest
@@ -11,13 +10,15 @@ from capsule_defs import CAPSULE_DATA_DIR, CAPSULE_INSTALL_DIR, EFITOOLS_PATH
@pytest.fixture(scope='session')
def efi_capsule_data(request, u_boot_config):
- """Set up a file system to be used in UEFI capsule and authentication test
- and return a ath to disk image to be used for testing
+ """Set up a file system and return path to image.
+
+ 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.
u_boot_config -- U-boot configuration.
"""
-
mnt_point = u_boot_config.persistent_data_dir + '/test_efi_capsule'
data_dir = mnt_point + CAPSULE_DATA_DIR
install_dir = mnt_point + CAPSULE_INSTALL_DIR
diff --git a/test/py/tests/test_efi_secboot/conftest.py b/test/py/tests/test_efi_secboot/conftest.py
index 65cde7a2f23..30ff7029438 100644
--- a/test/py/tests/test_efi_secboot/conftest.py
+++ b/test/py/tests/test_efi_secboot/conftest.py
@@ -2,7 +2,7 @@
# Copyright (c) 2019, Linaro Limited
# Author: AKASHI Takahiro <[email protected]>
-""" Fixture for UEFI secure boot test """
+"""Fixture for UEFI secure boot test."""
from subprocess import call, check_call, CalledProcessError
import pytest
@@ -132,7 +132,9 @@ def efi_boot_env(request, u_boot_config):
@pytest.fixture(scope='session')
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.
Args:
diff --git a/test/py/tests/test_efi_secboot/defs.py b/test/py/tests/test_efi_secboot/defs.py
index b7a2a118511..6a2317e295b 100644
--- a/test/py/tests/test_efi_secboot/defs.py
+++ b/test/py/tests/test_efi_secboot/defs.py
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
+"""Constants used for secure boot test."""
+
# Owner guid
GUID = '11111111-2222-3333-4444-123456789abc'
diff --git a/test/py/tests/test_efi_selftest.py b/test/py/tests/test_efi_selftest.py
index e92d63cde6e..43f24245582 100644
--- a/test/py/tests/test_efi_selftest.py
+++ b/test/py/tests/test_efi_selftest.py
@@ -7,7 +7,7 @@
import pytest
@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
-def test_efi_selftest(u_boot_console):
+def test_efi_selftest_base(u_boot_console):
"""Run UEFI unit tests
u_boot_console -- U-Boot console