-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: convert TestCoveragePattern to the script framework
This test already runs in parallel, but still convert it to the script framework so we can delete the testdata/src directory and remove any ambiguity about which tests can run in parallel. Updates #36320 Change-Id: I6470979bd8bad0631dc6ead0d4eb9c83878356e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/212815 Run-TryBot: Michael Matloob <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
- Loading branch information
Showing
5 changed files
with
37 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[gccgo] skip | ||
|
||
# If coverpkg=sleepy... expands by package loading | ||
# (as opposed to pattern matching on deps) | ||
# then it will try to load sleepybad, which does not compile, | ||
# and the test command will fail. | ||
! go list sleepy... | ||
go test -c -n -coverprofile=$TMPDIR/cover.out -coverpkg=sleepy... -run=^$ sleepy1 | ||
|
||
-- sleepy1/p_test.go -- | ||
package p | ||
|
||
import ( | ||
"testing" | ||
"time" | ||
) | ||
|
||
func Test1(t *testing.T) { | ||
time.Sleep(200 * time.Millisecond) | ||
} | ||
-- sleepy2/p_test.go -- | ||
package p | ||
|
||
import ( | ||
"testing" | ||
"time" | ||
) | ||
|
||
func Test1(t *testing.T) { | ||
time.Sleep(200 * time.Millisecond) | ||
} | ||
-- sleepybad/p.go -- | ||
package p | ||
|
||
import ^ | ||
|
||
var _ = io.DoesNotExist |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.