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

request: Create MacOS Folder for Intel and Apple Silicon #114

Open
1 task done
jxstxn1 opened this issue Mar 25, 2024 · 3 comments
Open
1 task done

request: Create MacOS Folder for Intel and Apple Silicon #114

jxstxn1 opened this issue Mar 25, 2024 · 3 comments

Comments

@jxstxn1
Copy link

jxstxn1 commented Mar 25, 2024

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

Differ between Intel Macs & Apple Silicon Macs

Description

Having two MacOS folders, one for Intel and one for ARM.
File Structure could be like this:

.
└── macos/
    ├── intel
    └── arm

or

.
├── macos-intel
└── macos-arm

Reasoning

If you run Golden Tests with an Intel Mac, it will produce different Golden Images than an Apple Silicon Mac and vice versa.
To be able to test on both platforms reliable, it would be great to have two folders. One for each architecture.

Additional context and comments

No response

@Bassiuz
Copy link

Bassiuz commented Mar 26, 2024

Very interested in this fix. We are currently bypassing this by forcing all machines to use the X86_64 version of Flutter to generate image and run the tests for comparison; which 'works' but decreases test time a bit.

We could also use this to let ARM machines generate both the intel and arm goldens if wanted.

@btrautmann
Copy link
Contributor

This seems fairly doable. My initial thought is within goldenTest we could detect the architecture and pass that along to the FilePathResolver. I think we'd want to have a caching mechanism so we're not invoking Process.run for every test. I think it would be safe to have this be global because we shouldn't be changing platforms/architectures in the middle of a suite run.

@Bassiuz @jxstxn1 let me know if that sounds fine.

PS I'm curious if you all have examples of some of the differences you've seen between the 2 architectures. Mainly just curious.

@jxstxn1
Copy link
Author

jxstxn1 commented Sep 20, 2024

@btrautmann the approach seems fine for me.

We noticed the difference on the Edge of a PieChart from fl_chart.
Got a diff with 278px/0,00%-0,01% difference xD

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

No branches or pull requests

3 participants