Repository navigation
test(vmaas): run the Agent Engine environment tests with GNU coreutils off Linux - #7790
Closed
iamthehimansh wants to merge 1 commit into
Closed
iamthehimansh wants to merge 1 commit into
iamthehimansh wants to merge 1 commit into
Conversation
…s off Linux The fake sandbox runs the environment's commands in a local bash, and those commands use GNU-only options (stat -c, base64 -d FILE, dd iflag=fullblock, mv -T, chmod --reference), so 13 tests failed on macOS. Put links to the g-prefixed GNU tools (Homebrew coreutils) first on PATH when they are installed, and skip only the tests that need them when they are not. Closes google#7778
Collaborator
|
Thank you @iamthehimansh for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 051c62d. Closing this PR as the changes are now in the main branch. |
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
2. Or, if no issue exists, describe the change:
Problem:
test_agent_engine_environment.pyruns the sandbox's commands in a localbash(_FakeSandboxes.execute_bash). Those commands use GNU coreutils options:stat -c,base64 -d FILE,dd iflag=fullblock,mv -Tandchmod --reference. The BSD tools on macOS reject them, so 13 tests fail on a Mac (e.g.stat: illegal option -- c). The production sandbox is Linux and CI runs onubuntu-latest, so only local development is affected.Solution:
This is a test-only change. Production code and Linux CI behave exactly as before.
gprefix (Homebrewcoreutils:gstat,gbase64,gdd,gmv,gchmod), the fake shell runs with a temporary directory of links namedstat,base64,dd,mvandchmodfirst onPATH. The directory is created once per test session and removed at exit.needs GNU coreutils ... brew install coreutils. That's 10 test functions, plus 3 of the 4test_write_is_split_at_chunk_boundariescases;exactly_one_chunkdoesn't need them and still runs.PATHchange and no skips.Testing Plan
Unit Tests:
All runs on macOS 26.6.2 (arm64), Python 3.13.15,
pip install -e '.[test]':pytest tests/unittests/integrations/vmaas/test_agent_engine_environment.pymain(571670d), GNU coreutils installedPATHadk-gnu-coreutils-*temp directory after the runs.pytest tests/unittestswith this PR: 21,626 passed, 99 skipped, 1 failed. The one failure istest_remote_a2a_agent.py::...::test_ensure_resolved_uses_custom_factory, which is unrelated: it comes from a2a-sdk 1.3.0 and is fixed separately in fix(a2a): stamp A2A-Version on the rebound client with a2a-sdk 1.3 #7777. Onmainthe same run had 14 failures (these 13 plus that one).pyink --checkandisort --check-only(repo config) pass.Manual End-to-End (E2E) Tests:
N/A, test infrastructure only.
Checklist
Additional context
This implements option 2 from #7778, the approach also suggested there by @Samecho.
AI use: this PR was prepared with an AI assistant. It found the failures by running the unit suite on macOS, wrote the change, and ran every command shown above on my machine. The output above is from those runs.
AI-assisted: yes (Cana)