diff options
author | Tom Rini <trini@konsulko.com> | 2023-08-15 10:39:41 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-15 10:39:41 -0400 |
commit | bdc682437a67b47a382edfa30f58f8271b8acfed (patch) | |
tree | a57e22d5bb8a7b789878f455397d9d76b6fdb170 /test/py/tests/test_semihosting/conftest.py | |
parent | 51171cdd6dc9af8e74bbdb1f3e46c15187f7e979 (diff) | |
parent | aaf5b5923054efbf1244dc7fbae68d0bd2a03cf7 (diff) |
Merge branch '2023-08-14-assorted-general-updates' into next
- Assorted PCI-related fixes, add Apple Type-C PHY support, semihosting
updates, fix a FAT corner-case, update the help on the pxe cmd and
clean up the gpio uclass slightly.
Diffstat (limited to 'test/py/tests/test_semihosting/conftest.py')
-rw-r--r-- | test/py/tests/test_semihosting/conftest.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/py/tests/test_semihosting/conftest.py b/test/py/tests/test_semihosting/conftest.py new file mode 100644 index 0000000000..b00d8f4ea9 --- /dev/null +++ b/test/py/tests/test_semihosting/conftest.py @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +"""Fixture for semihosting command test +""" + +import os +import pytest + +@pytest.fixture(scope='session') +def semihosting_data(u_boot_config): + """Set up a file system to be used in semihosting tests + + Args: + u_boot_config -- U-Boot configuration. + """ + image_path = u_boot_config.persistent_data_dir + '/semihosting.txt' + + with open(image_path, 'w', encoding = 'utf-8') as file: + file.write('Das U-Boot\n') + + yield image_path + + os.remove(image_path) |