-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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 TestGoBuildGOPATHOrder to the script framework
It looks like TestGoBuildGOPATHOrderBroken has been fixed so I've converted that too, without the skip. Part of converting all tests to script framework to improve test parallelism. Updates #36320 Updates #17751 Change-Id: I7ee77f22fb888811c175bcdc5eb814c80fbec420 Reviewed-on: https://go-review.googlesource.com/c/go/+/214432 Reviewed-by: Jay Conrod <[email protected]>
- Loading branch information
Showing
2 changed files
with
35 additions
and
53 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,35 @@ | ||
# golang.org/issue/14176#issuecomment-179895769 | ||
# golang.org/issue/14192 | ||
# -I arguments to compiler could end up not in GOPATH order, | ||
# leading to unexpected import resolution in the compiler. | ||
|
||
env GOPATH=$WORK/p1${:}$WORK/p2 | ||
mkdir $WORK/p1/src/foo $WORK/p2/src/baz | ||
mkdir $WORK/p2/pkg/${GOOS}_${GOARCH} $WORK/p1/src/bar | ||
cp foo.go $WORK/p1/src/foo/foo.go | ||
cp baz.go $WORK/p2/src/baz/baz.go | ||
cp foo.a $WORK/p2/pkg/${GOOS}_${GOARCH}/foo.a | ||
cp bar.go $WORK/p1/src/bar/bar.go | ||
|
||
go install -x bar | ||
|
||
# add in baz.a to the mix | ||
mkdir $WORK/p1/pkg/${GOOS}_${GOARCH} | ||
cp baz.a $WORK/p1/pkg/${GOOS}_${GOARCH}/baz.a | ||
env GOPATH=$WORK/p1${:}$WORK/p2 | ||
go install -x bar | ||
env GOPATH=$WORK/p2${:}$WORK/p1 | ||
go install -x bar | ||
|
||
-- foo.go -- | ||
package foo | ||
-- baz.go -- | ||
package baz | ||
-- foo.a -- | ||
bad | ||
-- baz.a -- | ||
bad | ||
-- bar.go -- | ||
package bar | ||
import _ "baz" | ||
import _ "foo" |