Пример #1
0
def run(port, options, args, logging_stream, stdout):
    logger = logging.getLogger()
    logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)

    printer = printing.Printer(port, options, logging_stream, logger=logger)
    try:
        run_details = _run_tests(port, options, args, printer)
        printer.flush()

        if (not options.dry_run and
                (run_details.exit_code not in test_run_results.ERROR_CODES or
                 run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and
                not run_details.initial_results.keyboard_interrupted):
            bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug_rwt_logging)
            bot_printer.print_results(run_details)
            stdout.flush()

            _log.debug("Generating dashboard...")
            gen_dash_board = DashBoardGenerator(port)
            gen_dash_board.generate()
            _log.debug("Dashboard generated.")

        _log.debug("")
        _log.debug("Testing completed, Exit status: %d" % run_details.exit_code)

        # Temporary process dump for debugging windows timeout issues, see crbug.com/522396.
        _log.debug("")
        _log.debug("Process dump:")
        for process in Executive().process_dump():
            _log.debug("\t%s" % process)

        return run_details

    finally:
        printer.cleanup()
Пример #2
0
def run(port, options, args, logging_stream, stdout):
    logger = logging.getLogger()
    logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)

    printer = printing.Printer(port, options, logging_stream, logger=logger)
    try:
        run_details = _run_tests(port, options, args, printer)
        printer.flush()

        if (not options.dry_run and
                (run_details.exit_code not in test_run_results.ERROR_CODES or
                 run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and
                not run_details.initial_results.keyboard_interrupted):
            bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug_rwt_logging)
            bot_printer.print_results(run_details)
            stdout.flush()

            _log.debug("Generating dashboard...")
            gen_dash_board = DashBoardGenerator(port)
            gen_dash_board.generate()
            _log.debug("Dashboard generated.")

        _log.debug("")
        _log.debug("Testing completed, Exit status: %d", run_details.exit_code)

        # Temporary process dump for debugging windows timeout issues, see crbug.com/522396.
        _log.debug("")
        _log.debug("Process dump:")
        for process in port.host.executive.process_dump():
            _log.debug("\t%s", process)

        return run_details

    finally:
        printer.cleanup()
Пример #3
0
def run(port, options, args, logging_stream, stdout):
    logger = logging.getLogger()
    logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)

    printer = printing.Printer(port, options, logging_stream, logger=logger)
    try:
        run_details = _run_tests(port, options, args, printer)
        printer.flush()

        if (not options.dry_run and
                (run_details.exit_code not in exit_codes.ERROR_CODES or
                 run_details.exit_code == exit_codes.EARLY_EXIT_STATUS) and
                not run_details.initial_results.keyboard_interrupted):
            bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug_rwt_logging)
            bot_printer.print_results(run_details)
            stdout.flush()

            _log.debug('Generating dashboard...')
            gen_dash_board = DashBoardGenerator(port)
            gen_dash_board.generate()
            _log.debug('Dashboard generated.')

        _log.debug('')
        _log.debug('Testing completed, Exit status: %d', run_details.exit_code)
        return run_details

    finally:
        printer.cleanup()
Пример #4
0
    try:
        port = host.port_factory.get(options.platform, options)
    except NotImplementedError, e:
        # FIXME: is this the best way to handle unsupported port names?
        print >> stderr, str(e)
        return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS

    try:
        run_details = run(port, options, args, stderr)
        if ((run_details.exit_code not in test_run_results.ERROR_CODES or
             run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and
            not run_details.initial_results.keyboard_interrupted):
            bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug_rwt_logging)
            bot_printer.print_results(run_details)
            gen_dash_board = DashBoardGenerator(port)
            gen_dash_board.generate()

        return run_details.exit_code

    # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest cases.
    except KeyboardInterrupt:
        return test_run_results.INTERRUPTED_EXIT_STATUS
    except test_run_results.TestRunException as e:
        print >> stderr, e.msg
        return e.code
    except BaseException as e:
        if isinstance(e, Exception):
            print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))
            traceback.print_exc(file=stderr)
        return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS
Пример #5
0
    try:
        port = host.port_factory.get(options.platform, options)
    except NotImplementedError, e:
        # FIXME: is this the best way to handle unsupported port names?
        print >> stderr, str(e)
        return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS

    try:
        run_details = run(port, options, args, stderr)
        if ((run_details.exit_code not in test_run_results.ERROR_CODES
             or run_details.exit_code == test_run_results.EARLY_EXIT_STATUS)
                and not run_details.initial_results.keyboard_interrupted):
            bot_printer = buildbot_results.BuildBotPrinter(
                stdout, options.debug_rwt_logging)
            bot_printer.print_results(run_details)
            gen_dash_board = DashBoardGenerator(port)
            gen_dash_board.generate()

        return run_details.exit_code

    # We need to still handle KeyboardInterrupt, atleast for webkitpy unittest cases.
    except KeyboardInterrupt:
        return test_run_results.INTERRUPTED_EXIT_STATUS
    except test_run_results.TestRunException as e:
        print >> stderr, e.msg
        return e.code
    except BaseException as e:
        if isinstance(e, Exception):
            print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))
            traceback.print_exc(file=stderr)
        return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS