[v3,31/31] autobuild-run: make prepare_build() clean the output directory used for reproducibility testing
diff mbox series

Message ID 20190707052831.9469-31-itsatharva@gmail.com
State Superseded
Headers show
  • [v3,01/31] autobuild-run: introduce Builder class
Related show

Commit Message

Atharva Lele July 7, 2019, 5:28 a.m. UTC
Signed-off-by: Atharva Lele <itsatharva@gmail.com>
 scripts/autobuild-run | 4 ++++
 1 file changed, 4 insertions(+)

diff mbox series

diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index cdf013c..3156e9d 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -380,6 +380,10 @@  class Builder:
             # shutil.rmtree doesn't remove write-protected files
             subprocess.call(["rm", "-rf", self.outputdir])
+        # If it exists, remove the other output directory used for reproducibility testing
+        if os.path.exists(self.outputdir_1):
+            subprocess.call(["rm", "-rf", self.outputdir_1])
         with open(os.path.join(self.outputdir, "branch"), "w") as branchf: