add test for vfat+utf8

This commit is contained in:
Peter Bieringer
2026-04-22 21:57:38 +02:00
parent 8babd65ae8
commit df48309cd3
2 changed files with 46 additions and 1 deletions

View File

@@ -85,6 +85,24 @@ jobs:
- name: Test with newest Python on latest Ubuntu using VFAT
run: tox -c pyproject.toml -e py_filesystem_vfat
test-ubuntu-python-newest-with-vfat_utf8:
name: Test VFAT UTF-8 Python:newest Ubuntu:latest
needs: [lint, test-ubuntu-python-newest, test-ubuntu-python-newest-with-vfat]
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.14']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Test dependencies
run: pip install tox
- name: Test with newest Python on latest Ubuntu using VFAT UTF-8
run: tox -c pyproject.toml -e py_filesystem_vfat_utf8
test-ubuntu-python-newest-with-ntfs:
name: Test NTFS Python:newest Ubuntu:latest
needs: [lint, test-ubuntu-python-newest]

View File

@@ -101,7 +101,7 @@ commands_pre = [
# unconditionally create mount point
["mkdir", "-p", "/tmp/vfat"],
# mount image
["sudo", "/usr/bin/mount", "-o", "loop,umask=000", "/tmp/vfat.img", "/tmp/vfat"],
["sudo", "/usr/bin/mount", "-o", "loop,umask=000,utf8=no", "/tmp/vfat.img", "/tmp/vfat"],
]
setenv = { TEMP = "/tmp/vfat" }
commands = [["pytest", "-r", "s", "."]]
@@ -114,6 +114,33 @@ commands_post = [
["rm", "/tmp/vfat.img"]
]
[tool.tox.env.py_filesystem_vfat_utf8]
allowlist_externals = [ "sudo", "dd", "mkfs.vfat", "mkdir", "rm", "rmdir", "chmod" ]
extras = ["test"]
deps = [
"pytest"
]
commands_pre = [
# create 64 MByte disk image
["dd", "if=/dev/zero", "of=/tmp/vfat8.img", "bs=1M", "count=64"],
# create file system
["mkfs.vfat", "/tmp/vfat8.img", "-n", "VFAT"],
# unconditionally create mount point
["mkdir", "-p", "/tmp/vfat8"],
# mount image
["sudo", "/usr/bin/mount", "-o", "loop,umask=000,utf8", "/tmp/vfat8.img", "/tmp/vfat8"],
]
setenv = { TEMP = "/tmp/vfat8" }
commands = [["pytest", "-r", "s", "."]]
commands_post = [
# umount image
["sudo", "/usr/bin/umount", "-d", "/tmp/vfat8"],
# remove mount point
["rmdir", "/tmp/vfat8"],
# remove image
["rm", "/tmp/vfat8.img"]
]
[tool.tox.env.py_filesystem_hfsplus]
# Fedora
allowlist_externals = [ "sudo", "dd", "mkfs.hfsplus", "mkdir", "rm", "rmdir", "chmod" ]