tests/extmod: Skip vfs tests if target doesn't have enough memory.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
b1123a54c1
commit
d99ebb310c
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -71,5 +71,10 @@ def test(bdev, vfs_class):
|
|||
vfs.open("/test", "w").close()
|
||||
|
||||
|
||||
try:
|
||||
bdev = RAMBlockDevice(30)
|
||||
except MemoryError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
test(bdev, uos.VfsFat)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -101,5 +101,10 @@ def test(bdev, vfs_class):
|
|||
vfs.umount()
|
||||
|
||||
|
||||
try:
|
||||
bdev = RAMBlockDevice(30)
|
||||
except MemoryError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
test(bdev, uos.VfsLfs2)
|
||||
|
|
Loading…
Reference in New Issue