From c8e7f4253e5879c37238314245762c8bfe7717e0 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Fri, 25 May 2018 14:08:31 +0100 Subject: [PATCH] tests: Remove stale rootfs tree Remove the rootfs tree before attempting to generate one to avoid picking up any stale information if the function is run multiple times. Signed-off-by: James O. D. Hunt --- tests/image_creation.bats | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/image_creation.bats b/tests/image_creation.bats index de44bd342a..695edbaf49 100644 --- a/tests/image_creation.bats +++ b/tests/image_creation.bats @@ -26,6 +26,9 @@ build_rootfs() { local full="${tmp_rootfs}${osbuilder_file}" + # clean up from any previous runs + [ -d "${tmp_rootfs}" ] && sudo rm -rf "${tmp_rootfs}" + sudo -E ${rootfs_sh} -r "${tmp_rootfs}" "${distro}" yamllint "${full}"