예제 #1
0
def main():
    """Entry point."""
    autotest.monkeypatch()

    options = parse_args()
    print(options.suite_task_ids)
    print(options.abort_limit)
    suite_tracking.setup_logging()
    _abort_suite(options)
    return 0
예제 #2
0
def main():
    """Entry point."""
    autotest.monkeypatch()

    options = parse_args()
    _setup_env(options)
    suite_tracking.setup_logging()
    result = _run_suite(options)
    logging.info('Will return from %s with status: %s',
                 os.path.basename(__file__), result.string_code)
    return result.return_code
예제 #3
0
def main(args):
    """Main function

    @param args: list of command line args
    """
    args = _parse_args_and_configure_logging(args)
    logger.info('Starting with args: %r', args)
    with leasing.obtain_lease(_lease_path(args.jobdir, args.job_id)):
        autotest.monkeypatch()
        ret = _main(args)
    logger.info('Exiting normally with: %r', ret)
    return ret
def main(argv):
    """Main function

    @param argv: command line args
    """
    print('job_reporter: Running with argv: %r' % argv, file=sys.stderr)
    args = _parse_args_and_configure_logging(argv[1:])
    logger.info('Running with parsed args: %r', args)
    with leasing.obtain_lease(_lease_path(args.jobdir, args.job_id)):
        autotest.monkeypatch()
        ret = _main(args)
    logger.info('Exiting normally with: %r', ret)
    return ret
예제 #5
0
def main(args):
    """Main function

    @param args: list of command line args
    """

    parser = argparse.ArgumentParser(prog='job_aborter', description=__doc__)
    parser.add_argument('--jobdir', required=True)
    loglib.add_logging_options(parser)
    args = parser.parse_args(args)
    loglib.configure_logging_with_args(parser, args)
    logger.info('Starting with args: %r', args)

    autotest.monkeypatch()
    ts_mon_config = autotest.chromite_load('ts_mon_config')
    with ts_mon_config.SetupTsMonGlobalState('job_aborter'):
        _main_loop(jobdir=args.jobdir)
    assert False  # cannot exit normally
def main():
    """Entry point of test_push."""
    autotest.monkeypatch()
    metrics = autotest.chromite_load('metrics')
    ts_mon_config = autotest.chromite_load('ts_mon_config')

    parser = _get_parser()
    loglib.add_logging_options(parser)
    args = parser.parse_args()
    loglib.configure_logging_with_args(parser, args)

    with ts_mon_config.SetupTsMonGlobalState(service_name='skylab_test_push',
                                             indirect=True):
        success = False
        try:
            with metrics.SecondsTimer(_METRICS_PREFIX + '/durations/total',
                                      add_exception_field=True):
                _run_test_push(args)
            success = True
        finally:
            metrics.Counter(_METRICS_PREFIX +
                            '/tick').increment(fields={'success': success})
예제 #7
0
def pytest_configure():
    """Configuration befor pytest starts."""
    autotest.monkeypatch()