Bug 1373008 - Store test group for FailureLines as a many-to-many relationship

Test Group is often a manifest, but not necessarily.  It could be just
``default`` when there is no manifest.
This commit is contained in:
Cameron Dawson 2017-06-15 16:58:16 -07:00 коммит произвёл camd
Родитель 8c4b6f0be2
Коммит e181d21989
7 изменённых файлов: 128 добавлений и 18 удалений

Просмотреть файл

@ -1,3 +1,5 @@
import json
import pytest
import responses
from django.conf import settings
@ -6,6 +8,7 @@ from requests.exceptions import HTTPError
from treeherder.log_parser.failureline import (store_failure_lines,
write_failure_lines)
from treeherder.model.models import (FailureLine,
Group,
JobLog)
from treeherder.model.search import TestFailureLine
@ -25,14 +28,38 @@ def test_store_error_summary(activate_responses, test_repository, test_job):
store_failure_lines(log_obj)
assert FailureLine.objects.count() == 1
assert Group.objects.count() == 1
failure = FailureLine.objects.get(pk=1)
assert failure.group.all().first().name == "devtools/client/debugger/new/test/mochitest"
assert failure.job_guid == test_job.guid
assert failure.repository == test_repository
def test_store_error_summary_default_group(activate_responses, test_repository, test_job):
log_path = SampleData().get_log_path("plain-chunked_errorsummary.log")
log_url = 'http://my-log.mozilla.org'
with open(log_path) as log_handler:
resp_body = json.load(log_handler)
resp_body["group"] = "default"
responses.add(responses.GET, log_url,
body=json.dumps(resp_body), status=200)
log_obj = JobLog.objects.create(job=test_job, name="errorsummary_json", url=log_url)
store_failure_lines(log_obj)
assert FailureLine.objects.count() == 1
assert Group.objects.count() == 1
failure = FailureLine.objects.get(pk=1)
assert failure.group.all().first().name == "default"
def test_store_error_summary_truncated(activate_responses, test_repository,
test_job, monkeypatch):
log_path = SampleData().get_log_path("plain-chunked_errorsummary_10_lines.log")
@ -50,6 +77,11 @@ def test_store_error_summary_truncated(activate_responses, test_repository,
assert FailureLine.objects.count() == 5 + 1
assert Group.objects.count() == 1
failure = FailureLine.objects.get(pk=1)
assert failure.group.all().first().name == "devtools/client/debugger/new/test/mochitest"
failure = FailureLine.objects.get(action='truncated')
assert failure.job_guid == test_job.guid
@ -71,6 +103,8 @@ def test_store_error_summary_astral(activate_responses, test_repository, test_jo
assert FailureLine.objects.count() == 1
assert Group.objects.count() == 1
failure = FailureLine.objects.get(pk=1)
assert failure.job_guid == test_job.guid

Просмотреть файл

@ -1 +1 @@
{"status": "FAIL", "line": 3116, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 3116, "subtest": "Test timed out.", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}

Просмотреть файл

@ -1,10 +1,10 @@
{"status": "FAIL", "line": 1, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 2, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 3, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 4, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 5, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 6, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 7, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 8, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 9, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 10, "subtest": "Test timed out.", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 1, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 2, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 3, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 4, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 5, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 6, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 7, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 8, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 9, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}
{"status": "FAIL", "line": 10, "subtest": "Test timed out.", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html", "message": null, "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n", "expected": "PASS"}

Просмотреть файл

@ -1 +1 @@
{"status": "FAIL", "line": 3116, "subtest": "Test timed out. 𐂁", "action": "test_result", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html 🍆", "message": "󰅑", "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n 󰅑", "expected": "PASS"}
{"status": "FAIL", "line": 3116, "subtest": "Test timed out. 𐂁", "action": "test_result", "group": "devtools/client/debugger/new/test/mochitest/browser.ini", "test": "toolkit/content/tests/widgets/test_videocontrols_video_direction.html 🍆", "message": "󰅑", "stack": " reportError@SimpleTest/TestRunner.js:334:7\n TestRunner._checkForHangs@SimpleTest/TestRunner.js:354:7\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:375:5\n runTests@toolkit/components/prompts/test/test_modal_prompts.html:1145:9\n @toolkit/components/prompts/test/test_modal_prompts.html:1234:1\n 󰅑", "expected": "PASS"}

Просмотреть файл

@ -2,6 +2,7 @@ import json
import logging
from itertools import islice
import newrelic.agent
from django.conf import settings
from django.db import transaction
from django.db.utils import (IntegrityError,
@ -11,6 +12,7 @@ from requests.exceptions import HTTPError
from treeherder.etl.common import fetch_text
from treeherder.etl.text import astral_filter
from treeherder.model.models import (FailureLine,
Group,
JobLog)
from treeherder.model.search import (TestFailureLine,
bulk_insert)
@ -94,13 +96,39 @@ def get_kwargs(failure_line):
if key in failure_line}
def create_failure_line(job_log, failure_line):
fl = FailureLine.objects.create(repository=job_log.job.repository,
job_guid=job_log.job.guid,
job_log=job_log,
**get_kwargs(failure_line))
if "group" in failure_line:
# Omit the filename before storing.
group_path = failure_line["group"].rsplit("/", 1)[0]
# Log to New Relic if it's not in a form we like. We can enter
# Bugs to upstream to remedy them.
if "\\" in group_path or ":" in group_path or len(group_path) > 255:
newrelic.agent.record_custom_event(
"malformed_test_group",
{"message": "Group paths must be relative, with no backslashes and <255 chars",
"group": failure_line["group"],
"group_path": group_path,
"length": len(group_path),
"repository": fl.repository,
"job_guid": fl.job_guid,
"failure_line_id": fl.id
})
# Save the value regardless
group, saved = Group.objects.get_or_create(name=group_path[:255])
group.failure_lines.add(fl)
return fl
def create(job_log, log_list):
failure_lines = [
FailureLine.objects.create(repository=job_log.job.repository,
job_guid=job_log.job.guid,
job_log=job_log,
**get_kwargs(failure_line))
for failure_line in log_list]
failure_lines = [create_failure_line(job_log, failure_line)
for failure_line in log_list]
job_log.update_status(JobLog.PARSED)
return failure_lines

Просмотреть файл

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-13 22:36
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('model', '0010_remove_TextLogSummary'),
]
operations = [
migrations.CreateModel(
name='Group',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=255, unique=True)),
('failure_lines', models.ManyToManyField(related_name='group', to='model.FailureLine')),
],
options={
'db_table': 'group',
},
),
]

Просмотреть файл

@ -1251,6 +1251,28 @@ class FailureLine(models.Model):
return es_line
class Group(models.Model):
"""
The test harness group.
This is most often a manifest file. But in some instances where a suite
doesn't have manifests, or a test suite isn't logging its data properly,
this can simply be "default"
Note: This is not to be confused with JobGroup which is Treeherder specific.
"""
id = models.BigAutoField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
failure_lines = models.ManyToManyField(FailureLine,
related_name='group')
def __str__(self):
return self.name
class Meta:
db_table = 'group'
class ClassifiedFailure(models.Model):
id = models.BigAutoField(primary_key=True)
failure_lines = models.ManyToManyField(FailureLine, through='FailureMatch',