def print_build_failures():
    from SCons.Script import GetBuildFailures
    build_failures = GetBuildFailures()
    if build_failures:
        print '** Build errors...'
        for build_failure in build_failures:
            print "%s failed: %s" % (build_failure.node, build_failure.errstr)
        print ''
示例#2
0
def print_build_failures(message):
    '''
	Print error message when build fail
	:param message: string, error message
	'''
    from SCons.Script import GetBuildFailures
    for bf in GetBuildFailures():
        print("BUILD ERROR REPORT".center(40, '*'))
        print("FAILED BUILD: %s" % (bf.node))
        print("MESSAGE REPORT".center(40, '*'))
        print("%s" % (message))
示例#3
0
def display_build_status():
    from SCons.Script import GetBuildFailures
    bf_all = GetBuildFailures()
    if bf_all:
        # iterate over all failures and print the command
        for bf in bf_all:
            if bf and bf.node and bf.command:
                print('Failed command for %s:\n' % str(bf.node))
                print(' '.join(bf.command))
        print("!!!!!!!!!!!!!!!")
        print("!!! FAILED !!!!")
        print("!!!!!!!!!!!!!!!")
def build_status():
    """Convert the build status to a 2-tuple, (status, msg)."""
    from SCons.Script import GetBuildFailures
    bf = GetBuildFailures()
    if bf:
        # bf is normally a list of build failures; if an element is None,
        # it's because of a target that scons doesn't know anything about.
        status = 'failed'
        failures_message = "\n".join(["Failed building %s" % bf_to_str(x)
                           for x in bf if x is not None])
    else:
        # if bf is None, the build completed successfully.
        status = 'ok'
        failures_message = ''
    return (status, failures_message)
def print_build_failures():
    '''
    print_build_failures
    '''
    from SCons.Script import GetBuildFailures
    global default_env

    build_failures = GetBuildFailures()
    if build_failures:
        print '** Build errors...'
        for build_failure in build_failures:
            if default_env['PLATFORM'] in ['windows', 'win32']:
                default_env.Replace(MAXPATHLINELENGTH=254)
                check_paths(default_env, str(build_failure.node))
            print "%s failed: %s" % (build_failure.node, build_failure.errstr)
        print ''
示例#6
0
def build_status(messages, display_warnings=False):
    """Convert the build status to a 2-tuple, (status, msg)."""
    from SCons.Script import GetBuildFailures
    bf = GetBuildFailures()

    files = set()
    analyzer = BuildFailureAnalyzer(messages)
    additional_message = ''

    if bf:
        # bf is normally a list of build failures; if an element is None,
        # it's because of a target that scons doesn't know anything about.
        status = 'failed'
        for failure in bf:
            analysis = analyzer.analyze(failure)

            if analysis.command is not None:
                files.add(analysis.command)

            if len(additional_message) != 0:
                additional_message += "\n"
            additional_message += "SCONS FAILURE: failed building %s\n" %\
                analysis.message
    else:
        # if bf is None, the build completed successfully.
        status = 'ok'

    if display_warnings:
        warnings = []

        for command, message in messages.get_all():
            command = command_to_str(command)

            if command in files:
                # This command already failed.
                continue

            warnings.append('%s:\n\n%s' % (command, message))

        if len(warnings) > 0:
            additional_message = 'Warnings:\n\n%s\n%s' %\
                ('\n'.join(warnings), additional_message)

    return (status, additional_message)
示例#7
0
def print_build_failures():
    from SCons.Script import GetBuildFailures
    for bf in GetBuildFailures():
        print("%s failed: %s" % (bf.node, bf.errstr))
 def print_build_failures():
     from SCons.Script import GetBuildFailures
     for bf in GetBuildFailures():