New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: unavailable vcs fails test #26837

Open
iWdGo opened this Issue Aug 7, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@iWdGo
Contributor

iWdGo commented Aug 7, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.11beta3 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)? Yes

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\()\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\()\Documents\Google\
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\()\AppData\Local\Temp\go-build152074326=/tmp/go-build -gno-record-gcc-switches

What did you do?

c:\Users\()\Documents\Google\golang\go\src>go test -run=TestMove -v cmd/go

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

c:\Users\Costa\Documents\Google\golang\go\src>go test -run=TestMove -v cmd/go
=== RUN   TestMoveGit
=== PAUSE TestMoveGit
=== RUN   TestMoveHG
=== PAUSE TestMoveHG
=== CONT  TestMoveGit
=== CONT  TestMoveHG
--- SKIP: TestMoveHG (1.39s)
--- PASS: TestMoveGit (34.37s)
    (same test output)
PASS
PASS    cmd/go  46.407s

What did you see instead?

c:\Users\Costa\Documents\Google\golang\go\src>go test -run=TestMove -v cmd/go
=== RUN   TestMoveGit
=== PAUSE TestMoveGit
=== RUN   TestMoveHG
=== PAUSE TestMoveHG
=== CONT  TestMoveGit
=== CONT  TestMoveHG
--- FAIL: TestMoveHG (7.39s)
    go_test.go:1079: running testgo [get -d vcs-test.golang.org/go/custom-hg-hello]
    go_test.go:1079: standard error:
    go_test.go:1079: go: missing Mercurial command. See https://golang.org/s/gogetcmd
        package vcs-test.golang.org/go/custom-hg-hello: exec: "hg": executable file not found in %PATH%

    go_test.go:1079: go [get -d vcs-test.golang.org/go/custom-hg-hello] failed unexpectedly in C:\Go\src\cmd\go: exit status 1
--- PASS: TestMoveGit (34.37s)
    go_test.go:1079: running testgo [get -d rsc.io/pdf]
    go_test.go:1080: running testgo [get -d -u rsc.io/pdf]
    go_test.go:1102: running testgo [build -o sink.exe sink]
    go_test.go:1105: running testgo [get -d -u rsc.io/pdf]
    go_test.go:1105: standard error:
    go_test.go:1105: package rsc.io/pdf: rsc.io/pdf is a custom import path for https://github.com/rsc/pdf, but C:\Users\Costa\AppData\Local\Temp\gotest245418038\src\rsc.io\pdf is checked out from https://github.com/rsc/pdfXXX

    go_test.go:1105: testgo failed as expected: exit status 1
    go_test.go:1107: running testgo [get -d -f -u rsc.io/pdf]
    go_test.go:1107: standard error:
    go_test.go:1107: # cd C:\Users\Costa\AppData\Local\Temp\gotest245418038\src\rsc.io\pdf; git pull --ff-only
        remote: Repository not found.
        fatal: repository 'https://github.com/rsc/pdfXXX/' not found
        package rsc.io/pdf: exit status 1

    go_test.go:1107: testgo failed as expected: exit status 1
FAIL
FAIL    cmd/go  46.407s

The test fails as one vcs (Mercurial in the example) is unavailable. Test should be skipped with the usual warning when vcs is unavailable. As a side remark, cmd/go tests are timing out after 10 minutes. As tests run in parallel as 'PAUSED" until all tests are listed as per output above, such errors never appear in short mode.

@gopherbot

This comment has been minimized.

gopherbot commented Aug 7, 2018

Change https://golang.org/cl/128195 mentions this issue: cmd/go: skip test when vcs is unavailable

@bcmills bcmills added the NeedsFix label Aug 9, 2018

@bcmills bcmills added this to the Go1.11 milestone Aug 9, 2018

@bcmills bcmills added the Testing label Aug 9, 2018

@rsc rsc modified the milestones: Go1.11, Go1.12 Aug 10, 2018

@bcmills

This comment has been minimized.

Member

bcmills commented Nov 15, 2018

Assigned to @iWdGo, since a fix is pending in https://golang.org/cl/128195.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment