From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Mon, 11 May 2015 12:23:18 -0500 Subject: [U-Boot] [PATCH v2 7/7] moveconfig: Add a switch to enable printing errors In-Reply-To: <1431364998-2905-1-git-send-email-joe.hershberger@ni.com> References: <1431033780-2286-1-git-send-email-joe.hershberger@ni.com> <1431364998-2905-1-git-send-email-joe.hershberger@ni.com> Message-ID: <1431364998-2905-7-git-send-email-joe.hershberger@ni.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In some cases the build for the autoconf breaks. This outputs the errors following the status so that action can be taken without building again manually. Signed-off-by: Joe Hershberger --- Changes in v2: None tools/moveconfig.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/moveconfig.py b/tools/moveconfig.py index ad9dbac..b5c3157 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -242,7 +242,7 @@ class Slot: for faster processing. """ - def __init__(self, config_attr, devnull, make_cmd): + def __init__(self, config_attr, devnull, make_cmd, options): """Create a new slot. Arguments: @@ -251,6 +251,7 @@ class Slot: self.build_dir = tempfile.mkdtemp() self.devnull = devnull self.make_cmd = (make_cmd, 'O=' + self.build_dir) + self.options = options self.parser = KconfigParser(self.build_dir, config_attr) self.state = STATE_IDLE @@ -308,6 +309,8 @@ class Slot: if errout.find('gcc: command not found') != -1: errmsg = 'ERROR - compiler not found (%s)' % self.cross_compile self.defconfig_error(errmsg) + if self.options.verbose: + print errout self.state = STATE_IDLE return True @@ -347,7 +350,7 @@ class Slots: """Controller of the array of subprocess slots.""" - def __init__(self, config_attr, jobs): + def __init__(self, config_attr, options): """Create a new slots controller. Arguments: @@ -356,8 +359,8 @@ class Slots: self.slots = [] devnull = get_devnull() make_cmd = get_make_cmd() - for i in range(jobs): - self.slots.append(Slot(config_attr, devnull, make_cmd)) + for i in range(options.jobs): + self.slots.append(Slot(config_attr, devnull, make_cmd, options)) def add(self, defconfig): """Add a new subprocess if a vacant slot is available. @@ -423,7 +426,7 @@ def move_config(config_attr, options): if os.path.exists('moveconfig.failed'): os.remove('moveconfig.failed') - slots = Slots(config_attr, options.jobs) + slots = Slots(config_attr, options) # Main loop to process defconfig files: # Add a new subprocess into a vacant slot. @@ -458,6 +461,9 @@ def main(): help='the number of jobs to run simultaneously') parser.add_option('-d', '--defconfigs', type='string', help='a file containing a list of defconfigs to move') + parser.add_option('-v', '--verbose', dest='verbose', + action='store_true', default=False, + help='show any build errors as boards are build') parser.usage += ' config type default no_spl_support' (options, args) = parser.parse_args() -- 1.7.11.5