-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
Set $HOME for tests #4108
Comments
Looks reasonable to me, could you send a PR? |
Actually, it looks like Bazel's test setup already does this: https://cs.opensource.google/bazel/bazel/+/master:tools/test/windows/tw.cc;l=543?q=%22%5C%22HOME%5C%22%22&ss=bazel%2Fbazel Do you have a reproducer for a situation in which it isn't set? |
Diff of the example in this repo:
|
Is that code you point to only used for windows? |
Is something buggy here: https://cs.opensource.google/bazel/bazel/+/master:tools/test/test-setup.sh;l=66 |
What version of rules_go are you using?
Latest (50.1)
What version of gazelle are you using?
N/A
What version of Bazel are you using?
7.3
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Linux x86_64
Any other potentially useful information about your toolchain?
Nope
What did you do?
Use a test that calls
os.LookupEnv("HOME")
and requires that$HOME
is set.What did you expect to see?
That
$HOME
is set to$TEST_TMPDIR
as recommended here: https://bazel.build/reference/test-encyclopedia.What did you see instead?
$HOME is not set.
We can work around this by doing, but it'd be better to not have to do this
The text was updated successfully, but these errors were encountered: