Use sandboxed spawn strategy in testing - #291
Draft
furtib wants to merge 1 commit into
Draft
Conversation
Collaborator
|
This is actually interesting idea! |
Contributor
Author
|
I also found that it's not that simple. Despite my suspicion that networking is disabled inside the sandboxed version, testing it on the Bazel native FOSS test branch (#235) (after removing If we add this as a second test, should we require that all tests pass this way too, or do you think that would be too flaky? |
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.
Why:
The
spawn_strategy=sandboxedis a much stricter testing environment. It can catch issues that can go unnoticed in some cases. (For example, setting the workaround PATH for codechecker to/works without this flag, even though it shouldn't.)This strategy more closely mimics the restrictions of a remote worker.
What:
--spawn_strategy=sandboxedto CI tests. (Had to skip Buildifier since the sandboxed strategy is too restrictive for it.)local = Truefrom unit_test macro. (This flag prevents these kinds of tests from running with a sandboxed strategy.)Notes:
This strategy may restrict what kind of tests we can use.
Addresses:
None