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

[Impeller] test if aiks golden test can be ported to DL. #52711

Closed
wants to merge 3 commits into from

Conversation

jonahwilliams
Copy link
Member

Testing

@jonahwilliams
Copy link
Member Author

@gaaclarke I know you mentioned the expectation is based on the test name, but I can't use a different test name (AiksTest vs DlTest) without losing access to the playground. I think we need to just add a find/replace for the DLTest -> AiksTest so we can port the goldens over without disruption.

@@ -48,5 +52,32 @@ TEST_P(DlGoldenTest, CanRenderImage) {
ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
}

TEST_P(DlGoldenTest, RotateColorFilteredPath) {
Copy link
Member

@gaaclarke gaaclarke May 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I'd do is create another file called dl_aiks_golden_unittests.cc. It will match the same structure as DlGoldenTest but have the name AiksTests. Then you can move tests from aiks to there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like I can rename it like that. I'm going to have the golden harvester do a string replace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What problem did you run into? It should work, I've already moved tests that way when I split up aiks_unittests.cc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not the test names, its suite names. It needs to be AiksTest otherwise the goldens are invalidated. We can't have multiple AiksTests set up or we trip assertions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not the test names, its suite names. It needs to be AiksTest otherwise the goldens are invalidated. We can't have multiple AiksTests set up or we trip assertions.

We already have multiple AiksTests, checkout aiks_unittests.cc and aiks_blend_unittests.cc. On monday let's sync up and look at it together. You are probably just running into the the problem that this one is in the flutter namespace and the others are in the impeller namespace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you know what. That's probably not going to work because AiksTests doesn't have access to OpenPlaygroundHere(display_list). We would have to copy that over, which isn't so bad.

If we want to go down the route you are considering in the latest patch I think the renaming of the suite should happen in the same file as the tests. The setUp method could override the name.

Let's meet up later today to discuss the options. We have to consider too what do we want to do with newly written tests, not just ones we've migrated from aiks.

gaaclarke added a commit that referenced this pull request May 14, 2024
A redo of #52711 that maintains
our existing testing patterns.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: jonahwilliams <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants