diff --git a/tests/extmod/vfs_fat_fileio1.py b/tests/extmod/vfs_fat_fileio1.py index c7ff9e0b98..55f399ff2e 100644 --- a/tests/extmod/vfs_fat_fileio1.py +++ b/tests/extmod/vfs_fat_fileio1.py @@ -38,11 +38,11 @@ class RAMFS: try: bdev = RAMFS(50) + uos.VfsFat.mkfs(bdev) except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) vfs = uos.VfsFat(bdev) uos.mount(vfs, "/ramdisk") uos.chdir("/ramdisk") diff --git a/tests/extmod/vfs_fat_fileio2.py b/tests/extmod/vfs_fat_fileio2.py index c7bdceb3df..9429f115f6 100644 --- a/tests/extmod/vfs_fat_fileio2.py +++ b/tests/extmod/vfs_fat_fileio2.py @@ -38,11 +38,11 @@ class RAMFS: try: bdev = RAMFS(50) + uos.VfsFat.mkfs(bdev) except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) vfs = uos.VfsFat(bdev) uos.mount(vfs, "/ramdisk") uos.chdir("/ramdisk") diff --git a/tests/extmod/vfs_fat_ilistdir_del.py b/tests/extmod/vfs_fat_ilistdir_del.py index a833e9ac12..4389f822bb 100644 --- a/tests/extmod/vfs_fat_ilistdir_del.py +++ b/tests/extmod/vfs_fat_ilistdir_del.py @@ -71,5 +71,10 @@ def test(bdev, vfs_class): vfs.open("/test", "w").close() -bdev = RAMBlockDevice(30) +try: + bdev = RAMBlockDevice(30) +except MemoryError: + print("SKIP") + raise SystemExit + test(bdev, uos.VfsFat) diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py index 0d58cec153..01235bc266 100644 --- a/tests/extmod/vfs_fat_ramdisk.py +++ b/tests/extmod/vfs_fat_ramdisk.py @@ -38,12 +38,11 @@ class RAMFS: try: bdev = RAMFS(50) + uos.VfsFat.mkfs(bdev) except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) - print(b"FOO_FILETXT" not in bdev.data) print(b"hello!" not in bdev.data) diff --git a/tests/extmod/vfs_lfs_mtime.py b/tests/extmod/vfs_lfs_mtime.py index bacdd2246c..a67e48dd80 100644 --- a/tests/extmod/vfs_lfs_mtime.py +++ b/tests/extmod/vfs_lfs_mtime.py @@ -101,5 +101,10 @@ def test(bdev, vfs_class): vfs.umount() -bdev = RAMBlockDevice(30) +try: + bdev = RAMBlockDevice(30) +except MemoryError: + print("SKIP") + raise SystemExit + test(bdev, uos.VfsLfs2)