-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/dist: no obvious way to disable test caching #22758
Comments
/cc @rsc |
Did you try GOCACHE=off. |
Ah I wasn't aware of that. Thanks, yes that does the trick. If GOCACHE is going to be the general solution to this it might be nice to add to the dist help output. |
Why are you running |
Normally I just use In this particular case I was trying to recreate a 'too many open files' failure on the builder and was changing I guess the only other reason to use Since
|
I think there needs to be some clarification of the -rebuild option.
Because IMO it does not behave the way it used to, i.e., it doesn't rebuild
everything if the cache is active.
…On Tue, Nov 21, 2017 at 4:41 AM, Michael Munday ***@***.***> wrote:
Normally I just use all.bash and go test when I'm testing. I sometimes
use go tool dist test when I want to run the cgo and link mode tests
without rebuilding everything. I could use run.bash instead, I just use go
tool ... out of habit.
In this particular case I was trying to recreate a 'too many open files'
failure on the builder and was changing ulimit -n in between runs to see
what failed.
I guess the only other reason to use go tool dist test directly rather
than run.bash would be to avoid the -rebuild flag. Useful when testing an
install of Go without write access.
Since run.bash is just a thin wrapper around go tool dist test -rebuild
it does have the same issue. I sometimes (rarely these days) need to run
the tests a few times to be confident I've fixed an intermittent issue. In
that case I don't want to see cached results.
GOCACHE=off is fine for me. Happy for this issue to be closed if you
think this an obscure use case.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#22758 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AI_wjDQpHvqikxA1ptWHYy9aAKYAl3TVks5s4qjpgaJpZM4QgaPN>
.
|
@laboger, I believe that using -rebuild does rebuild everything even when the cache is active. cmd/dist says:
The -a should be forcing a rebuild of everything. If not, that's a bug in -a. |
@mundaym, thanks for elaborating. I will send a CL that uses -count=1 on all go test invocations from cmd/dist, so that those results are never cached. |
Change https://golang.org/cl/80735 mentions this issue: |
Sorry I misunderstood Michael's comment above where he said "The -rebuild
flag does not affect the caching". I have had no personal experience of the
-rebuild option not working as expected.
…On Wed, Nov 29, 2017 at 11:20 AM, Russ Cox ***@***.***> wrote:
@laboger <https://github.com/laboger>, I believe that using -rebuild
*does* rebuild everything even when the cache is active. cmd/dist says:
if t.rebuild {
t.out("Building packages and commands.")
// Force rebuild the whole toolchain.
goInstall("go", append([]string{"-a", "-i"}, toolchain...)...)
}
The -a should be forcing a rebuild of everything. If not, that's a bug in
-a.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22758 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AI_wjJLPfP2FMwBcKI-iBjrQRgCPXj5fks5s7ZJOgaJpZM4QgaPN>
.
|
There doesn't appear to be a way to disable the new test caching behaviour when running
go tool dist test
. This is a bit inconvenient when trying to recreate/resolve intermittent issues.What version of Go are you using (
go version
)?go version devel +7781fed24e Thu Nov 16 02:24:37 2017 +0000 linux/s390x
Does this issue reproduce with the latest release?
No, 1.9.x does not have test caching.
What did you do?
go tool dist test
What did you expect to see?
What did you see instead?
The output of
go tool dist test -h
is currently:The
-rebuild
flag does not affect the caching.The text was updated successfully, but these errors were encountered: