Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/4] autobuild-run: adapt to genrandconfig without log_write
Date: Fri, 21 Jul 2017 03:06:19 +0200	[thread overview]
Message-ID: <20170721010621.4877-2-arnout@mind.be> (raw)
In-Reply-To: <20170721010621.4877-1-arnout@mind.be>

We now should catch the stderr output from genrandconfig and discard
stdout. However, for debugging, stdout is still useful, so keep that
if the -d option is given.

Also log an explicit message when genrandconfig failed. genrandconfig
itself should already have printed some error message, but:
- it's possible that it didn't, for some reason;
- it's missing a timestamp.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 scripts/autobuild-run | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index 879c9c3..85d82d8 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -307,10 +307,16 @@ def gen_config(**kwargs):
     log = kwargs['log']
     srcdir = os.path.join(idir, "buildroot")
 
+    log_write(log, "INFO: generate the configuration")
+
+    if kwargs['debug']:
+        devnull = log
+    else:
+        devnull = open(os.devnull, "w")
     ret = subprocess.call([os.path.join(srcdir, "utils/genrandconfig"),
                            "-i", str(kwargs['instance']),
                            "--toolchains-url", kwargs['toolchains_url']],
-                          stdout=log, stderr=log)
+                          stdout=devnull, stderr=log)
     return ret
 
 def do_build(**kwargs):
@@ -546,6 +552,7 @@ def run_instance(**kwargs):
 
         ret = gen_config(**kwargs)
         if ret != 0:
+            log_write(kwargs['log'], "WARN: failed to generate configuration")
             continue
 
         ret = do_build(**kwargs)
-- 
2.13.2

  reply	other threads:[~2017-07-21  1:06 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21  1:05 [Buildroot] [PATCH v7 00/23] Move toolchain configs and autobuild logic in-tree Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 01/23] utils/genrandconfig: new script Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 02/23] genrandconfig: use subprocess.check_output instead of Popen Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 03/23] genrandconfig: fix (some) pep8 warnings Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 04/23] genrandconfig: replace kwargs with explicit arguments Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 05/23] genrandconfig: move instantiation of SystemInfo down Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 06/23] genrandconfig: verbose output and use stderr Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 07/23] genrandconfig: calculate outputdir in __main__ Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 08/23] genrandconfig: calculate buildrootdir " Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 09/23] genrandconfig: pass outputdir and buildrootdir as arguments Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 10/23] genrandconfig: calculate configfile only once Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 11/23] genrandconfig: fix the case when outputdir is 'output' Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 12/23] support/test-pkg: move minimal.config into a separate file Arnout Vandecappelle
2017-07-21  7:01   ` Thomas Petazzoni
2017-07-21  1:05 ` [Buildroot] [PATCH v7 13/23] minimal.config: add BR2_COMPILER_PARANOID_UNSAFE_PATH=y Arnout Vandecappelle
2017-07-21  7:01   ` Thomas Petazzoni
2017-07-21  1:05 ` [Buildroot] [PATCH v7 14/23] minimal.config: add BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y Arnout Vandecappelle
2017-07-21  7:01   ` Thomas Petazzoni
2017-07-21  1:05 ` [Buildroot] [PATCH v7 15/23] genrandconfig: use minimal.config Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 16/23] support: add autobuild toolchain config fragments Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 17/23] test-pkg: get configs from in-tree toolchain-configs.csv Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 18/23] support/test-pkg: add option to use an alternate toolchains CSV file Arnout Vandecappelle
2017-07-25 21:05   ` Thomas Petazzoni
2017-07-21  1:05 ` [Buildroot] [PATCH v7 19/23] genrandconfig: get configs from in-tree toolchain-configs.csv Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 20/23] toolchain-configs.csv: remove unused libc column Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 21/23] Makefile: refactor *config targets Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 22/23] Makefile: add alldefconfig target Arnout Vandecappelle
2017-07-21  1:05 ` [Buildroot] [PATCH v7 23/23] test-pkg: use merge_config.sh to merge the fragments Arnout Vandecappelle
2017-07-21  1:06 ` [Buildroot] [PATCH v3 1/4] autobuild-run: use in-tree genrandconfig script (initial version) Arnout Vandecappelle
2017-07-21  1:06   ` Arnout Vandecappelle [this message]
2017-07-21  1:06   ` [Buildroot] [PATCH v3 3/4] autobuild-run: adapt to genrandconfig with outputdir and buildrootdir options Arnout Vandecappelle
2017-07-21  1:06   ` [Buildroot] [PATCH v3 4/4] autobuild-run: adapt to genrandconfig with toolchains-csv option Arnout Vandecappelle
2017-07-25 21:24   ` [Buildroot] [PATCH v3 1/4] autobuild-run: use in-tree genrandconfig script (initial version) Thomas Petazzoni
2017-07-25 21:10 ` [Buildroot] [PATCH v7 00/23] Move toolchain configs and autobuild logic in-tree Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170721010621.4877-2-arnout@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox