Example #1
0
def _init_matchers():
    from treeherder.autoclassify import matchers
    matchers.register()
Example #2
0
from django.core.management.base import (BaseCommand,
                                         CommandError)

from treeherder.autoclassify import matchers
from treeherder.model.models import (FailureLine,
                                     FailureMatch,
                                     Matcher)

logger = logging.getLogger(__name__)

# The minimum goodness of match we need to mark a particular match as the best match
AUTOCLASSIFY_CUTOFF_RATIO = 0.8

# Initialisation needed to associate matcher functions with the matcher objects
matchers.register()


class Command(BaseCommand):
    args = '<job_guid>, <repository>'
    help = 'Mark failures on a job.'

    def handle(self, *args, **options):

        if not len(args) == 2:
            raise CommandError('3 arguments required, %s given' % len(args))
        job_id, repository = args

        match_errors(repository, job_id)

Example #3
0
def _init_matchers():
    from treeherder.autoclassify import matchers
    matchers.register()
Example #4
0
import logging
from collections import defaultdict

from django.core.management.base import (BaseCommand, CommandError)

from treeherder.autoclassify import matchers
from treeherder.model.models import (FailureLine, FailureMatch, Matcher)

logger = logging.getLogger(__name__)

# The minimum goodness of match we need to mark a particular match as the best match
AUTOCLASSIFY_CUTOFF_RATIO = 0.8

# Initialisation needed to associate matcher functions with the matcher objects
matchers.register()


class Command(BaseCommand):
    args = '<job_guid>, <repository>'
    help = 'Mark failures on a job.'

    def handle(self, *args, **options):

        if not len(args) == 2:
            raise CommandError('3 arguments required, %s given' % len(args))
        job_id, repository = args

        match_errors(repository, job_id)


def match_errors(repository, job_guid):