summaryrefslogtreecommitdiff
path: root/test/py/tests/test_efi_capsule/conftest.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-04-22 18:32:08 -0400
committerTom Rini <trini@konsulko.com>2023-04-22 18:32:08 -0400
commit39bc4e12aba9b415c2bc19c0209661146c6e6f2a (patch)
tree1133f0583ce5dbfdcc650f0c4ded1aa4496be10f /test/py/tests/test_efi_capsule/conftest.py
parent802132c48a2e6b66ec83b7bb66fb96f2ba87c957 (diff)
parentb10bfd0019f601e2608370ed47741da201423d55 (diff)
Merge tag 'efi-2023-07-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-07-rc1-2 Documentation: * Describe Python coding style UEFI: * Enable tests for authenticated capsules on the sandbox * Fix pylint warnings * Correct struct efi_hii_keyboard_layout definition
Diffstat (limited to 'test/py/tests/test_efi_capsule/conftest.py')
-rw-r--r--test/py/tests/test_efi_capsule/conftest.py27
1 files changed, 9 insertions, 18 deletions
diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py
index 4879f2b5c24..0e5137de60d 100644
--- a/test/py/tests/test_efi_capsule/conftest.py
+++ b/test/py/tests/test_efi_capsule/conftest.py
@@ -2,30 +2,21 @@
# Copyright (c) 2020, Linaro Limited
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-import os
-import os.path
-import re
-from subprocess import call, check_call, check_output, CalledProcessError
-import pytest
-from capsule_defs import *
+"""Fixture for UEFI capsule test
+"""
-#
-# Fixture for UEFI capsule test
-#
+from subprocess import call, check_call, CalledProcessError
+import pytest
+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.
-
- Args:
- request: Pytest request object.
- u_boot_config: U-boot configuration.
+ """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
- Return:
- A path to disk image to be used for testing
+ request -- Pytest request object.
+ u_boot_config -- U-boot configuration.
"""
- global CAPSULE_DATA_DIR, CAPSULE_INSTALL_DIR
mnt_point = u_boot_config.persistent_data_dir + '/test_efi_capsule'
data_dir = mnt_point + CAPSULE_DATA_DIR