diff options
-rw-r--r-- | tests/extmod/vfs_basic.py | 4 | ||||
-rw-r--r-- | tests/extmod/vfs_fat_more.py | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/extmod/vfs_basic.py b/tests/extmod/vfs_basic.py index 1821a277dc..32bfe8ab4d 100644 --- a/tests/extmod/vfs_basic.py +++ b/tests/extmod/vfs_basic.py @@ -47,6 +47,10 @@ class Filesystem: # first we umount any existing mount points the target may have +try: + uos.umount('/') +except OSError: + pass for path in uos.listdir('/'): uos.umount('/' + path) diff --git a/tests/extmod/vfs_fat_more.py b/tests/extmod/vfs_fat_more.py index 217d639956..6c2df528fb 100644 --- a/tests/extmod/vfs_fat_more.py +++ b/tests/extmod/vfs_fat_more.py @@ -44,6 +44,14 @@ except MemoryError: print("SKIP") sys.exit() +# first we umount any existing mount points the target may have +try: + uos.umount('/') +except OSError: + pass +for path in uos.listdir('/'): + uos.umount('/' + path) + uos.VfsFat.mkfs(bdev) uos.mount(bdev, '/') |