]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go/internal/load/test: parse overlay files for test functions
authorKevin Herro <kevin109104@gmail.com>
Fri, 26 Mar 2021 15:58:11 +0000 (08:58 -0700)
committerJay Conrod <jayconrod@google.com>
Wed, 31 Mar 2021 16:39:16 +0000 (16:39 +0000)
commit46fa8afca61cf60c64f006685cd6cbb94e080118
tree86afeed8439bc5318f0753158e08c4d1f5a8c574
parentca3aefc4a96f2e26c7bed549a6c90b6f12c1ecea
cmd/go/internal/load/test: parse overlay files for test functions

The existing implementation implicitly reads from the filesystem
instead of using the overlay file data (due to src == nil), so
pass in the overlaid source if we have an overlay for this file.

Fixes #44946

Change-Id: I61ce09d10c5edac1b47332583efdcd3c1241f58a
Reviewed-on: https://go-review.googlesource.com/c/go/+/305071
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/go/internal/load/test.go
src/cmd/go/testdata/script/test_overlay.txt [new file with mode: 0644]