aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/reporting_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-01-17 19:43:04 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-01-17 19:52:30 +0100
commitd7bc58204ea84ccb2ed541dd26a6b6d8bc326f5d (patch)
tree99402fe448f9d0c4de429903a9a55cb2f4b01334 /dashboard/app/reporting_test.go
parent02a2ba2966613de55c837fe709ee34f1ff5be606 (diff)
dashboard/app: collect more info for better reports
Collect kernel build commit title/date. Add support for kernel repo aliases (to be able to say linux-next instead of full git repo address). Collect on what managers a bug happened. Reuse Crash.ReportLen as generic crash reporting priority. Make it possible to prioritize reporting of particular kernel repos and arches. Fixes #473
Diffstat (limited to 'dashboard/app/reporting_test.go')
-rw-r--r--dashboard/app/reporting_test.go62
1 files changed, 34 insertions, 28 deletions
diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go
index bd743f33a..dbba2e626 100644
--- a/dashboard/app/reporting_test.go
+++ b/dashboard/app/reporting_test.go
@@ -46,20 +46,23 @@ func TestReportBug(t *testing.T) {
t.Fatalf("empty report ID")
}
want := &dashapi.BugReport{
- Namespace: "test1",
- Config: []byte(`{"Index":1}`),
- ID: rep.ID,
- First: true,
- Title: "title1",
- Maintainers: []string{"bar@foo.com", "foo@bar.com"},
- CompilerID: "compiler1",
- KernelRepo: "repo1",
- KernelBranch: "branch1",
- KernelCommit: "kernel_commit1",
- KernelConfig: []byte("config1"),
- Log: []byte("log1"),
- Report: []byte("report1"),
- CrashID: rep.CrashID,
+ Namespace: "test1",
+ Config: []byte(`{"Index":1}`),
+ ID: rep.ID,
+ First: true,
+ Title: "title1",
+ Maintainers: []string{"bar@foo.com", "foo@bar.com"},
+ CompilerID: "compiler1",
+ KernelRepo: "repo1",
+ KernelRepoAlias: "repo1/branch1",
+ KernelBranch: "branch1",
+ KernelCommit: "kernel_commit1",
+ KernelCommitTitle: build.KernelCommitTitle,
+ KernelCommitDate: buildCommitDate,
+ KernelConfig: []byte("config1"),
+ Log: []byte("log1"),
+ Report: []byte("report1"),
+ CrashID: rep.CrashID,
}
c.expectEQ(rep, want)
@@ -214,20 +217,23 @@ func TestInvalidBug(t *testing.T) {
t.Fatalf("empty report ID")
}
want := &dashapi.BugReport{
- Namespace: "test1",
- Config: []byte(`{"Index":1}`),
- ID: rep.ID,
- First: true,
- Title: "title1 (2)",
- CompilerID: "compiler1",
- KernelRepo: "repo1",
- KernelBranch: "branch1",
- KernelCommit: "kernel_commit1",
- KernelConfig: []byte("config1"),
- Log: []byte("log2"),
- Report: []byte("report2"),
- ReproC: []byte("int main() { return 1; }"),
- CrashID: rep.CrashID,
+ Namespace: "test1",
+ Config: []byte(`{"Index":1}`),
+ ID: rep.ID,
+ First: true,
+ Title: "title1 (2)",
+ CompilerID: "compiler1",
+ KernelRepo: "repo1",
+ KernelRepoAlias: "repo1/branch1",
+ KernelBranch: "branch1",
+ KernelCommit: "kernel_commit1",
+ KernelCommitTitle: build.KernelCommitTitle,
+ KernelCommitDate: buildCommitDate,
+ KernelConfig: []byte("config1"),
+ Log: []byte("log2"),
+ Report: []byte("report2"),
+ ReproC: []byte("int main() { return 1; }"),
+ CrashID: rep.CrashID,
}
c.expectEQ(rep, want)