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

testing: document that tests should not write to their working directory #28386

bcmills opened this Issue Oct 25, 2018 · 1 comment


None yet
3 participants
Copy link

bcmills commented Oct 25, 2018

The contents of modules are shared and immutable (#27161), and it is important that the contents of a module remain consistent. Similarly, the contents of the standard library are not writable in many distributions of the Go toolchain.

Tests are defined to run within the directory containing their source code, so the above implies that tests must not assume that they can write to the current directory. We should make sure that is clearly documented.


This comment has been minimized.

Copy link

gopherbot commented Dec 6, 2018

Change mentions this issue: cmd/cover: run tests in parallel, don't change source directory

gopherbot pushed a commit that referenced this issue Dec 6, 2018

cmd/cover: run tests in parallel, don't change source directory
This speeds up the cmd/cover testsuite by about 40% on my laptop.

Updates #26473
Updates #28386

Change-Id: I853b1b3b8c98dc89440f7b7bf5c0ade1d3d66802
Run-TryBot: Ian Lance Taylor <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Brad Fitzpatrick <>

@andybons andybons modified the milestones: Go1.12, Go1.13 Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.