Skip to contentSkip to conversation

autobuild-run: move creation of result directory to run_instance()

PATCH Superseded Atharva Lele 1 participant 1 message Jun 11, 2019

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autobuild-run: move creation of result directory to run_instance()

We need the result directory to be present when the check_reproducibility() function (implemented in the next patch) executes. As of now the results directory is created in the send_results() function which executes after check_reproducibility() will.

---
 scripts/autobuild-run | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
scripts/autobuild-run +3 -2
index ef2f2a5..190a254 100755
@@ -470,8 +470,6 @@ def send_results(result, **kwargs):
     srcdir = os.path.join(idir, "buildroot")
     resultdir = os.path.join(outputdir, "results")
 
-    os.mkdir(resultdir)
-
     shutil.copyfile(os.path.join(outputdir, ".config"),
                     os.path.join(resultdir, "config"))
     shutil.copyfile(os.path.join(outputdir, "defconfig"),
@@ -647,6 +645,9 @@ def run_instance(**kwargs):
         if ret != 0:
             continue
 
+        resultdir = os.path.join(idir, "output", "results")
+        os.mkdir(resultdir)
+
         ret = gen_config(**kwargs)
         if ret != 0:
             log_write(kwargs['log'], "WARN: failed to generate configuration")
Signature · 1 line
2.20.1