Commit a5cff1e5 authored by Michael Matloob's avatar Michael Matloob

cmd/go: convert TestIssue17119 to the script test framework

It's already parallel, but we might as well convert it and
get rid of the testdata/src dircetory completely.

Updates #36320

Change-Id: I75e335b32d64a8ddedd65e4337949b729c9e0fbe
Reviewed-on: https://go-review.googlesource.com/c/go/+/212877
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
parent fab2e86b
......@@ -3504,18 +3504,6 @@ func TestGoGetUpdateAllDoesNotTryToLoadDuplicates(t *testing.T) {
tg.grepStderrNot("duplicate loads of", "did not remove old packages from cache")
}
// Issue 17119 more duplicate load errors
func TestIssue17119(t *testing.T) {
testenv.MustHaveExternalNetwork(t)
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
tg.runFail("build", "dupload")
tg.grepBothNot("duplicate load|internal error", "internal error")
}
func TestBinaryOnlyPackages(t *testing.T) {
tooSlow(t)
......
[!net] skip
# Issue 17119: Test more duplicate load errors.
! go build dupload
! stderr 'duplicate load|internal error'
stderr 'dupload/vendor/p must be imported as p'
-- dupload/dupload.go --
package main
import (
_ "dupload/p2"
_ "p"
)
func main() {}
-- dupload/p/p.go --
package p
-- dupload/p2/p2.go --
package p2
import _ "dupload/vendor/p"
-- dupload/vendor/p/p.go --
package p
package main
import (
_ "dupload/p2"
_ "p"
)
func main() {}
package p2
import _ "dupload/vendor/p"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment