Esempio n. 1
0
def ProcessCommonOptions(args):
    """Processes and handles all common options."""
    run_tests_helper.SetLogLevel(args.verbose_count, add_handler=False)
    handler = logging_utils.ColorStreamHandler()
    handler.setFormatter(run_tests_helper.CustomFormatter())
    logging.getLogger().addHandler(handler)

    constants.SetBuildType(args.build_type)
    if args.output_directory:
        constants.SetOutputDirectory(args.output_directory)
Esempio n. 2
0
def ProcessCommonOptions(args):
    """Processes and handles all common options."""
    run_tests_helper.SetLogLevel(args.verbose_count, add_handler=False)
    # pylint: disable=redefined-variable-type
    if args.verbose_count > 0:
        handler = logging_utils.ColorStreamHandler()
    else:
        handler = logging.StreamHandler(sys.stdout)
    # pylint: enable=redefined-variable-type
    handler.setFormatter(run_tests_helper.CustomFormatter())
    logging.getLogger().addHandler(handler)

    constants.SetBuildType(args.build_type)
    if args.output_directory:
        constants.SetOutputDirectory(args.output_directory)