mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
runtime/race: don't complain about unrun tests when fatal map access happens
Fixes #72964 Change-Id: I42c6994fec3b21774bddd1d4d65dc832d9149446 Reviewed-on: https://go-review.googlesource.com/c/go/+/659697 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
93fe8c0415
commit
686128a9f3
@ -190,6 +190,12 @@ func runTests(t *testing.T) ([]byte, error) {
|
||||
// in the map concurrent access detector).
|
||||
return out, errors.New("runtime fatal error")
|
||||
}
|
||||
// A crash in the map concurrent access detector will cause other tests not to run.
|
||||
// Perhaps we should run tests with concurrent map access separately to avoid this,
|
||||
// but for the moment just skip the remaining tests.
|
||||
if mapFatals == 0 {
|
||||
return out, nil
|
||||
}
|
||||
if !bytes.Contains(out, []byte("ALL TESTS COMPLETE")) {
|
||||
return out, errors.New("not all tests ran")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user