diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-27 14:05:14 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-27 14:05:14 +0100 |
| commit | 6f7be11fa1dfb7538af54ffafd1cc644d3975a1d (patch) | |
| tree | 2c5e659127245a15b559ecc1dcda66cacbfbac6c /pkg/bisect/bisect_test.go | |
| parent | 9f5fd6fe1a3835945ce119f2b5d3633d3b81ff61 (diff) | |
dashboard/app: don't report bisections pointing to release commits
They should have been detected by "same binary" logic.
But the problem is that we may use different compilers
for different commits and they switch exactly at release commits.
So we can build the release with a differnet compiler than the
rest of commits and then obviously it won't be "same binary".
Detect release commits separately.
Update #1271
Diffstat (limited to 'pkg/bisect/bisect_test.go')
| -rw-r--r-- | pkg/bisect/bisect_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/bisect/bisect_test.go b/pkg/bisect/bisect_test.go index 01dbfd44e..56e5e5ccb 100644 --- a/pkg/bisect/bisect_test.go +++ b/pkg/bisect/bisect_test.go @@ -127,6 +127,7 @@ type BisectionTest struct { expectErr bool expectRep bool noopChange bool + isRelease bool commitLen int oldestLatest int // input and output @@ -177,6 +178,7 @@ func TestBisectionResults(t *testing.T) { startCommit: 400, commitLen: 1, culprit: 500, + isRelease: true, }, // Tests that fix bisection returns error when crash does not reproduce // on the original commit. @@ -254,6 +256,7 @@ func TestBisectionResults(t *testing.T) { sameBinaryStart: 405, sameBinaryEnd: 500, noopChange: true, + isRelease: true, }, { name: "cause-same-binary-release2", @@ -285,6 +288,14 @@ func TestBisectionResults(t *testing.T) { sameBinaryEnd: 905, noopChange: true, }, + { + name: "fix-release", + fix: true, + startCommit: 400, + commitLen: 1, + culprit: 900, + isRelease: true, + }, } for _, test := range tests { test := test @@ -328,6 +339,9 @@ func TestBisectionResults(t *testing.T) { if res.NoopChange != test.noopChange { t.Fatalf("got noop change: %v, want: %v", res.NoopChange, test.noopChange) } + if res.IsRelease != test.isRelease { + t.Fatalf("got release change: %v, want: %v", res.IsRelease, test.isRelease) + } if test.oldestLatest != 0 && fmt.Sprint(test.oldestLatest) != res.Commit.Title || test.oldestLatest == 0 && res.Commit != nil { t.Fatalf("expected latest/oldest: %v got '%v'", |
