Skip to content
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: -x output suggests test runs after build failure #22659

Closed
rsc opened this issue Nov 10, 2017 · 1 comment
Closed

cmd/go: -x output suggests test runs after build failure #22659

rsc opened this issue Nov 10, 2017 · 1 comment
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Nov 10, 2017

$ GOPATH=$(pwd)/testdata ./go test -x coverbad
WORK=/var/folders/qk/vp4mp_hj5qlb_1_w97rgqc4r000n9d/T/go-build672556159
mkdir -p $WORK/b001/
mkdir -p $WORK/b045/
cat >$WORK/b045/importcfg << 'EOF' # internal
packagefile testing=/Users/rsc/Library/Caches/go-build/8f/8f5f7aab783c1593a14a0f2cae19f711bbb12348107572c2e6b54cbc1821003f-d
EOF
cd /Users/rsc/go/src/cmd/go/testdata/src/coverbad
/Users/rsc/go/pkg/tool/darwin_amd64/compile -o $WORK/b045/_pkg_.a -trimpath $WORK/b045 -p coverbad -complete -buildid jssXVF2jxCHmxgaVPCcR/jssXVF2jxCHmxgaVPCcR -D "" -importcfg $WORK/b045/importcfg -pack -c=4 ./p.go ./p_test.go
# coverbad
/Users/rsc/go/src/cmd/go/testdata/src/coverbad/p.go:4:2: undefined: g
$WORK/b001/coverbad.test
rm -r $WORK/b001/
FAIL	coverbad [build failed]

If the build failed then coverbad.test should not have been written. I don't understand why the output says it is. Maybe the output is wrong or maybe we are incorrectly trying to execute the test.

@rsc rsc added this to the Go1.10 milestone Nov 10, 2017
@gopherbot
Copy link

Change https://golang.org/cl/81495 mentions this issue: cmd/go: fix -x output for test build failure

@golang golang locked and limited conversation to collaborators Dec 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants