Skip to content

Commit

Permalink
cmd/go: convert TestLegacyModGet to the script framework
Browse files Browse the repository at this point in the history
I think this test needs to be split up eventually. It's one of
the longest tests.

Part of converting all tests to script framework to improve
test parallelism.

Updates #36320
Updates #17751

Change-Id: If2168fac040d78fd0ec3dcbdef2affd2a8f48f6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/214158
Reviewed-by: Jay Conrod <[email protected]>
  • Loading branch information
matloob committed Feb 27, 2020
1 parent 62ff72d commit e674972
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 69 deletions.
57 changes: 57 additions & 0 deletions src/cmd/go/testdata/script/mod_get_legacy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This test was converted from a test in vendor_test.go (which no longer exists).
# That seems to imply that it's about vendoring semantics, but the test doesn't
# use 'go -mod=vendor' (and none of the fetched repos have vendor folders).
# The test still seems to be useful as a test of direct-mode go get.

[short] skip
[!exec:git] skip

env GOPATH=$WORK/tmp/d1
go get vcs-test.golang.org/git/modlegacy1-old.git/p1
go list -f '{{.Deps}}' vcs-test.golang.org/git/modlegacy1-old.git/p1
stdout 'new.git/p2' # old/p1 should depend on new/p2
! stdout new.git/v2/p2 # old/p1 should NOT depend on new/v2/p2
go build vcs-test.golang.org/git/modlegacy1-old.git/p1 vcs-test.golang.org/git/modlegacy1-new.git/p1
! stdout .

env GOPATH=$WORK/tmp/d2

rm $GOPATH
go get github.com/rsc/vgotest5
go get github.com/rsc/vgotest4
go get github.com/myitcv/vgo_example_compat

rm $GOPATH
go get github.com/rsc/vgotest4
go get github.com/rsc/vgotest5
go get github.com/myitcv/vgo_example_compat

rm $GOPATH
go get github.com/rsc/vgotest4 github.com/rsc/vgotest5
go get github.com/myitcv/vgo_example_compat

rm $GOPATH
go get github.com/rsc/vgotest5 github.com/rsc/vgotest4
go get github.com/myitcv/vgo_example_compat

rm $GOPATH
go get github.com/myitcv/vgo_example_compat
go get github.com/rsc/vgotest5 github.com/rsc/vgotest4

rm $GOPATH
go get github.com/myitcv/vgo_example_compat github.com/rsc/vgotest4 github.com/rsc/vgotest5

rm $GOPATH
go get github.com/myitcv/vgo_example_compat github.com/rsc/vgotest5 github.com/rsc/vgotest4

rm $GOPATH
go get github.com/rsc/vgotest4 github.com/myitcv/vgo_example_compat github.com/rsc/vgotest5

rm $GOPATH
go get github.com/rsc/vgotest4 github.com/rsc/vgotest5 github.com/myitcv/vgo_example_compat

rm $GOPATH
go get github.com/rsc/vgotest5 github.com/myitcv/vgo_example_compat github.com/rsc/vgotest4

rm $GOPATH
go get github.com/rsc/vgotest5 github.com/rsc/vgotest4 github.com/myitcv/vgo_example_compat
69 changes: 0 additions & 69 deletions src/cmd/go/vendor_test.go

This file was deleted.

0 comments on commit e674972

Please sign in to comment.