def test_get_group_results_with_colon(activate_responses, test_repository,
                                      test_job):
    log_path = SampleData().get_log_path(
        "xpcshell-errorsummary-with-colon.log")
    log_url = 'http://my-log.mozilla.org'

    with open(log_path) as log_handler:
        responses.add(responses.GET,
                      log_url,
                      body=log_handler.read(),
                      status=200)

    log_obj = JobLog.objects.create(job=test_job,
                                    name="errorsummary_json",
                                    url=log_url)
    store_failure_lines(log_obj)

    groups = get_group_results(test_job.push)
    task_groups = groups['V3SVuxO8TFy37En_6HcXLs']

    assert task_groups[
        'toolkit/components/extensions/test/xpcshell/xpcshell-e10s.ini:toolkit/components/extensions/test/xpcshell/xpcshell-content.ini']
    assert task_groups['toolkit/components/places/tests/unit/xpcshell.ini']
    assert task_groups[
        'toolkit/components/extensions/test/xpcshell/xpcshell-e10s.ini:toolkit/components/extensions/test/xpcshell/xpcshell-common-e10s.ini']
Beispiel #2
0
    def get_push_test_groups(self, branch, rev) -> Dict[str, List[str]]:
        if not Push:
            raise ContractNotFilled(self.name, "push_test_groups",
                                    "could not import Push model")

        push = Push.objects.get(repository__name=branch, revision=rev)
        return get_group_results(push)
Beispiel #3
0
def test_get_group_results(activate_responses, test_repository, test_job):
    log_path = SampleData().get_log_path("mochitest-browser-chrome_errorsummary.log")
    log_url = 'http://my-log.mozilla.org'

    with open(log_path) as log_handler:
        responses.add(responses.GET, log_url, body=log_handler.read(), status=200)

    log_obj = JobLog.objects.create(job=test_job, name="errorsummary_json", url=log_url)
    store_failure_lines(log_obj)

    groups = get_group_results(test_job.push)
    task_groups = groups['V3SVuxO8TFy37En_6HcXLs']

    assert task_groups['dom/base/test']
Beispiel #4
0
    def group_results(self, request, project):
        """
        Return the results of all the test groups for this push.
        """
        revision = request.query_params.get('revision')

        try:
            repository = Repository.objects.get(name=project)
            push = Push.objects.get(revision=revision, repository=repository)
        except Push.DoesNotExist:
            return Response("No push with revision: {0}".format(revision),
                            status=HTTP_404_NOT_FOUND)
        groups = get_group_results(push)

        return Response(groups)