From b73d114213b41f46218e849950f569fb75d4028c Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 25 Feb 2021 14:07:58 -0500 Subject: [PATCH] pytest: Fix squashfs tests not checking for directory exists It is possible that we will have our "sqfs_src" directory already existing, and not be in an error condition. Don't try and make the directory again. Signed-off-by: Tom Rini --- test/py/tests/test_fs/test_squashfs/sqfs_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/py/tests/test_fs/test_squashfs/sqfs_common.py b/test/py/tests/test_fs/test_squashfs/sqfs_common.py index c96f92c1d8..294bf85a28 100644 --- a/test/py/tests/test_fs/test_squashfs/sqfs_common.py +++ b/test/py/tests/test_fs/test_squashfs/sqfs_common.py @@ -32,7 +32,8 @@ class Compression: def gen_image(self, build_dir): src = os.path.join(build_dir, "sqfs_src/") - os.mkdir(src) + if not os.path.exists(src): + os.mkdir(src) for (f, s) in zip(self.files, self.sizes): sqfs_generate_file(src + f, s)