diff mbox series

[v2,2/5] autobuild-run: make prepare_build() clean the output directory used for reproducibility testing

Message ID 20190810035902.14047-2-itsatharva@gmail.com
State Accepted
Headers show
Series [v2,1/5] autobuild-run: use different output directories for reproducible builds testing | expand

Commit Message

Atharva Lele Aug. 10, 2019, 3:58 a.m. UTC
The previous patch introduced a new output directory for the second build in a
reproducibile build test. This patch will make sure that it is cleaned before
the subsequent build process begins.

Signed-off-by: Atharva Lele <itsatharva@gmail.com>
---
 scripts/autobuild-run | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thomas Petazzoni Aug. 11, 2019, 1:39 p.m. UTC | #1
On Sat, 10 Aug 2019 09:28:59 +0530
Atharva Lele <itsatharva@gmail.com> wrote:

> The previous patch introduced a new output directory for the second build in a
> reproducibile build test. This patch will make sure that it is cleaned before
> the subsequent build process begins.
> 
> Signed-off-by: Atharva Lele <itsatharva@gmail.com>
> ---
>  scripts/autobuild-run | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to buildroot-test, thanks!

Thomas
diff mbox series

Patch

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