Propagate test envs to xml generation action#12659
Closed
meteorcloudy wants to merge 7 commits intobazelbuild:masterfrom
Closed
Propagate test envs to xml generation action#12659meteorcloudy wants to merge 7 commits intobazelbuild:masterfrom
meteorcloudy wants to merge 7 commits intobazelbuild:masterfrom
Conversation
Member
Author
|
fyi @ulfjack |
Previously, we hardcode the envs of the xml generation action, which caused problem for process-wrapper because it's dynamically linked to some system library and the required PATH or LD_LIBRARY_PATH are not set. This change propagate the envs we set for the actual test action to the xml file generation action to make sure the env vars are correctly set and can also be controlled by --action_env and --test_env. Fixes bazelbuild#4137
de33fde to
044fef4
Compare
meisterT
reviewed
Dec 14, 2020
| action, | ||
| args, | ||
| ImmutableMap.of( | ||
| "PATH", "/usr/bin:/bin", |
Member
There was a problem hiding this comment.
Are you sure we don't need the PATH and the TEST_BINARY?
Member
Author
There was a problem hiding this comment.
Those two are always set by the test action. Because are passing the test action envs to the xml generation action, we don't need to explicitly set them anymore.
| ImmutableMap.Builder<String, String> envBuilder = ImmutableMap.builder(); | ||
| envBuilder.putAll(testEnv).put("TEST_NAME", action.getTestName()); | ||
| if (!action.isSharded()) { | ||
| envBuilder.put("TEST_SHARD_INDEX", "0"); |
Member
There was a problem hiding this comment.
We do we write those two when the action is not sharded?
Member
Author
There was a problem hiding this comment.
Np, we don't have those for the actual test action, only set for the xml generation action.
4c97d40 to
3683879
Compare
meisterT
approved these changes
Dec 14, 2020
Contributor
|
Thanks! |
coeuvre
pushed a commit
to coeuvre/bazel
that referenced
this pull request
Jul 15, 2021
Previously, we hardcode the envs of the xml generation action, which caused problem for process-wrapper because it's dynamically linked to some system libraries and the required PATH or LD_LIBRARY_PATH are not set. This change propagate the envs we set for the actual test action to the xml file generation action to make sure the env vars are correctly set and can also be controlled by --action_env and --test_env. Fixes bazelbuild#4137 Fixes bazelbuild#12579 Closes bazelbuild#12659. PiperOrigin-RevId: 347596753
coeuvre
pushed a commit
to coeuvre/bazel
that referenced
this pull request
Jul 15, 2021
Previously, we hardcode the envs of the xml generation action, which caused problem for process-wrapper because it's dynamically linked to some system libraries and the required PATH or LD_LIBRARY_PATH are not set. This change propagate the envs we set for the actual test action to the xml file generation action to make sure the env vars are correctly set and can also be controlled by --action_env and --test_env. Fixes bazelbuild#4137 Fixes bazelbuild#12579 Closes bazelbuild#12659. PiperOrigin-RevId: 347596753
coeuvre
pushed a commit
to coeuvre/bazel
that referenced
this pull request
Jul 15, 2021
Previously, we hardcode the envs of the xml generation action, which caused problem for process-wrapper because it's dynamically linked to some system libraries and the required PATH or LD_LIBRARY_PATH are not set. This change propagate the envs we set for the actual test action to the xml file generation action to make sure the env vars are correctly set and can also be controlled by --action_env and --test_env. Fixes bazelbuild#4137 Fixes bazelbuild#12579 Closes bazelbuild#12659. PiperOrigin-RevId: 347596753
coeuvre
pushed a commit
to coeuvre/bazel
that referenced
this pull request
Jul 15, 2021
Previously, we hardcode the envs of the xml generation action, which caused problem for process-wrapper because it's dynamically linked to some system libraries and the required PATH or LD_LIBRARY_PATH are not set. This change propagate the envs we set for the actual test action to the xml file generation action to make sure the env vars are correctly set and can also be controlled by --action_env and --test_env. Fixes bazelbuild#4137 Fixes bazelbuild#12579 Closes bazelbuild#12659. PiperOrigin-RevId: 347596753
coeuvre
pushed a commit
to coeuvre/bazel
that referenced
this pull request
Jul 16, 2021
Previously, we hardcode the envs of the xml generation action, which caused problem for process-wrapper because it's dynamically linked to some system libraries and the required PATH or LD_LIBRARY_PATH are not set. This change propagate the envs we set for the actual test action to the xml file generation action to make sure the env vars are correctly set and can also be controlled by --action_env and --test_env. Fixes bazelbuild#4137 Fixes bazelbuild#12579 Closes bazelbuild#12659. PiperOrigin-RevId: 347596753
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, we hardcode the envs of the xml generation action, which
caused problem for process-wrapper because it's dynamically linked to
some system libraries and the required PATH or LD_LIBRARY_PATH are not
set.
This change propagate the envs we set for the actual test action to the
xml file generation action to make sure the env vars are correctly set and
can also be controlled by --action_env and --test_env.
Fixes #4137
Fixes #12579