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

tests: Allow test suite to run on mac #248

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented May 13, 2024

  1. Removes custom buildx config inpsection for new buildx dial-stdio subcommand for creating a buildkit client. This not only allows any buildx instance to be used, in particular it unblocks docker desktop.
  2. Sets test fixtures to explicitly set the platform to the worker's platform. This is needed because the LLB is generated on the client and was assuming the client's platform (e.g. darwin/arm64 on mac).
  3. Marks windows tests to use explictlty set amd64 as the target platform since windows/arm64 is not supported. This allows the test suite to run against an arm64 worker (e.g. docker for mac).

@cpuguy83 cpuguy83 requested a review from a team as a code owner May 13, 2024 21:42
@cpuguy83 cpuguy83 force-pushed the tests_use_dial_stdio branch 2 times, most recently from 7310e1e to 8d4a319 Compare May 13, 2024 21:46
This makes it so the test suite can connect to any buildx instance
using `docker buildx dial-stdio`.
In this case the client connection is proxied over the stdin/stdout of
the buildx command.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Remove the code that falls back to the old behavior of trying to parse
the buildx directory.
This makes tests require buildx >= 0.13.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
1. In the test fixtures we are generating LLB from the client. This LLB
   was assuming the clients platform, however this should use the
   worker's platform. This allows the fixtures to be built from a Mac
   client (e.g. Docker for Mac).
2. There is currently no Windows arm64 image as such just set the tests
   to use amd64 as an explicit platform.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 changed the title tests: Add support for buildx dial-stdio tests: Allow test suite to run on mac May 14, 2024
@cpuguy83 cpuguy83 added this to the v0.5.0 milestone May 17, 2024
@cpuguy83
Copy link
Member Author

@jeremyrickard LGTY?

@jeremyrickard
Copy link
Contributor

@cpuguy83 I was able to run the tests locally on my Mac with your branch, so I think this is good to go.

@jeremyrickard jeremyrickard merged commit dc933b2 into Azure:main Jun 3, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants