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 <trini@konsulko.com>
This commit is contained in:
Tom Rini 2021-02-25 14:07:58 -05:00
parent c0b354ed02
commit b73d114213

View File

@ -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)