-
Notifications
You must be signed in to change notification settings - Fork 0
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 tests using testdata/src/(exclude|empty) to script fr…
…amework Part of converting all tests to script framework to improve test parallelism. Updates golang#36320 Updates golang#17751 Change-Id: Icc14d4188574badf3da71d34857616f2a2ad5862 Reviewed-on: https://go-review.googlesource.com/c/go/+/214138 Reviewed-by: Jay Conrod <[email protected]>
- Loading branch information
Showing
21 changed files
with
105 additions
and
92 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 @@ | ||
! go build ./empty/test | ||
stderr 'no non-test Go files in ' | ||
|
||
! go build ./empty/xtest | ||
stderr 'no non-test Go files in ' | ||
|
||
! go build ./empty/testxtest | ||
stderr 'no non-test Go files in ' | ||
|
||
! go build ./exclude | ||
stderr 'build constraints exclude all Go files in ' | ||
|
||
! go build ./exclude/ignore | ||
stderr 'no Go files in ' | ||
|
||
! go build ./exclude/empty | ||
stderr 'no Go files in ' | ||
|
||
-- empty/test/test_test.go -- | ||
package p | ||
-- empty/testxtest/test_test.go -- | ||
package p | ||
-- empty/testxtest/xtest_test.go -- | ||
package p_test | ||
-- empty/xtest/xtest_test.go -- | ||
package p_test | ||
-- exclude/empty/x.txt -- | ||
-- exclude/ignore/_x.go -- | ||
package x | ||
-- exclude/x.go -- | ||
// +build linux,!linux | ||
|
||
package x | ||
-- exclude/x_linux.go -- | ||
// +build windows | ||
|
||
package x |
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,6 @@ | ||
[gccgo] skip # gccgo assumes cross-compilation is always possible | ||
|
||
env GOOS=windwos | ||
|
||
! go build -n exclude | ||
stderr 'unsupported GOOS/GOARCH pair' |
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,49 @@ | ||
[!race] skip | ||
|
||
cd $GOPATH/src/empty/pkg | ||
go test -cover -coverpkg=. -race | ||
|
||
[short] stop # Only run first case in short mode | ||
|
||
cd $GOPATH/src/empty/test | ||
go test -cover -coverpkg=. -race | ||
|
||
cd $GOPATH/src/empty/xtest | ||
go test -cover -coverpkg=. -race | ||
|
||
cd $GOPATH/src/empty/pkgtest | ||
go test -cover -coverpkg=. -race | ||
|
||
cd $GOPATH/src/empty/pkgxtest | ||
go test -cover -coverpkg=. -race | ||
|
||
cd $GOPATH/src/empty/pkgtestxtest | ||
go test -cover -coverpkg=. -race | ||
|
||
cd $GOPATH/src/empty/testxtest | ||
go test -cover -coverpkg=. -race | ||
|
||
-- empty/pkg/pkg.go -- | ||
package p | ||
-- empty/pkgtest/pkg.go -- | ||
package p | ||
-- empty/pkgtest/test_test.go -- | ||
package p | ||
-- empty/pkgtestxtest/pkg.go -- | ||
package p | ||
-- empty/pkgtestxtest/test_test.go -- | ||
package p | ||
-- empty/pkgtestxtest/xtest_test.go -- | ||
package p_test | ||
-- empty/pkgxtest/pkg.go -- | ||
package p | ||
-- empty/pkgxtest/xtest_test.go -- | ||
package p_test | ||
-- empty/test/test_test.go -- | ||
package p | ||
-- empty/testxtest/test_test.go -- | ||
package p | ||
-- empty/testxtest/xtest_test.go -- | ||
package p_test | ||
-- empty/xtest/xtest_test.go -- | ||
package p_test |
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,13 @@ | ||
[!race] skip | ||
[short] skip | ||
|
||
mkdir $WORKDIR/tmp/pkg | ||
go install -race -pkgdir=$WORKDIR/tmp/pkg std | ||
|
||
# Make sure go test -i -race doesn't rebuild cached packages | ||
go test -race -pkgdir=$WORKDIR/tmp/pkg -i -v empty/pkg | ||
! stderr . | ||
|
||
-- empty/pkg/pkg.go -- | ||
package p | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.