Changeset 1b40c77 in rtems-source-builder


Ignore:
Timestamp:
May 15, 2013, 3:23:41 AM (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
6e583e5
Parents:
53027a9
Message:

Make outputing errors optional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/check.py

    r53027a9 r1b40c77  
    3939
    4040
    41 def _check_dir(_opts, macro, value, constraint):
     41def _check_dir(_opts, macro, value, constraint, silent = False):
    4242    if constraint != 'none' and not path.isdir(value):
    4343        if constraint == 'required':
    44             log.notice('error: dir: not found: (%s) %s' % (macro, value))
     44            if not silent:
     45                log.notice('error: dir: not found: (%s) %s' % (macro, value))
    4546            return False
    46         if _opts.warn_all():
     47        if not silent and _opts.warn_all():
    4748            log.notice('warning: dir: not found: (%s) %s' % (macro, value))
    4849    return True
    4950
    5051
    51 def _check_exe(_opts, macro, value, constraint):
     52def _check_exe(_opts, macro, value, constraint, silent = False):
    5253
    5354    if len(value) == 0 or constraint == 'none':
     
    7172    if _check_paths(value, paths):
    7273        if absexe:
    73             log.notice('warning: exe: absolute exe found in path: (%s) %s' % (macro, orig_value))
     74            if not silent:
     75                log.notice('warning: exe: absolute exe found in path: (%s) %s' % (macro, orig_value))
    7476        return True
    7577
    7678    if constraint == 'optional':
    77         log.trace('warning: exe: optional exe not found: (%s) %s' % (macro, orig_value))
     79        if not silent:
     80            log.trace('warning: exe: optional exe not found: (%s) %s' % (macro, orig_value))
    7881        return True
    7982
    80     log.notice('error: exe: not found: (%s) %s' % (macro, orig_value))
     83    if not silent:
     84        log.notice('error: exe: not found: (%s) %s' % (macro, orig_value))
    8185    return False
    8286
     
    128132
    129133def check_exe(label, exe):
    130     return _check_exe(None, label, exe, None)
     134    return _check_exe(None, label, exe, None, True)
    131135
    132136
Note: See TracChangeset for help on using the changeset viewer.