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

Go: Add tests for resolve build-environment #16462

Merged
merged 6 commits into from May 15, 2024
Merged

Conversation

mbg
Copy link
Member

@mbg mbg commented May 9, 2024

Summary

We added support for the resolve build-environment command to the Go autobuilder last year, but we did not add any integration tests to this repository at the time. We have tests elsewhere, but those will only catch bugs in the resolve build-environment implementation at later stages, often long after a PR modifying the behaviour here is merged.

What this PR does

This PR builds on recent improvements to the Go integration tests (having a common Go-specific integration test library) and the addition of resolve_environment_utils to the internal repository (that PR needs to be merged for this to work) to:

  • Run resolve build-environment for every integration test. The main benefit of doing this is that critical bugs in the implementation should now become apparent much earlier.
  • Add an integration test, which exploits the GOTOOLCHAIN environment variable, to force resolve build-environment to recommend a newer Go version.

@mbg mbg added depends on internal PR This PR should only be merged in sync with an internal Semmle PR Go labels May 9, 2024
@mbg mbg self-assigned this May 9, 2024
@mbg mbg requested a review from a team as a code owner May 9, 2024 11:06
@mbg mbg changed the title Go: Add test for resolve build-environment Go: Add tests for resolve build-environment May 9, 2024
owen-mc
owen-mc previously approved these changes May 11, 2024
@mbg mbg removed the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label May 15, 2024
@mbg mbg merged commit 586e900 into main May 15, 2024
12 checks passed
@mbg mbg deleted the mbg/go/add-resolve-env-tests branch May 15, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants