forked from Archive/PX4-Autopilot
mavsdk_tests: don't forget to check for rootfs dir
This commit is contained in:
parent
4184c204c4
commit
aca1e85da4
|
@ -177,14 +177,15 @@ class Px4Runner(Runner):
|
||||||
rootfs_path = self.cwd
|
rootfs_path = self.cwd
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print("Clearing rootfs (except logs): {}".format(rootfs_path))
|
print("Clearing rootfs (except logs): {}".format(rootfs_path))
|
||||||
for item in os.listdir(rootfs_path):
|
if os.path.isdir(rootfs_path):
|
||||||
if item == 'log':
|
for item in os.listdir(rootfs_path):
|
||||||
continue
|
if item == 'log':
|
||||||
path = os.path.join(rootfs_path, item)
|
continue
|
||||||
if os.path.isfile(path) or os.path.islink(path):
|
path = os.path.join(rootfs_path, item)
|
||||||
os.remove(path)
|
if os.path.isfile(path) or os.path.islink(path):
|
||||||
else:
|
os.remove(path)
|
||||||
shutil.rmtree(path)
|
else:
|
||||||
|
shutil.rmtree(path)
|
||||||
|
|
||||||
def create_rootfs(self) -> None:
|
def create_rootfs(self) -> None:
|
||||||
rootfs_path = self.cwd
|
rootfs_path = self.cwd
|
||||||
|
|
Loading…
Reference in New Issue