From 3f8f033c4cb4c72b6752511efb5020c8fe3493bf Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 25 May 2020 10:27:54 -0400 Subject: [PATCH] test api: clean CAS repo before build Signed-off-by: Michal Mielewczyk --- test/functional/api/cas/installer.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/functional/api/cas/installer.py b/test/functional/api/cas/installer.py index ebec4da..a709e16 100644 --- a/test/functional/api/cas/installer.py +++ b/test/functional/api/cas/installer.py @@ -21,6 +21,18 @@ def install_opencas(): exclude_list=["test/functional/results/"], delete=True) + +def _clean_opencas_repo(): + TestRun.LOGGER.info("Cleaning Open CAS repo") + output = TestRun.executor.run( + f"cd {TestRun.usr.working_dir} && " + "make distclean") + if output.exit_code != 0: + raise CmdException("make distclean command executed with nonzero status", output) + + +def install_opencas(): + _clean_opencas_repo() TestRun.LOGGER.info("Building Open CAS") output = TestRun.executor.run( f"cd {TestRun.usr.working_dir} && "